Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

News count limit

Asked Modified Viewed 1,834 times
T
the_culture
T
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

First off, thanks for making PHPFusion. I came across it last week and have been slowly implementing it on my site (www.gameplaymonthly.com)

Now for my question: Currently my front page displays 11 news items, with the remaining 2 on a second page. How do I set it up so it displays a specific amount (like 20 items), then automatically archives the rest?

Thanks again,
Alex
0 replies

7 posts

D
DubSev
D
DubSev 10
......................................
let's go f***ing mental! la la la la...
  • Senior Member, joined since
  • Contributed 285 posts on the community forums.
  • Started 5 threads in the forums
answered
Senior Member

Go to your news.php there you should go and edit line 22
$items_per_page = 11;


Go to line 118 and remove ".makePageNav($rowstart,$items_per_page,$rows,3)."
INCLUDING the quotes (that's what just worked on my testing machine)
if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
0 replies
T
the_culture
T
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

I changed it to 19 items and deleted the line you told me. It seemed to take it just fine. Since I only have 13 items posted so far, are you sure that anything past 19 will be added to an archive file that visitors can read?

Thanks again for your help.

-Alex
0 replies
A
afaaro
A
afaaro 10
  • Senior Member, joined since
  • Contributed 295 posts on the community forums.
  • Started 68 threads in the forums
answered
Senior Member

you should not delete line 118; if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";

If you added 19 and showing you 13, its because of the PageNav
so I recommend you to restore line 118
0 replies
D
DubSev
D
DubSev 10
......................................
let's go f***ing mental! la la la la...
  • Senior Member, joined since
  • Contributed 285 posts on the community forums.
  • Started 5 threads in the forums
answered
Senior Member

Quote

afaaro wrote:
you should not delete line 118; if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";

If you added 19 and showing you 13, its because of the PageNav
so I recommend you to restore line 118


It seems to work just fine! On my local machine I made 20 bogus news items, let news.php only show 7. when going to my news_cats.php ALL news items are accesible. Only thing changed is that I don't have a PageNav anymore (like he wanted) -- only remove the makePageNav part of course and not the ENTIRE line 118 ;) (and I guess that won't even mind)

And I guess you misread his post. He changed $items_per_page to 19, but it doesn't have any effect cos he doesn't even have 19 news items but 13.... if he posted 7 more, his total we be 20 posts of which 19 would be shown and the last one would only be accesible through news_cats.php?cat_id=???
Edited by DubSev on 08-02-2007 17:42,
0 replies
T
the_culture
T
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Just to clarify what happened, I did change it to 19 and it only displays 19 news items at a time. So that works just fine. As for line 118, I actually found that line [".makePageNav($rowstart,$items_per_page,$rows,3)."] on line 114. But I did delete it and everything seems to be running smoothly.

However I am having a different problem: where are all of the other news items (beyond the 19 that are displayed)? I was hoping there was an archiving system that would archive the other news items but still make them available for readers to go back to.

Is that possible?
0 replies
D
DubSev
D
DubSev 10
......................................
let's go f***ing mental! la la la la...
  • Senior Member, joined since
  • Contributed 285 posts on the community forums.
  • Started 5 threads in the forums
answered
Senior Member

yoursite.com/news_cats.php That's where ALL items can be retreived...
0 replies
T
the_culture
T
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Got it, thanks for the help. :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet