Advertisement:

Author Topic: Post Limit  (Read 11547 times)

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Post Limit
« on: February 11, 2013, 07:30:41 PM »
Link to Mod

Post Limit mod
by: Suki

License
Code: [Select]
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
 * If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/

Description

This mod allows you to set a per user post limit, the limit is set per day. If the user is approaching his/her limit, there will be a message informing them about it, you can configure this message with some predefined vars: {username} {limit}.

You can set a permission for members to be able to set limits on other users, admins cannot be limited.

This mod needs PHP 5.2 or higher.


for SMF 2.0.x only

Laguage
-English


ChangeLog

-28/06/12
   Initial release
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline nattasan

  • Newbie
  • *
  • Posts: 6
Re: Post Limit
« Reply #1 on: February 16, 2013, 04:12:02 AM »
Could you please guide me how to use this mod.

i use SMF 2.0.4

i already install this mod, but i didnot see anything to set number post per day?

Best Regards,
Nattasan
« Last Edit: February 16, 2013, 04:25:13 AM by nattasan »

Offline nattasan

  • Newbie
  • *
  • Posts: 6
Re: Post Limit
« Reply #2 on: February 16, 2013, 09:12:44 AM »
Could someone please guide me how to use this mod.

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #3 on: February 16, 2013, 09:26:37 AM »
Could you please wait a little? you posted at 3am in my local time...
and bumping in 5 hours isn't gonna help either...

Go to this url:  action=admin;area=postlimit this is the admin page.

if you want to set a limit, go to the users profile and you will see another item in the menu:  action=profile;area=userlimit  thats where you set the per-user limit.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline rajupatel

  • Semi-Newbie
  • *
  • Posts: 96
Re: Post Limit
« Reply #4 on: February 16, 2013, 11:38:19 PM »
Could you please wait a little? you posted at 3am in my local time...
and bumping in 5 hours isn't gonna help either...

Go to this url:  action=admin;area=postlimit this is the admin page.

if you want to set a limit, go to the users profile and you will see another item in the menu:  action=profile;area=userlimit  thats where you set the per-user limit.
i got ur url ..but I have error.."Fatal error: Call to undefined method PostLimitTools::__ destruct() in /home/ u366554108/public_html/ Sources/PostLimit.php on line 408" how to set limit.

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #5 on: February 17, 2013, 09:17:34 AM »
ugh, that somehow slipped up from the dev branch...

Open your Sourcesdir/PostLimit.php find this:

         /* Force a new instance */
         self::tools()->__destruct();

and remove.


Mod has been edited.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,562
  • Gender: Male
    • DiegoAndresCortes on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Post Limit
« Reply #6 on: February 18, 2013, 12:56:30 PM »
Nice mod, thanks

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline davejo

  • Jr. Member
  • **
  • Posts: 371
    • Dave's Hobby Workshop
Re: Post Limit
« Reply #7 on: February 18, 2013, 02:31:31 PM »
Hi Suki,

Thanks for this mod it installed perfectly and does exactly what I want it to do.

I have a question:

At the moment I can only add the ID's of 8 boards that I want to add limits too (see attachment). Is there anyway to increase that amount please?

I have 20 board ID numbers I want to add so an allowance, larger than that for additional new boards, would be ideal.

If it's just a case of a code change, that's fine I can do that.

Thanks for any help.

Dave
If you want 'Quiz' questions Click here
Quiz Test Site Link

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #8 on: February 18, 2013, 07:20:41 PM »
Never really thought about that field length to be honest but it is a simple code change.

On your Themes/default/PostLimit.template find this:

size="25" tabindex="1" maxlength="25"  and change both 25 to whatever number you need.
« Last Edit: February 19, 2013, 08:44:37 AM by Suki »
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline davejo

  • Jr. Member
  • **
  • Posts: 371
    • Dave's Hobby Workshop
Re: Post Limit
« Reply #9 on: February 19, 2013, 02:54:59 AM »
Thanks very much Suki
If you want 'Quiz' questions Click here
Quiz Test Site Link

Offline glennmckenna

  • Jr. Member
  • **
  • Posts: 278
Re: Post Limit
« Reply #10 on: February 19, 2013, 10:58:37 AM »
could you use this mod for limiting the amout of posts a guest can do per day ?

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #11 on: February 19, 2013, 11:02:54 AM »
No, guest do not have a unique ID and there is no reliable method to distinguish one guest from another.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline davejo

  • Jr. Member
  • **
  • Posts: 371
    • Dave's Hobby Workshop
Re: Post Limit
« Reply #12 on: February 19, 2013, 12:16:29 PM »
Never really thought about that field length to be honest but it is a simple code change.

On your Themes/default/PostLimit.template find this:

size="25" tabindex="1" maxlength="25"  and change both 25 to whatever number you need.

That is perfect Suki thank you
If you want 'Quiz' questions Click here
Quiz Test Site Link

Offline glennmckenna

  • Jr. Member
  • **
  • Posts: 278
Re: Post Limit
« Reply #13 on: February 20, 2013, 04:17:31 PM »
No, guest do not have a unique ID and there is no reliable method to distinguish one guest from another.
ok thanks for the info

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #14 on: March 04, 2013, 06:56:23 PM »
Mod has been updated, added code to remove the scheduled task when uninstalling, thanks to Bugo for the reminder.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic

Offline akbora

  • Sr. Member
  • ****
  • Posts: 960
    • Anında Tepki
Re: Post Limit
« Reply #15 on: April 13, 2013, 03:31:56 PM »
Very good mod. I need to see all member who limited messages? How can I do? Thanks
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Offline hocs22

  • Jr. Member
  • **
  • Posts: 252
Re: Post Limit
« Reply #16 on: July 24, 2019, 12:49:27 PM »
is it per day?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,495
  • Gender: Male
    • i30 Owners Club
Re: Post Limit
« Reply #17 on: July 24, 2019, 12:52:58 PM »
is it per day?


Difficult to say, based on the mod description  ::)

.... the limit is set per day ...

Offline KittyGalore

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 60
    • Big Brother TV Backup
Re: Post Limit
« Reply #18 on: December 28, 2019, 12:02:59 PM »
Would be nice to get this updated getting errors where guests get this error.

Call to a member function params() on null

8: Undefined property: PostLimit::$_dbApply Filter: Only show the errors from this fileFile: /****/****/public_html/Sources/PostLimit.php
SMF Curve 2.0x

Offline Suki

  • Carthago delenda est
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,699
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Post Limit
« Reply #19 on: January 06, 2020, 04:04:10 PM »
Make sure you have this file: Subs-PostLimit.php  on your Sources folder, if not, download the mod, extract it and upload that file.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

No todos son tan malos, no todo está mal
No todos son villanos queriéndote matar
No todo está perdido ni se va a acabar
La vida es un pícnic