[WIP] Limit topic length

Started by emanuele, March 21, 2012, 09:05:06 AM

Previous topic - Next topic

emanuele

That's something I wrote a while ago and forgot about (I wrote it something like 5 months ago).
Please consider it a beta, don't know exactly how badly it could break your forum! :P

The idea is give the possibility to set a limit to the maximum number of posts in a topic.


  • It's possible to set the number of replies after which the topic is locked and a new one is created.
  • It's possible to set a custom message for the "locking post" and for the new opening post.
  • The last message is created as a guest ('s possible to customize the name).
  • The new first message is posted as the original author of the topic, but I set to not increase the post count.
  • In the subject of the "new topic" the number of the topic in the series is reported (e.g. "[1] my topic", [2] my topic", and so on) the number is saved in one of the new columns of the table topics.
  • If anyone post in one of the old topics of the series the post is automatically moved to the most recent topic. There is still a glitch because it goes to the preview and it doesn't post automatically. ATM I'm not sure how to fix it...and if it should be fixed...
Known issues:

  • I know there is at least 1 major problem when a "in between" topic is moved to an area where the posting member cannot post and if one of these topics is deleted.
Possible issues

  • I tried to move all the settings to the new topic (poll, notifications, approval state, if the topic is locked, etc.), it's possible I missed something.
The mod adds 3 columns to {db_prefix}topics. In fact only 2 are really necessary at that time, the third one is there for an improvement I would like to add later (only problem is that now I don't remember any more what this improvement was... ::)).

Bug reports, advices, suggestions or idea for improvements are (as usual) welcome! ;D


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

All Colours Sam

Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Matthew K.

Sounds sweet...nice features too :) Innovation.

emanuele

Thanks! :)

Not a lot of innovation in that one. Just a bit of code put together.

BTW, I'll submit it sooner or later, so be prepared! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

All Colours Sam

Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

emanuele

* emanuele likes see other people suffer! >:D


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

All Colours Sam

if ($mod->author == 'emanuele')
   $mod->Reject();


* Suki runs!
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: