Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 04:53 am EDT

Geeklog Forums

Limit front page stories - remove bottom page links (done!)


Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
sleepy
How do I limit the number of stories that show up on my front page? I just want it to be 5. I'm probably overlooking the obvious, I can't find it in the config file.

edit: (see below for further inquiry)
edit2: (hi Dirk, question for you at the bottom)
www.antisource.com
 Quote

Status: offline

r_f_o_t

Forum User
Full Member
Registered: 07/30/03
Posts: 241
Location:Illinois
Try here in the Docs. I believe the user's personal settings can override this, tho.

HTH,

Chuck
Too many hands on my time.
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Okay I see what's going on - I had it set, but since I'm logged in I'm overriding it. I notice that at the bottom, there are links "Previous 1 2 Next" for the extra news. I want to get rid of that, since visitors should only find the news under the topic sections.
www.antisource.com
 Quote

Status: offline

r_f_o_t

Forum User
Full Member
Registered: 07/30/03
Posts: 241
Location:Illinois
Quote by RickW: I notice that at the bottom, there are links "Previous 1 2 Next" for the extra news. I want to get rid of that, since visitors should only find the news under the topic sections.


Don't know if this is what you want, but in the story editor you can choose either "Show on front page", or "Show only in topic".

HTH,

Chuck
Too many hands on my time.
 Quote

RickW

Anonymous
Quote by r_f_o_t:
Quote by RickW: I notice that at the bottom, there are links "Previous 1 2 Next" for the extra news. I want to get rid of that, since visitors should only find the news under the topic sections.


Don't know if this is what you want, but in the story editor you can choose either "Show on front page", or "Show only in topic".

HTH,

Chuck


Nah, by default I want all new articles to be on the front page, and push older articles off the front page. I don't want to have to go back into each article to change it. Maybe it's just a variable in a footer file I have to remove?...
 Quote

Status: offline

r_f_o_t

Forum User
Full Member
Registered: 07/30/03
Posts: 241
Location:Illinois
Ahh, you want to remove that function completely. That's probably somewhere in libcommon.php, or one the other php files. One if the dev's will have tell you where that is.

Good Luck,

Chuck
Too many hands on my time.
 Quote

RickW

Anonymous
Quote by r_f_o_t: Ahh, you want to remove that function completely. That's probably somewhere in libcommon.php, or one the other php files. One if the dev's will have tell you where that is.

Good Luck,

Chuck


Does anybody have an answer for this?
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Now, I can relate to this. If your ran a school newsletter with 20 articles each week, it would be quite tedious to reset the past week's articles to "Show Only in Topic" one by one, after the new articles are published.

Not having the page links in the footer is a good solution if you have the same number of articles each week, but the best way is to allow the stories to have an expiration date from the front page, so it would automatically disappear by the time the new ones are in. That would save a lot of time.

Maybe this should go to the feature request.

Sam
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
rockin
Still would like to remove those bottom page links! Any ideas?
www.antisource.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Remove this line from index.php:
Text Formatted Code
$display .= COM_printPageNavigation($base_url,$page, $num_pages);
 

bye, Dirk
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
I just tried that - but it removes it from all of my other pages as well. My objective is for the first page to just have the first 5 recently submitted articles - and then the topic pages still has the bottom links. Ideally, I actually want the topic pages to list an unlimited amount of articles on their page.

So I'm thinking I will have to copy the index.php to a second file, rename it topic.php, and change the necessary code to make topic.php the default for all of the links. But I know it won't be as simple as that sounds...
www.antisource.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by RickW: So I'm thinking I will have to copy the index.php to a second file, rename it topic.php, and change the necessary code to make topic.php the default for all of the links. But I know it won't be as simple as that sounds...

It's actually much simpler:

Text Formatted Code
if (!empty ($topic)) {
    $display .= COM_printPageNavigation($base_url,$page, $num_pages);
}
 

bye, Dirk
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Thanks Dirk, you're the greatest!

Now I just need to figure out how to list 5 articles on the main page and list all of the articles per topic for the topic pages. And some other formatting changes. At that point, I probably will need a second page so I can have two different templates - but I'll wait and see what Geeklog2 has to offer before I dig up too much of the code.
www.antisource.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by RickW: Now I just need to figure out how to list 5 articles on the main page and list all of the articles per topic for the topic pages.

In theory, you can have a different number of stories per page for each topic. It doesn't work currently, though, but will be fixed in 1.3.10.

Quote by RickW: At that point, I probably will need a second page so I can have two different templates

Search for the Chameleon hack or maybe this would help.

Quote by RickW: but I'll wait and see what Geeklog2 has to offer before I dig up too much of the code.

* cough *

Don't hold your breath ...

bye, Dirk
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Quote by Dirk:
Quote by RickW: Now I just need to figure out how to list 5 articles on the main page and list all of the articles per topic for the topic pages.

In theory, you can have a different number of stories per page for each topic. It doesn't work currently, though, but will be fixed in 1.3.10.


Hi Dirk,

Did this feature make it into 1.3.10?

Also, any thoughts on:

Having only links on the topic pages

Just to verify my objective, on my home page I want the newest 5 stories, with their intros, and no links to additional pages at the bottom (which you helped me with, and works great). Then on the topic pages, I want ALL of the stories for that topic to be listed, without intros.

I'm hoping that 1.3.10 addresses some of this - I already know that it addresses the custom URL names I've inquiried about before...
www.antisource.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by RickW: Did this feature make it into 1.3.10?

From the Changelog:
- It is now again possible to have a different number of stories per page
for individual topics. Users have to set their preferred number of stories
per page to 0 (zero) in their preferences, though, as the user preferences
will always override this setting (bug #190)


bye, Dirk
 Quote

All times are EDT. The time is now 04:53 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content