MyBB Community Forums
How can I display top trending post in MyBB portal - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: How can I display top trending post in MyBB portal (/thread-225781.html)



How can I display top trending post in MyBB portal - Theowner - 2019-12-20

I want to display trending post
How can I do that on Portal


RE: How can I display top trending post in MyBB portal - [ExiTuS] - 2019-12-20

There is no option in the MyBB for your desire.

What trends do you prefer displaying? Most replied threads or most vieved for example?
Then you can achieve this by modifying PHP code and the SQL inside, doing a modification of ORDER BY statement, e.g.:
- order by views
- order by replies
instead of standard latest posts

If you want real trends within time periods (e.g. most views within last hour), it is much more code modification.

You need to edit PHP file(s) at all.

[ExiTuS]


RE: How can I display top trending post in MyBB portal - Theowner - 2019-12-20

How can I display order by view
Please i need the tutorial


RE: How can I display top trending post in MyBB portal - [ExiTuS] - 2019-12-20

./portal.php (v1.8.21)

1) For the "Latest Threads" box:
Go to "Latest discussions" code beginning on line 367 and find the SQL statement some lines below...
"ORDER BY t.views DESC" will show the threads with most views.

2) For the main latest post list:
Go to "Latest forum discussions" code beginning on line 444 and find the SQL in line 510...
- In SELECT add "t.views" to the list of fields
- "ORDER BY t.views" will show the threads with most views.

Be aware with code changing when you're not familiar with PHP. Make a backup of this file before.

[ExiTuS]


RE: How can I display top trending post in MyBB portal - Mastersly - 2019-12-21

Check this
https://community.mybb.com/mods.php?action=view&pid=1232