Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
valdarez
Worker
Worker



Joined: Jan 22, 2007
Posts: 104

PostPosted: Sat Jun 16, 2007 9:26 am Reply with quote

First, I should note I am only running version 2.10.00, but unless this has been fixed in the newer version, it's probably still broken.

Old Stories Block Only Goes Back 10 Stories for Registered/Logged In Users

I recently boosted the number of stories displayed on the home page from 10 to 20. I have the 'Old Stories' block displayed. Unfortunately, it did not change to display the last 10 stories past the 20 being displayed on the home page. Instead, it displayed stories 11-20 that were displayed on the home page. i.e. It displayed the same stories as the last 10 on the home page instead of the last stories 21-30 (the ones not displayed on the home page).

The strange thing is that this is only a problem for a registered user that is currently logged into the website. To an anonymous viewer of the website, the dates are actually correct!

It seems to have something to do with the following lines of code (lines 46-50) in block-Old_Articles.php:

Code:
if (isset($userinfo['storynum']) AND $user_news == 1) {

    $storynum = $userinfo['storynum'];
} else {
    $storynum = $storyhome;
}


I changed the code to the following and it seemed to fix the problem:

Code:
//if (isset($userinfo['storynum']) AND $user_news == 1) {

//    $storynum = $userinfo['storynum'];
//} else {
    $storynum = $storyhome;
//}


I'm not sure if there are any other ramifications to this fix though guys, so you might want to review it.
 
View user's profile Send private message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sat Jun 16, 2007 10:52 am Reply with quote

Users can set how many stories they want to view in their own preferences. So it looks to me like the block is trying to use that number if the viewer is a user, otherwise it just uses the number set in admin / preferences.

Put that code back in, and then try changing your user preferences to 20 articles. It should work then.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Jun 16, 2007 11:00 am Reply with quote

In your Preferences, do you have this option set to YES?
Let users change News number in Home?
 
View user's profile Send private message
valdarez







PostPosted: Sat Jun 16, 2007 11:48 am Reply with quote

Raven wrote:
In your Preferences, do you have this option set to YES?
Let users change News number in Home?
The current value for that is set to 'Yes'... ahhh.. and the default is 10 stories for all users.

Alright.. that makes sense. Too bad it doesn't modify the default setting for the users. Kind of makes it broken. I'm willing to bet that most people don't even mess with number of news items on the main website.

I'll change the code back, and then set the option to 'NO', which should solve the problem. Thanks for the quick feedback guys.
 
Raven







PostPosted: Sat Jun 16, 2007 9:02 pm Reply with quote

RavensScripts
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©