phorum_get_url and most read threads
Posted by Artaud
phorum_get_url and most read threads September 23, 2008 05:38AM |
Registered: 16 years ago Posts: 25 |
hi there,
i've set up a custom phorums start page, showing some news an all forums an their last 5 recent messages.
how do i get a clean PHORUM_READ_URL on a single message_id?
my 2nd question is , how to get a list of the 10 or n most viewed threads or posts?
thx very much
sorry, wrong board, i'm running 5.2
Edited 1 time(s). Last edit at 09/23/2008 05:45AM by Artaud.
i've set up a custom phorums start page, showing some news an all forums an their last 5 recent messages.
how do i get a clean PHORUM_READ_URL on a single message_id?
my 2nd question is , how to get a list of the 10 or n most viewed threads or posts?
thx very much
sorry, wrong board, i'm running 5.2
Edited 1 time(s). Last edit at 09/23/2008 05:45AM by Artaud.
September 23, 2008 05:47AM |
Admin Registered: 20 years ago Posts: 8,532 |
For building the URL, you need the forum, thread and message ids. Then you can use the PHORUM_FOREIGN_READ_URL to build the read URL for the message:
For the second question, you will need to write some custom code. There's nothing like that built-in in the Phorum queries. You have to ask yourself what you want to show exactly. You probably want some date limited query in there, to prevent that you always show those few very often viewed long threads in there.
I have something like a "hot topics" system on my own phorum site, where I use some algorithm based on a selection of the last [x] posts in the forums. I select the last [x] messages and create cumulative counters for each thread. That way, I finally create a list of [y] threads that can be considered "hot". In this system, [x] is chosen to normally have at least up to [y] threads in the selection. That is based on trial and error. The views are also included in the computation, to combine the number of posts and the number of views in a final weight for the hotness of a thread. This is quite an arbitrary system in the end, but it works pretty well.
And now for the bad news: the system is not really usable for distribution yet, because it's based largely on my own site code and not too much on Phorum. Rewriting this code as a Phorum based system is on my big list of things to do, but for now you'd have to implement something yourself if you want this feature.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Language: PHPphorum_get_url(PHORUM_FOREIGN_READ_URL, $forum_id, $thread_id, $message_id);
For the second question, you will need to write some custom code. There's nothing like that built-in in the Phorum queries. You have to ask yourself what you want to show exactly. You probably want some date limited query in there, to prevent that you always show those few very often viewed long threads in there.
I have something like a "hot topics" system on my own phorum site, where I use some algorithm based on a selection of the last [x] posts in the forums. I select the last [x] messages and create cumulative counters for each thread. That way, I finally create a list of [y] threads that can be considered "hot". In this system, [x] is chosen to normally have at least up to [y] threads in the selection. That is based on trial and error. The views are also included in the computation, to combine the number of posts and the number of views in a final weight for the hotness of a thread. This is quite an arbitrary system in the end, but it works pretty well.
And now for the bad news: the system is not really usable for distribution yet, because it's based largely on my own site code and not too much on Phorum. Rewriting this code as a Phorum based system is on my big list of things to do, but for now you'd have to implement something yourself if you want this feature.
Maurice Makaay
Phorum Development Team



Re: phorum_get_url and most read threads September 23, 2008 06:12AM |
Registered: 16 years ago Posts: 25 |
Sorry, only registered users may post in this forum.