News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Lock thread after x replies

Started by ScousePete, September 30, 2006, 02:03:53 PM

Previous topic - Next topic

ScousePete

Is it possible to lock a thread after x number of replies? x would need to be variable per thread.

I have a board that I use as a kind of sign-up site for volunteering shifts. We only need a specific number of people per project. Once the alloted number of people have signed up, the thread would close. I saw something similar for phpbb, but it  could only be configured on a per forum basis, not per thread.

Anyone up for the challenge?

codenaught

Do you mean after a topic has x replies it will be locked automatically or more like a moderator clicks a button such as "Lock this topic after x more replies have been made"?
Dev Consultant
Former SMF Doc Coordinator

ScousePete

Quote from: akabugeyes on September 30, 2006, 10:08:57 PM
Do you mean after a topic has x replies it will be locked automatically or more like a moderator clicks a button such as "Lock this topic after x more replies have been made"?

Thanks for replying. Either way would work. Initially I thought it would be best to select the option when the post is first made, but a moderator button would work as long as x could be variable.

codenaught

Okay, well it would really simple if you wanted a topic to be locked after x amount of posts were made to it. But if that is something you would want, do you want the x to be configurable per board or make it configured to a forum wide setting? Perhaps I can make the mod work so that it can be both. "0" would be used for a board to use the default setting limit, and if a specfic board uses an number other than 0, it would use a custom number of posts for a topic to be locked in that particular board.
Dev Consultant
Former SMF Doc Coordinator

ScousePete

Quote from: akabugeyes on October 01, 2006, 11:38:28 AM
Okay, well it would really simple if you wanted a topic to be locked after x amount of posts were made to it. But if that is something you would want, do you want the x to be configurable per board or make it configured to a forum wide setting? Perhaps I can make the mod work so that it can be both. "0" would be used for a board to use the default setting limit, and if a specfic board uses an number other than 0, it would use a custom number of posts for a topic to be locked in that particular board.

The option to switch it on and off would be in the ACP. The variable (x) would need to be selected per thread. Kind of like this...


codenaught

Oh okay. That could be done too. I will take a look into this when I get the chance to.
Dev Consultant
Former SMF Doc Coordinator

ScousePete

Thanks so much, I appreciate your help.

ScousePete

Quote from: akabugeyes on October 01, 2006, 01:19:32 PM
Oh okay. That could be done too. I will take a look into this when I get the chance to.

Any update on this?

codenaught

I started work on the mod. Hopefully it won't take me too long to finish.
Dev Consultant
Former SMF Doc Coordinator

ScousePete

Quote from: akabugeyes on October 06, 2006, 04:09:03 PM
I started work on the mod. Hopefully it won't take me too long to finish.

Do you need any help beta testing? I have set up a test forum using easyPHP and would be happy to help any way I can.

MoreBloodWine

I'll gladly help beta test myself as I think this to be a very nice mod if made to work like the pic above shows heh...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


MoreBloodWine

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


codenaught

I am afraid I don't anticipate having the time to do this until the weekend. But when that comes hopefully I can release something that you guys can test.
Dev Consultant
Former SMF Doc Coordinator

MoreBloodWine

Quote from: akabugeyes on October 18, 2006, 06:07:00 PM
I am afraid I don't anticipate having the time to do this until the weekend. But when that comes hopefully I can release something that you guys can test.
I dont know about anyone else but I'm not really in any rush... but if I may are you implementing or will be implementing a permission for this so it can be set on a group basis...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


codenaught

Frankly I figured that using the current lock topic permission would do just fine. You feel it needs a separate permission?
Dev Consultant
Former SMF Doc Coordinator

MoreBloodWine

#15
Quote from: akabugeyes on October 18, 2006, 06:20:43 PM
Frankly I figured that using the current lock topic permission would do just fine. You feel it needs a separate permission?
It might when you think about it bec there would probably conflicting issues with the permissions...

1. Lock Topic
2. Lock Topic after x replies

Some might not see it but I see that without seperate permissions meaning a new one for this specific mod might cause some problems for some people...

Edit : Some people might wana lock it after the reply thing but some might wana just lock it outright... and theres your issues... but ya I personally feel a new / seperate permission for this would be a good idea... as I'm hoping you and others will as well...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


ScousePete

Quote from: akabugeyes on October 18, 2006, 06:20:43 PM
Frankly I figured that using the current lock topic permission would do just fine. You feel it needs a separate permission?

For me, anyone who can lock a topic would be permission enough.

Thanks

MoreBloodWine

But my whole point on this was some people might wana lock a topic outright without waiting for replies whhile others would wana lock a topic after x amt of relies... so thats why I feel a seperate permission for this would be a good idea... like seen in the pic someone posted where you se both options to lock topic and lock topic after x replies...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


codenaught

Sorry about the long wait. I have been pretty busy lately and haven't had so much time to work on this. I also got a bit stuck on some javascript I was going to use for the mod (basically including javascript, but making the mod still work if javascript was disabled on the browser). I may just abort the javascript idea if I can't find another way. It was to have it look like this:

[ ] Lock this topic. After [  ] more replies.
Where the "After" part you would enter the number you wanted but it would be disabled through a simple html disabled="disabled" until the Lock this topic was checked. Although now that I think about this more, that wouldn't work so well, because if the topic was already locked from beforehand you wouldn't really want to input the "After [   ]" unless you were to unlock the topic. Maybe I can check the topic's lock status prior to showing the "After [  ] more replies" part of it and if the topic is already locked to not show it.
Dev Consultant
Former SMF Doc Coordinator

MoreBloodWine

#19
Quote from: akabugeyes on October 27, 2006, 09:44:05 PM
Sorry about the long wait. I have been pretty busy lately and haven't had so much time to work on this. I also got a bit stuck on some javascript I was going to use for the mod (basically including javascript, but making the mod still work if javascript was disabled on the browser). I may just abort the javascript idea if I can't find another way. It was to have it look like this:

[ ] Lock this topic. After [  ] more replies.
Where the "After" part you would enter the number you wanted but it would be disabled through a simple html disabled="disabled" until the Lock this topic was checked. Although now that I think about this more, that wouldn't work so well, because if the topic was already locked from beforehand you wouldn't really want to input the "After [   ]" unless you were to unlock the topic. Maybe I can check the topic's lock status prior to showing the "After [  ] more replies" part of it and if the topic is already locked to not show it.
Just make it so it looks / works like this... individual permissions so all you'd be doin is make a mod that just adds a new permission to lock after x replies...

Edit : Personally I think that would be the best way to do it... just make a mod that adds the new permission... so youll see something like the below pic... assumin you have the permission to ... lock after x replies...

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Advertisement: