News:

Join the Facebook Fan Page.

Main Menu

Post Limit

Started by All Colours Sam, February 11, 2013, 07:30:41 PM

Previous topic - Next topic

Dave J

The server log has no errors in it Suki.

Yes I don't know what the issue is either

All Colours Sam

#81
Hi, while testing another mod I stumbled upon an error related to this mod, a silly one where I forgot to include yet another file when running the scheduled task via cron.

I temp attached a new version, I'm somehow reticent to submit it on the mod site due to it still been  tested but hopefully all issues has been sorted out.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

All Colours Sam

new version released:

1.1 Dic 2024
- Add support for SMF 2.1
- Remove the global limit setting
- Add sending an alert when user is reaching his/her limit
- Re-write the logic to simplify the process of limiting an user
- Use the permissions hook to apply a limit
- All hooks, no code changes
- Add support for other mods using the integrate_after_create_post hook to make sure our check is applied after their logic
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Dave J

#83
Hi ACS (Suki)

I installed this on my test site and it went OK. What I did fid however were differences in the 'username' entries on the settings page and in the 'PostLimitService.php'. For some entries you have
{username} and other entries are
{user_name}.

I changed all instances of
{username} to
{user_name} on the settings page, I also changed the code on line 84 in the 'PostLimitService.php' from
'username' => $userName,to
            'user_name' => $userName,.

If you look at the attached you will see the old mod results and new results.

One last thing when the mod is uninstalled not all settings are removed from the database. See image (settings db post limit.png) what's left in the 'smf_settings' table.

I'm not getting any errors on my localhost 2.1.4 install with 'SMF Quiz' and 'Login Menu Button' using the default SMF curve theme on PHP7.4 (I have to use that as I also have a 2.0 test site on the same database)

I will test now on a web hosted site using PHP8.2.27

Update: Tested on webhosted site using PHP8.2.27 and all working OK. See images testing1/2

I have attached the mod that I've altered to this post also


All Colours Sam

Hi, thanks for the QA! will make a new version for it but I would like to wait a little bit more in case something else is found.

Regarding settings not been removed on uninstalling, thats expected SMF behavior or at least it was, back in the day the reason for leaving settings on the DB was all about comfort for the admin and since theres no real harm on keeping them most if not all mods leave their settings when uninstalled.  If more people request for the settings to be removed on uninstall I will add that.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Advertisement: