1
rh94040
xoops news 1.2 issue
  • 2004/8/2 5:32

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Hi,
I just upgraded to news 1.2. I love the permission based
viewing and approval capability. However in the TOP STORIES
block, each news item now only displays up to 10 Chinese
Characters which is different from version 1.1. I'd like
to display more characters in the index. What do I need
to modify to achieve this?

Thank you,
Ray

2
hervet
Re: xoops news 1.2 issue
  • 2004/8/2 5:46

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hi Ray,

When you edit the block, you can select the title's length.

Bye,
Hervé

3
rh94040
Re: xoops news 1.2 issue
  • 2004/8/2 6:15

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Hi,
Could you please explain to me in detail how to do this?
I'm talking about the news title length in the Top Stories
block in News 1.2. I verified that it's displaying 20 to 21
single byte characters (so about 10 Chinese characters).
Where is this specified?

Another issue with news 1.2: although a news item is
in a category not viewable to the anonymous user
group, that news item still displays in the top news block. clicking on it gives a no-permission error which is good, but can we hide those news items that are not readable by a certain user group?

Thanks much for your help,
Ray

4
hervet
Re: xoops news 1.2 issue
  • 2004/8/2 6:19

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Ray,

In the module's option, try to use the option named Restrict Topics on Index Page?

Bye,
Hervé

5
hervet
Re: xoops news 1.2 issue
  • 2004/8/2 6:24

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Ray,

For the title's length, this has been corrected and it will be available in the next release.

Bye,
Hervé

6
rh94040
Re: xoops news 1.2 issue
  • 2004/8/2 6:31

  • rh94040

  • Just popping in

  • Posts: 51

  • Since: 2004/4/13


Hi Herve,

Thanks for the info.
1) Regading title length, could you please let me know
the fix so that I can apply it now. I've got a production
site and I'd like to fix this issue now.

I've gone ahead and done the following modification:
In blocks/news_top.php, I commented out the following line:

$title = $myts->makeTboxData4Show($myrow["title"]);
if (strlen($title) >= $options[2]) {
// $title = $myts->makeTboxData4Show(xoops_substr($title,0,($options[2]-1)))."...";

That works for me for now, but I'd like to know the correct
fix. What is the array "options"? Where is options[2]
specified?

2) Regarding the Restric View by Topic option, I did
select it, but it's not affecting my Top Stories
news items. Please advise.

Thanks much,
Ray

7
hervet
Re: xoops news 1.2 issue
  • 2004/8/3 7:36

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hi Ray,

Quote:

1) Regading title length, could you please let me know
the fix so that I can apply it now. I've got a production
site and I'd like to fix this issue now.

I've gone ahead and done the following modification:
In blocks/news_top.php, I commented out the following line:

$title = $myts->makeTboxData4Show($myrow["title"]);
if (strlen($title) >= $options[2]) {
// $title = $myts->makeTboxData4Show(xoops_substr($title,0,($options[2]-1)))."...";


Here is the code you should use, in fact the line you have commented don't have to be commented, there's just a small difference inside the test itself :
Quote:

if (strlen($title) > $options[2]) {
$title = xoops_substr($title,0,$options[2]+3);
}


If think that your problem is coming from the XOOPS function named xoops_substr, what's your version of XOOPS ? In the latest, 2.0.7, this function has been corrected. If you don't have XOOPS 2.0.7, try to upgrage this function, it can be found in the file /xoop/include/functions.php

Quote:

That works for me for now, but I'd like to know the correct
fix. What is the array "options"? Where is options[2]
specified?

options[2] is the length of the title, it's coming from the block, that's what you have typed.

Quote:

2) Regarding the Restric View by Topic option, I did
select it, but it's not affecting my Top Stories
news items. Please advise.

Humm... yes, I saw. In fact, this block has been rewrited in the current developpment version. For this moment the title must be visible but you must have an error message when you click on the link. I'm sory but I don't want to modify the 1.2 as I'm now working on the 1.3 version. The correction will involve many other modifications. But I'm going to modify this now because the problem also exist in the current dev version. You will have to wait for the new release.... sorry (I can't give you a release date).

Bye,
Hervé


Login

Who's Online

477 user(s) are online (56 user(s) are browsing Support Forums)


Members: 0


Guests: 477


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits