Module: Last Forum Post
Posted by Maurice Makaay
|
Module: Last Forum Post August 05, 2007 07:39AM |
Admin Registered: 21 years ago Posts: 8,532 |
This module keeps track of the last post that has been done in each forum (similar to the last post functionality that is already available for each thread).
The name of the last author and message subject will be made available through the template variables for the forums on the index page. These can be shown on the forum index page by modifying the template. See the installation instructions in the README file for more info.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Edited 3 time(s). Last edit at 02/28/2008 06:11AM by mmakaay.
The name of the last author and message subject will be made available through the template variables for the forums on the index page. These can be shown on the forum index page by modifying the template. See the installation instructions in the README file for more info.
Changelog:
----------
2007-07-08 v1.2.0
- Incorporated functionality as proposed by James Revillini for also
keeping track of the most recently posted subjects (before this change,
only the recent authors were tracked). Thanks to James for the primary
investigation and implementation.
- Added standard Phorum formatting to the author and subject, so things
like subject smileys work too.
- Updated the README to let the docs match the new code.
- Refactored the module to "Last Forum Post" to better represent its
new functionality.
- Added a settings screen for rebuilding the data for all forums.
2007-07-08 v1.1.1
- Honor (hidden) $PHORUM["custom_display_name"] setting.
2007-07-08 v1.1.0
- Made the module compatible with 5.2.
2007-07-07 v1.0.1
- Also store the user_id for the recent author per forum and create
the template variable {FORUMS->URL->PROFILE} for each forum, which
isset and points to the use profile if the user is a registered
user.
2007-05-19 v1.0.0
- Initial revision
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauceEdited 3 time(s). Last edit at 02/28/2008 06:11AM by mmakaay.
|
Re: Module: Last Forum Post February 15, 2008 07:40PM |
Registered: 18 years ago Posts: 81 |
Changes:
* captures more fields: user_id, author, thread, message_id, subject
* updates the last post info when the following hooks are triggered: after_post, delete, move_thread, close_thread, reopen_thread
* queries forum for the most recent message, rather than depending on data passed into the hook. this is to keep the code simple and because Mr. We-Think-Every-Microsecond-Matters thought it would be ok to hit the db since it is a single layer hit. ;)
* all functions now use global $PHORUM;
* all unneeded double quotes converted to single quotes
HUGE thanks to Maurice for all the tips on what to do, how to do it, and how to maintain the phorum code style. He never took more than an hour to get back to me either ... AMAZING.
NOTE: THE ATTACHMENT TO THIS MESSAGE IS A SUBMISSION FOR REVIEW. I WOULDN'T DOWNLOAD IT FOR A PRODUCTION WEB SITE BUT WOULD ENCOURAGE TESTING IT IN YOUR ENVIRONMENT.
Edited 3 time(s). Last edit at 02/28/2008 05:09AM by mmakaay.
* captures more fields: user_id, author, thread, message_id, subject
* updates the last post info when the following hooks are triggered: after_post, delete, move_thread, close_thread, reopen_thread
* queries forum for the most recent message, rather than depending on data passed into the hook. this is to keep the code simple and because Mr. We-Think-Every-Microsecond-Matters thought it would be ok to hit the db since it is a single layer hit. ;)
* all functions now use global $PHORUM;
* all unneeded double quotes converted to single quotes
HUGE thanks to Maurice for all the tips on what to do, how to do it, and how to maintain the phorum code style. He never took more than an hour to get back to me either ... AMAZING.
NOTE: THE ATTACHMENT TO THIS MESSAGE IS A SUBMISSION FOR REVIEW. I WOULDN'T DOWNLOAD IT FOR A PRODUCTION WEB SITE BUT WOULD ENCOURAGE TESTING IT IN YOUR ENVIRONMENT.
Edited 3 time(s). Last edit at 02/28/2008 05:09AM by mmakaay.
|
Re: Module: Last Forum Post February 28, 2008 06:10AM |
Admin Registered: 21 years ago Posts: 8,532 |
I just released version 1.2.0 of the module. I incorporated the changes as proposed by James, so this new version also keeps track of the subject of the last post in each forum.
I renamed the module to "Last Forum Post" to better match its new functionality. The name of the settings array was updated as well. If you install this module, then the data for the old "Recent Forum Author" module will be ignored and new information will be gathered when new messages get posted. A settings screen was added to make it possible to rebuild the last post information for all forums, so you can get up to speed quickly with this new module.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
I renamed the module to "Last Forum Post" to better match its new functionality. The name of the settings array was updated as well. If you install this module, then the data for the old "Recent Forum Author" module will be ignored and new information will be gathered when new messages get posted. A settings screen was added to make it possible to rebuild the last post information for all forums, so you can get up to speed quickly with this new module.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Last Forum Post May 07, 2008 10:12AM |
Registered: 24 years ago Posts: 156 |
Hi Maurice.
I have adjusted my index_new.tpl and index_classic.tpl as described in your README, but I did not see any output for {FORUMS->last_post} until now. The module is switched on and everything has been rebuilt.
This is how my "Last Forum Post" looks like today: iCalamus Phorums.
Do you have any idea what I have to check in order to see the {FORUMS->last_post} output?
Regards, Ulf Dunkel
I have adjusted my index_new.tpl and index_classic.tpl as described in your README, but I did not see any output for {FORUMS->last_post} until now. The module is switched on and everything has been rebuilt.
This is how my "Last Forum Post" looks like today: iCalamus Phorums.
Do you have any idea what I have to check in order to see the {FORUMS->last_post} output?
Regards, Ulf Dunkel
|
Re: Module: Last Forum Post May 07, 2008 10:28AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: Last Forum Post May 07, 2008 11:17AM |
Registered: 24 years ago Posts: 156 |
|
Re: Module: Last Forum Post May 07, 2008 12:02PM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: Last Forum Post May 07, 2008 04:38PM |
Admin Registered: 21 years ago Posts: 8,532 |
{FORUMS->last_post} is not touched by the module and it should show up if you put that in your template.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Last Forum Post May 08, 2008 02:19AM |
Registered: 24 years ago Posts: 156 |
|
Re: Module: Last Forum Post May 08, 2008 02:24AM |
Admin Registered: 23 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.
