Hi folks,
On the discussion module, is it possible to reduce the amount of recent forum posts and most popular that appear at the top of the page forum home page?
Many thanks,
- Stephen
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 09, 2012 2:39pm
Subscribe [2]#1 / Apr 09, 2012 2:39pm
Hi folks,
On the discussion module, is it possible to reduce the amount of recent forum posts and most popular that appear at the top of the page forum home page?
Many thanks,
- Stephen
#2 / Apr 10, 2012 11:30am
Hi Stephen,
Customizing the Forums can be tricky! However, I am happy to help in anyway I can.
What forum theme are you using? Can you post a screenshot of the totals you would like to change? I couldn’t see them in my test installation using the Default theme.
If you can show me where you want to make the change, I can see if it’s possible.
Cheers!
#3 / Apr 11, 2012 7:49am
Hi Dan,
Thanks, attached a screenshot of the area I am trying to change.
The template I am using is a direct copy of the Developer template provided with the module. I am in the process of going through it and adapting it further, but essentially, what you are seeing here, the code is basically identical to that provided in the Developer template. The only difference is, I’ve removed the containing table from both of these tables, that normally makes them sit side by side. Naturally the look is quite different, but this has more to do with the CSS than any serious changes to the template code at this point.
I am trying to reduce the amount the recent posts and popular posts show, down to say, 4 or 5 as it takes up far to much screen space, even when they are side by side.
I appreciate I could probably use CSS3 to achieve this by individually hiding each Nth row etc, but this is a bit clunky and I’d rather actually just have the code throw up less items. It is something I’d like to tweak in the control panel, but there is no way to do it.
I’m on the latest Forum module and EE version.
Many thanks
- Stephen
#4 / Apr 11, 2012 3:52pm
Hi Stephen,
Thanks for the screenshot, that lead me right to an answer.
This can’t be set through the templates. A limit of “30” is hardcoded in the functions that call most popular and most recent.
In /system/expressionengine/modules/forum/mod.forum_core.php you will find:
most_popular_posts() - near line 10577
and
most_recent_topics() - near line 10428I can’t tell you to edit these limits, but that’s where they are.
Let me know if you have any other questions!
Cheers,
#5 / Apr 11, 2012 6:57pm
Thanks Dan, No problem, I will go through it tomorrow and play with it. I already changed the Gifs for the icons, to PNG in that file, so I’ll look for the popular posts. Many thanks.
#6 / Apr 12, 2012 3:23pm
Hey Didden,
Did you get a chance to try that out? Thoughts?
Thanks,
#7 / Apr 13, 2012 12:47am
I’ll have time today Shane, and let you know 😊
#8 / Apr 14, 2012 7:38am
Thanks gent’s
This worked great, and now just shows 5. Many thanks!
For future release, would it be possible to have this as part of the preferences? Also, would it be possible to define the different forum icons from the preferences rather than have them hardcoded as .GIF’s. PNG is the transparency image of choice these days, but appreciate you need to be backwards compatible. It would just be far easier to define these icons in the preferences. But not real complaints, editing the mod is no biggie.
Many thanks,
- Moon
#9 / Apr 17, 2012 12:36pm
Hello Didden,
Glad to hear it!
For any of the items you mentioned, please feel free to file a Feature Request.
If you need anything else, please just let us know by opening a new thread.
Cheers,