Advertisement:

Author Topic: modifying RECENT posts  (Read 2264 times)

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
modifying RECENT posts
« on: August 05, 2017, 10:55:07 PM »
id like to modify my recent posts to show more then 10 posts per scrollable page
as it is - it paginates to 10 pages... with 10 posts per page..
id like to modify it to show MORE recent posts than 100.. over a smaller amount of pages

ie: maybe the most recent 250 post in 5 pages of 50 results each

is this possible?>

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com

Offline br360

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,398
    • GenXcommunity
Re: modifying RECENT posts
« Reply #2 on: August 05, 2017, 11:03:44 PM »
You can do this by going into Admin>>Configuration>>Current Theme

Scroll down and look for Number of recent posts to display on board index:

Change that number to whatever you want

Offline br360

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,398
    • GenXcommunity
Re: modifying RECENT posts
« Reply #3 on: August 05, 2017, 11:15:55 PM »
Actually, I misread what you were trying to accomplish. Take a look at this link instead ;)

https://www.simplemachines.org/community/index.php?topic=250894.msg1627457#msg1627457

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #4 on: August 06, 2017, 12:01:57 AM »
http://www.oldschooldaw.com/forums/index.php/board,128.0.html

also another question i have is there any way to parse the titles of these for the (198x) string and make them list the titles in order chronologically????

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #5 on: August 06, 2017, 10:09:49 AM »
i can edit everything fine on the recent.php source file but it doesnt work past 100 posts still
something is stopping it from working
i can change the number of posts displayed per page
but it always stops at 100 results and if i click the page that would start at 100 it just shows the last page before that
ie:
http://www.oldschooldaw.com/forums/index.php?action=recent;start=100
try to click "11" and it will go back to "10" because i cant get it to go past 100 posts...

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #6 on: August 06, 2017, 05:02:44 PM »
please can someone help me tackle this?

Offline Illori

  • Lead Support Specialist
  • SMF Legend
  • *
  • Posts: 52,884
Re: modifying RECENT posts
« Reply #7 on: August 06, 2017, 05:04:58 PM »
please dont bump within 24 hours, we are all volunteers and we will respond if and when we know the answer.

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #8 on: August 06, 2017, 05:31:49 PM »
ok but to be clear:
id like to modify my request
i would be happy to keep it at 10 results per page
if i could make the number of pages be higher than 10
ie: the latest 400 posts results paginated
rather than the latest 100 posts results paginated

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,278
  • Gender: Male
    • Kindred-999 on GitHub
Re: modifying RECENT posts
« Reply #9 on: August 06, 2017, 06:49:42 PM »
I don't think that you understand what you are asking for.

The "recent posts" request is one of the most "expensive" database requests (in terms of server processing power)
This has been PURPOSEFULLY limited to avoid overloading servers... and having people's accounts suspended by hosts for overuse of shared system resources.
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."

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #10 on: August 06, 2017, 07:11:12 PM »
ok i didnt know that to be honest -- i just wanted to be able to review all the latests posts PAST the lastest 100
so i can view recent activity like one would view an RSS FEED of content

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #11 on: August 06, 2017, 07:12:19 PM »
even if it was only doubled from 100 to 200 - this would be ideal for me
but (so far) i cant figure out how to change the number of results
im trying to read the code right now


Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #12 on: August 06, 2017, 08:57:18 PM »
cant anyone direct my attention to the statements or line numbers i need to edit to change how many results to fetch??
i cant figure out how its picking only 100 results.. i want to double the results ammount so i can review my latest 200 posts instead of 100 (20 pages of results not 10)
its 1300 lines of code
im trying to take it all in but someone here must know better than i

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,278
  • Gender: Male
    • Kindred-999 on GitHub
Re: modifying RECENT posts
« Reply #13 on: August 06, 2017, 09:18:35 PM »
It is being limited in the database query itself...  and the change thatbyou want is still not recommended
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."

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #14 on: August 06, 2017, 09:43:08 PM »
it doesnt seem to be slow on my host at all presently

Offline Illori

  • Lead Support Specialist
  • SMF Legend
  • *
  • Posts: 52,884
Re: modifying RECENT posts
« Reply #15 on: August 07, 2017, 05:02:56 AM »
it doesnt seem to be slow on my host at all presently


that does not mean it will not cause issues in the future. also by answering for you will answer for everyone and may lead to issues for others.

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #16 on: August 07, 2017, 01:08:00 PM »
guys
i appreciate you looking out for me but..
this logically makes no sense?
because the script only requests 10 results per page or whatever
so regardless of whether it lets me request 10 results for 10 pages
or 10 results for 20 pages
theres no change in load except that the user would be able to CHOOSE to view
older content going backwards..

it's still not going to load more then 10 results per page
so i fail to see how this is a danger to server processing

im not blindly arguing to be right here,
if u have a logical point to make to illustrate the
increased load you are saying these changes propose..
please explain? because i fail to understand your reasoning
in determining this outcome

anyway in the end
ive solved my problem by commenting this line out:
/*if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
      $_REQUEST['start'] = 95; */

thanks everyone
« Last Edit: August 07, 2017, 01:27:35 PM by supernova777 »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,278
  • Gender: Male
    • Kindred-999 on GitHub
Re: modifying RECENT posts
« Reply #17 on: August 07, 2017, 04:21:15 PM »
no... the script does not make only 10 requests per page.
It requests all 100, then parses them to check if the user has access to see those posts
THEN it paginates and displays...

so, by asking for 200, you have now DOUBLED the load.
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."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: modifying RECENT posts
« Reply #18 on: August 07, 2017, 06:30:25 PM »
Plus, older content is less likely to be in current server memory, meaning it has to be loaded, and displaces content.
No good deed goes unpunished
All helpful urges should be circumvented

Offline supernova777

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • admin oldschooldaw.com
    • oldschooldaw.com
Re: modifying RECENT posts
« Reply #19 on: December 10, 2018, 09:29:17 AM »
no... the script does not make only 10 requests per page.
It requests all 100, then parses them to check if the user has access to see those posts
THEN it paginates and displays...

so, by asking for 200, you have now DOUBLED the load.

im sorry but theres no way thats how it works.. because i have more then doubled it.. and it continues to work fast with zero delay with me having bumped it from 100 to 6000.. take a look:
http://www.oldschooldaw.com/forums/index.php?action=recent;

its only processing 10 posts at a time. not hundreds or thousands -- otherwise there would be a significant lag or delay between pages.. press left + right arrow keys to jump from page to page left or right. its fast. im sorry but you must be incorrect.