News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

View the most recent posts on the forum

Started by Mike66, April 10, 2025, 09:34:28 AM

Previous topic - Next topic

Mike66

When I click on 'View the most recent posts on the forum' under Forum Stats in the Info Centre on here it displays 10 recent posts per page, but on my forum ( also running SMF 2.1.4 ) it only displays 7 recent posts per page.

Where can I change the number of posts to be displayed per page please?

I'd like to increase it to 10, or maybe 15.

deansmar

You are probably looking for this setting:

Number of recent posts to display on board index:
(Set to 0 to disable.)

Which can be found in the theme settings at the bottom of the page..

Admin|configuration|themes and layout|theme settings

Mike66

Thanks deansmar .... but no, that just changes the number of posts to display on board index, not on the standalone recent posts pages.

See https://www.simplemachines.org/community/index.php?action=recent

Kindred

that's a setting in your personal profile
index.php?action=profile;area=theme

Topics to display per page
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mike66

Thanks Kindred ..... but that doesn't change it for me either.

Don't worry, it's not important, just a niggle.

Mike66

Interesting - the number of posts displayed varies on page 1, page 2 etc.

So I'm guessing this might be controlled by page length rather than number of posts to display?

Dave J

Someone asked me to increase the amount of recent posts so they could skip a lot of the content when using 'Unread Posts', so I added some code to the boardindex.template.php to create a scrolling block.
If you want to do the same.

Go to the default theme and download the current boardindex.template.php first and save then create a copy, using 'Notepad++' on the copy, around line 366 find

<div id="recent_posts_content">';
and replace with
<div style="height:180px; overflow-x: hidden; overflow-y: auto;">
<div id="recent_posts_content">
</div>';
 

Go into Administration Center► Themes and Layout► Theme Settings and change the 'Number of recent posts to display on board index:' to the amount you want in the list.

You'll see from the images I have set mine at 25 and the list shows 7 if you want more or less to show just change 'height:180px' to either a larger amount or smaller.

Hope that helps.

Note: it should work on all themes

Kindred

Dave J --  that's not the section that the OP was asking about....    the OP was asking about the ACTUAL "recent posts" page (?action=recent)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Dave J

Quote from: Kindred on April 15, 2025, 09:36:47 AMDave J --  that's not the section that the OP was asking about....    the OP was asking about the ACTUAL "recent posts" page (?action=recent)

Ah I see. Well the info I gave might be useful to someone, even if it was slightly off the topic :)

Mike66

I think post/page length may come into play, a lot of our posts have inline images.

For example my current 'action=recent' pages are displaying:
Page 1 = 6 posts (#1-#6)
Page 2 = 6 posts (#11-#16)
Page 3 = 6 posts (#21-#26)
Page 4 = 8 posts (#31-#38)
Page 5 = 6 posts (#41-#46)
Page 6 = 6 posts (#51-#56)
Page 7 = 7 posts (#61-#67)
Page 8 = 7 posts (#71-#77)
Page 9 = 10 posts (#81-#90)
Page 10 = 10 posts (#91-#100)
(viewed as logged in admin)

Like I said before, it's not important or a problem, more a curiosity.

Antechinus

Quote from: Dave J on April 15, 2025, 04:49:13 PM
Quote from: Kindred on April 15, 2025, 09:36:47 AMDave J --  that's not the section that the OP was asking about....    the OP was asking about the ACTUAL "recent posts" page (?action=recent)

Ah I see. Well the info I gave might be useful to someone, even if it was slightly off the topic :)
Just be aware that the recent posts block is one of the biggest performance hits on the board index page. That's why it's set to a low number by default: to keep it safe for everyone.

If your server/site can run a large number there, that's fine, but it may not suit everyone. Also, if you do run into problems with server load at any time, temporaily disabling recent posts on the board index is one easy measure to take.

Advertisement: