News Page Number (want the new codezwiz version please)

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
In your index.php where it calls the home module there should be something like:


define('HOMEPAGE', true);


So that wil tell you when your on the homepage.

Something like this should work.


$perpage = 5;
if (defined('HOMEPAGE')) {
     $perpage = 3;
}




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#2   re: News Page Number (want the new codezwiz version please)
warren
CZ Newbie
warren has been a member for over 16 year's 16 Year Member
netherlands.gif
Gender: Male
Status: Offline
Joined: Jul 09, 2008
0.00 posts per day
Posts: 10
Points: 0
   
Oh loll didnt knew it was that simple, thnx for your help Telli icon_smile.gif

There were 3 'define's' I could find; MODULE_FILE, HOME_FILE, INDEX_FILE,
I used HOME_FILE and its working partially now.

The topic pages are still showing 5 articles per page so thats still working fine.

The homepage does show 3 articles + the pagination but as soon as I go to the next page (modules.php?name=News&start=3) the pagination dissapears on the follow-up page.

Im not sure if I made a mistake somewhere?


I do want to add that this mod works wonderful and the customization is quite simple icon_cool.gif

Offtopic:
A little compliance issue in the pagination.php is that the '&start=' links werent properly escaped. Should be; '&amp;start='



Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Attach your modules/News/index.php ina zip file I will take a look at what you added.




Offtopic:
A little compliance issue in the pagination.php is that the '&start=' links werent properly escaped. Should be; '&start='



Seems as though the page parsed the code in the code box. I will make a note of that. icon_smile.gif




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   
warren
CZ Newbie
warren has been a member for over 16 year's 16 Year Member
netherlands.gif
Gender: Male
Status: Offline
Joined: Jul 09, 2008
0.00 posts per day
Posts: 10
Points: 0
   


Originally posted by Telli @ Tue Jul 22, 2008 7:04 pm:

Attach your modules/News/index.php ina zip file I will take a look at what you added.


Okay attached the index.php as .rar. Almost the same as the code I posted at the previous page though.



Seems as though the page parsed the code in the code box. I will make a note of that. icon_smile.gif


Ahh ya I see, didnt knew it was caused by the code block icon_wink.gif



Attached Files
phpnuke7.9-news-index.rar (3.65 KB, Downloaded: 1258 Time(s))


Back to top Reply with quote
#5   re: News Page Number (want the new codezwiz version please)
warren
CZ Newbie
warren has been a member for over 16 year's 16 Year Member
netherlands.gif
Gender: Male
Status: Offline
Joined: Jul 09, 2008
0.00 posts per day
Posts: 10
Points: 0
   
Did you have time to look into it already? icon_smile.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum