Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Sono on December 16, 2020, 02:19:09 PM

Title: How to remove "Recent Posts" manually
Post by: Sono on December 16, 2020, 02:19:09 PM
I know you can remove Recent Posts if you set their number to 0, but I have a mobile theme installed, and interestingly even if I set the number to 0, it still displays the Recent Posts. Where can you remove the queries that checks the recent posts and display them? I want to check them so that I can search for similar ones in the mobile theme and remove manually. I want to do it to make my forum faster.
Title: Re: How to remove "Recent Posts" manually
Post by: shawnb61 on December 16, 2020, 02:25:37 PM
Alternate suggestion - use the upshrink button.  Maybe change its default, so it's up by default.
Title: Re: How to remove "Recent Posts" manually
Post by: Kindred on December 16, 2020, 03:20:53 PM
Thing is... the recent posts are not searched for in the THEME....    they are loaded into an array in a SOURCES file, the THEME (template) files just call the contents of the array.

The recent posts is part of the infocenter. You can remove the DISPLAY code from Boardindex.template.php...    however, it won't "speed up" anything since you're only removing the display.
Title: Re: How to remove "Recent Posts" manually
Post by: Sono on December 17, 2020, 02:22:20 PM
I managed to solve this. Interestingly, I had to go to the Admin separately in the desktop and mobile theme as well, and set Recent Posts to 0 in both. When I set it only in one of them, it had no effect on the setting in the other theme. I don't know why it is so, but probably because my mobile theme is not 100% a usual theme, I had to install it as a mod, not as a theme.
Title: Re: How to remove "Recent Posts" manually
Post by: Kindred on December 17, 2020, 03:02:42 PM
well, the NUMBER is set in the THEME settings, so yes...    setting it on one theme won't affect other themes.
Title: Re: How to remove "Recent Posts" manually
Post by: Sono on December 17, 2020, 08:43:24 PM
So when the number is set to 0, is it still looking for recent posts anyway, or in this case the process is stopped? So is this the way to gain some speed, or you need to kill the process loading the stuff into the source file?
Title: Re: How to remove "Recent Posts" manually
Post by: Kindred on December 17, 2020, 10:28:14 PM
What speed do you think you will gain?
Title: Re: How to remove "Recent Posts" manually
Post by: Sono on December 18, 2020, 07:41:35 AM
On some old mobile devices the typing is slow. Slower than in case some other sites, like Gmail, for example. I want to speed thigs up to make typing not to lag that much.
Title: Re: How to remove "Recent Posts" manually
Post by: Aleksi "Lex" Kilpinen on December 18, 2020, 07:50:45 AM
That would sound like a problem with the theme vs. the phone's capabilities - nothing you can really fix by removing functionality in SMF.
Title: Re: How to remove "Recent Posts" manually
Post by: Sono on December 18, 2020, 08:32:53 AM
Could you at least suggest wich directions to go, what to check in case of the theme then? It is a simple theme, non animated, why is it lagging then on typing? I guess, the typed text is not forwarded in real time to the database before you submit it, so I assume no processes are happening during typing. So why is it still lagging? ;D :D
Title: Re: How to remove "Recent Posts" manually
Post by: Aleksi "Lex" Kilpinen on December 18, 2020, 08:36:17 AM
Quote from: Sono on December 18, 2020, 08:32:53 AM
Could you at least suggest wich directions to go, what to check in case of the theme then?
Not really, can't help much as I don't know your theme or the phone, or why it is lagging - I can say that I know some older phones have real problems with certain input boxes, and that's just the way it is.

Quote from: Sono on December 18, 2020, 08:32:53 AM
I guess, the typed text is not forwarded in real time to the database before you submit it, so I assume no processes are happening during typing. So why is it still lagging? ;D :D
Yeah, you hit the nail on the head there - Typing a post, does nothing more than show letters on your screen, until you actually press a button to post, preview or spell check.
That is why you can't really do much on the SMF side - The problem is with the phone.