PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
valdarez
Worker
Worker


Joined: Jan 22, 2007
Posts: 104

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

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 Back to top

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
valdarez
Worker
Worker


Joined: Jan 22, 2007
Posts: 104

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

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

RavensScripts
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum