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:
Joined: Apr 06, 2006 Posts: 2415 Location: Iowa, USA
Posted:
Sat Jun 16, 2007 10:52 am
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.
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.
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