View Full Version : limited forum access by post counts
scsa20
06-11-2002, 11:38 PM
I don't know if anyone made a hack of this, but I'll post it anyways....I want a hack that you can set in the Forum Permission or in the Forum editing options (more likely that) that you can set the number of post needed to post in the forum you set it too....can anyone make this?? thanks.
Dark_Wizard
06-11-2002, 11:50 PM
I'm a little confused...how do you set a minimum post count to a forum to access it and yet you can't post to it because you don't meet the minimum posts required? Please explain further....
scsa20
06-11-2002, 11:56 PM
wow, I thought I explained it, I guess not......okey, here, I'll brak it down:
lets say I have a forum called "Super Helper" under the catorory of PCs
now lets say I want them to have at least 5 posts before they can start a thread in "Super Helper"
I set it up while making the forum
If the user is under 5 post, he can't start a thread, and if he trys, he gets a error message saying he needs this much posts before posting in that forum.... but he can post replys in a thread that's in that forum.
If the user's posts is over 5, then he could start a thread.
is that a bit clearer??
cdcopyworld
06-12-2002, 09:26 AM
scsa20 i know what you mean and im also looking for a hack that does this.
cheers
scsa20
06-13-2002, 06:57 AM
*"1 day bump.......next bump is 2 days from now (which is Sat.)"*
* scsa20 bump this because me want this :rolleyes:
afterlab
06-13-2002, 08:37 AM
I can make it, but would you want it usergroup based.. Or individual user based?
scsa20
06-13-2002, 01:34 PM
usergroup base
thank you
Kilroy
06-13-2002, 06:49 PM
also looking for this one
Logician
06-14-2002, 09:56 AM
newthread.php find:
// auto bypass queueing for admins/mods
Before that add:
if ($bbuserinfo[usergroupid]==X AND $bbuserinfo[posts]<Y)
{
show_nopermission();exit;
}
(Set X for the user group, Y for the minimum post number to post)
If you want it template driven:
Replace
show_nopermission();exit;
With
eval("standarderror (\"".gettemplate ("error_minpostnumforthreads")."\");");
exit;
And create a template named "error_minpostnumforthreads" and specify its content as you like..
I'm sure someone will ask so here its the code if you want to restrict 2 usergroups: ;)
Replace first line as:
if (($bbuserinfo[usergroupid]==X OR $bbuserinfo[usergroupid]==Z) AND $bbuserinfo[posts]<Y)
Sorry, integrating this option to Admin CP requires a lot of editing so I only provided you with basic code. I dont know if Afterlab is still interested coding this hack but if he is, maybe he can write the code for you..By the way I recall this hack is already been released before? Are you sure it isnt? Maybe you should recheck again..
Enjoy..
Logician
scsa20
06-14-2002, 05:31 PM
is there a way to make it so only a cerent forum needs that number, like forumid 3??
Logician
06-14-2002, 06:09 PM
Originally posted by scsa20
is there a way to make it so only a cerent forum needs that number, like forumid 3??
ops missed that part sorry! Sure it is possible, otherwise it would be meaningless to apply it to all boards:
Just use this line:
if ($bbuserinfo[usergroupid]==X AND $bbuserinfo[posts]<Y AND $foruminfo[forumid]==3)
instead of:
if ($bbuserinfo[usergroupid]==X AND $bbuserinfo[posts]<Y)
scsa20
06-17-2002, 04:23 AM
thanks....time to see if it'll work :D
Kilroy
06-19-2002, 10:03 AM
If you want it template driven:
Replace
show_nopermission();exit;
With
eval("standarderror (\"".gettemplate "error_minpostnumforthreads")."\");");
exit;
Yes it works great
thanks
only you forgot 1 ( i think
eval("standarderror(\"".gettemplate ("error_minpostnumforthreads")."\");");
Logician
06-19-2002, 12:09 PM
Originally posted by Kilroy
only you forgot 1 ( i think
eval("standarderror(\"".gettemplate ("error_minpostnumforthreads")."\");");
that's true, thx for correcting..
newsguy
07-18-2002, 10:44 PM
Retracted question. Already found answer.
Smalley
12-14-2002, 07:36 PM
i place this script in v229 but it dose not work ??
the users can still add more posts than i but in the script line !!
Logician
12-15-2002, 06:53 AM
Originally posted by Smalley
i place this script in v229 but it dose not work ??
the users can still add more posts than i but in the script line !!
Make sure you entered the forumid and usergroup id correctly.
If you are sure about it, send the code you inserted here (starting a few lines before it and ending a few lines after it.) and let's check it out..
I'm on 2.2.9 and it's not working for me either:
Here's my code:
$postpoll=iif(trim($postpoll)=="yes",1,0);
$visible=iif($foruminfo[moderatenew],0,1);
if ($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]<50 AND $foruminfo[forumid]==107)
{
show_nopermission();exit;
}
// auto bypass queueing for admins/mods
if (ismoderator($foruminfo[forumid])) {
$visible=1;
}
Logician
03-30-2003, 06:48 PM
ok put the code before
// draw nav bar
in newthread.php in v.2.29. I guess this should fix it. Also please notice that this code only stops new threads not replies..
Thanks L! :)
I'm hoping it solves my problem but I guess I'll hunt around for a similar code that prevents new posts too just in case. Thanks again!!
Just thought I'd report back that it worked. Excellent work sir!! One request though. Can I change the "You do not have permission" message to something of my own wording? How would I go about that?
Logician
03-31-2003, 10:10 AM
you can replace line:
show_nopermission();exit;
as:
eval("standarderror(\"".gettemplate("Mycustomerrormessage")."\");"); exit;
and create a template named "Mycustomerrormessage"
Oh great! I'll do that today.
Just a thought.... Is it possible to use this same code for the newthread.php in the newreply.php and block new replies in the same way?
Logician
03-31-2003, 10:39 AM
yep trying putting the code before :
// auto bypass queueing for admins/mods
About that Mycustomerrormessage template - that would come up only for this forum that I have disabled for minimum posts requirement? Or would it come up in place of the standard error message for every "You do not have permission..." action?
Logician
04-01-2003, 01:00 PM
Today at 02:17 PM Cyn said this in Post #25 (https://vborg.vbsupport.ru/showthread.php?postid=376285#post376285)
About that Mycustomerrormessage template - that would come up only for this forum that I have disabled for minimum posts requirement? Or would it come up in place of the standard error message for every "You do not have permission..." action?
it will not replace standart error msg. It will just pop up for this hack only.
The error message fix works fine. But the newreply.php hack works in 2.2.9 only if placed before
// draw nav bar
just the same as for newthread.php
Thanks a lot for the help!! :cool:
Logician
04-03-2003, 01:48 PM
yw :)
SZ|TalonKarrde
04-04-2003, 02:59 AM
Nifty little trick. I don't have any use for it at current, but a useful tidbit for later.
Another question on this - what an I place to block anyone registered less than x number of days?
PennylessZ28
12-28-2004, 03:38 AM
I can't find the autobypass thing for the life of me in vb 3.0.3
Logician
12-28-2004, 08:04 AM
I can't find the autobypass thing for the life of me in vb 3.0.3
It is very normal because this thread is 3 years old and the hack was for vb2.x as the forum it resides states. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.