The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Reply request....
I got a hack request for anyone.
I been searching for a way to limit the ammount of replies to a thread. Example: For only specified forum id such as 5 , 7 ,18 and 30 When a user is posting a thread there is an extra field called "Max replies". They can fill it in and put a number between 1 - 50. They post thier thread. And the first whatever users replied can reply but after the limit is reached it displays a message stating maximum replies have been reached for this thread. An example of how this would work would be somthing like this. I'm on my board and i just made a song for all my fans. I put the song as a hidden link in my post and ask that users reply. (Already have a hide hack installed) The first let's say 20 people who reply get to download my song. But after that all other users will get a message of "your too late!" Anyone help me with this? I found some old 2.x code on this site that might help.... Code:
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 ))) { $posts=$DB_site->query_first("SELECT COUNT(*) AS replies FROM post LEFT JOIN thread USING (threadid) WHERE post.userid=$bbuserinfo[userid] AND thread.forumid IN (13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 ) AND post.dateline > ".(time()-3600)); if($posts[replies]>=10) show_nopermission(); } Thanks alot! |
#2
|
||||
|
||||
so basically close a thread after X replies?
|
#3
|
||||
|
||||
Try this (ported from the above code, untested, but theoretically it should work):
PHP Code:
PHP Code:
|
#4
|
|||
|
|||
Quote:
More or less....Summed up short yes that's what i want.... (sorry different username....) |
#5
|
|||
|
|||
Quote:
This will stop the posts at 10 but for some reason it does 10 posts per person.... KB |
#6
|
||||
|
||||
Erm ... yep.
If you want x posts/user you will need the query. But from you first post I thought you wanted a general x posts limit, therefore I included the 2nd snippet. |
#7
|
|||
|
|||
Quote:
Not to mention the code above is set for a certain time limit.... |
#8
|
|||
|
|||
i don't see why users themselves would have the control on how many replies they want for any thread... admin option is already possible with this hack:
https://vborg.vbsupport.ru/showthread.php?t=60059 this is per-forum based so you can set each forum to have a limit of replies per thread... this is basically what you search for i think... |
#9
|
|||
|
|||
Quote:
Ok let me try that.....Last question is how hard is it to add the box for the newthread.php. To let the users specify how many replies there are allowed |
#10
|
|||
|
|||
that just may work thanks alot....
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|