jForum 2.3.4 patches
I became moderator of a site running version 2.3.4 just to discover that moderators and admins are actually stressed by limitations of jForum. I’ve decided to spend some time and put together a collection of patches that would sort out some of the most annoying things.
I will continue to update this page with other patches whenever I have them ready ..
Also, the patches should be applied in sequence, one after each other, but so far the functionality of each one is independent so with little effort they can be applied individually.
Patches are available also under BSD Open Source license.
Patch 1: disable Captcha for Admins and moderators:
This adds a new entry in the Admin Control Panel, with the default value set to “False”.
Patch 2: rate limiting for forums which people abuse “up!” messages to get the sale:
This is more complex to describe. Some people do not contribute to the community, they are just using the forum to sell stuff. Also, some people will abuse “Up!” messages so that they’re always on the top of the forum. And this breaks the feeling of the community, when lots of recent messages are just “Up!” or “You have a PM!” or etc.
The patch allows you to specify which forum ids will be put on “Auto Lock” mode, meaning that all new topics will be automatically closed – preventing new replies.
Also, to limit creating new topics, there’s another setting saying how often a new topic should be allowed.
Sticky topics (if you give this permission to the normal users) are avoided – so that people that have Admin approval can post freely. As said, only creation of new topics in the given forums is forbidden, any other post somewhere else (or in the same forums, if some thread is not locked) is allowed.
Patch 3: Fix for notifications being sent even if the topic is now moved to restricted area:
One issue was encountered where a topic was moved to a restricted area for Administrators however, normal users still received topic updates, including the replies of the Admins on to a topic where the user is supposed not to have access to.
This patch fixes the issue. However, if the summaries are enabled, the users will still receive the messages – that part is not patched because Summary functionality is not used so I have not investigated. Summary is disabled by default anyway, so please check
Patch 4: Hide shadow topics:
jForum 2.3.4 seems to have very few controls that more advanced forum engines offer. One of the lacking one is hiding the shadow copy of a moved topic. The way it is implemented is that each topic keeps an
int with the forum id from where it is moved. Two problems with this:
a) you can’t delete the shadow copy as it is actually “faked” and shown in the source forum also … but they are the same topic.
b) if you move the topic to a reserved area, the shadow is still rendered in the source forum even if no normal user will have access to the topic anymore.
With this in mind, the following patch fixes the behavior by disabling the “fake”. Please make sure you apply the patch for
config_list.htm too, as it might be reported as a failed patch, well, it is just a bug in Eclipse .. the patch is correct.
If you toggle the flag at runtime, caches have to be reloaded otherwise the topics will still be shown / or not shown based on the values in the cache.
Also it would have been easier to create a new SQL entry and execute that instead (depending on the flag value), I chose the solution of keeping the
forum_id = ? OR topic_moved_id = -1 since minimal changes are then needed to fix the problems and thus the patch will be easier to be applied to future releases.
Patch 5: Limit edit time for the posts:
This patch fixes another limitation of jForum, one that disables editing of the posts after a certain time. It adds a new entry in the “Admin Configuration Panel” allowing you to specify the allowed edit time, in minutes. You can set it 0 to allow infinite edit time.
Administrators / Moderators have unlimited edit time granted by default.
Patch 6: Disable Private Message Notification via email if user chose not to
There is a bug in jForum 2.3.4 and even if the user selects not to be notified of private messages via email, well, the notification is still sent. The patch below corrects the behavior:
Patch 7: Topic split for jForum
One of the most requested features for jForum was the ability to split the topic. The patch below implements this behavior.
How it woks:
1. the new topic will not contain any poll found in the initial topic.
2. first post cannot be split.
3. a user with the MOVE permission is also allowed to split the topic. The new topic is created directly, without being submitted for approval first.
4. email notifications are kept (if somebody chosed to follow the old topic and its post is split, then the user will receive notifications from the new topic too, automatically). If the same user still has remaining posts in the old topic, he will continue to receive notifications from the old topic too. If the user does not have any remaining posts in the old topic, then his notification is automatically canceled.
5. new topic is not made sticky, even if the old one was.
6. The time of the new topic is the time of its first post. All posts keep their original time and their “Last Modified By” is conserved.
7. Posts with attachments are moved even if the destination forum has attachments disabled.
8. Locked topic can be split, but the new one is not automatically locked.
9. UI validation in place (subject, destination forum and at least one post have to be specified)
10. Moderation log contains a links to both topics.