View Full Version : Number Of Posts Needed To Reply to a Thread In Certain Forums
BigJohnson
10-12-2002, 11:51 PM
Is there a hack out where u need a certain amount of posts to reply to threads in certain forums?
If there is I would love to know wher ei can download it. Also If it is not made I think this would be a great feature. Can someone help me out please. Thanks so much.
I no there is a hack for a certain amount of posts to make a new thread but this is not what i want. Thanks so much for helping me if you can.
Xenon
10-13-2002, 09:20 AM
well open your newreply.php
find$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
after that add:
if($threadinfo[forumid]==x and $bbuserinfo[posts]<y) show_nopermission;
not very elegant but does what ya want
Chris M
10-13-2002, 09:33 AM
I will make a proper hack:)
Satan
Xenon
10-13-2002, 09:35 AM
good to hear that chris ;)
Mephisteus
10-13-2002, 10:10 AM
Already made by me LONG ago
https://vborg.vbsupport.ru/showthread.php?s=&threadid=44571
Thread created for it now, but for gods sake don't go nagging that you have to install another hack first :p.
BigJohnson
10-13-2002, 11:53 AM
Yes this is great but i was wondering if it could be a little different.
I need both those hcks minimum to reply and for new thread but i was wondering for like the NEW REPLY HACK.
I made it say u need 5 new threads in order to have a new reply.
Can we change it so you need 5 new threads in certain forums that i choose?
And same goes with the other hac as well. U need a certain amount of posts in order to use this request. Like they need a certain amount of new threads in the specific forums i choose in order to post a new thread in the forum they want to.
I believe we would have to add the forum ID's in with the PHP code i think but how would i go about doing this instead of the way DARKSSJ3 has it where all u need is just a certain amount of new threads in any forum.
Thanks for helping me out guys.
If anyone can do it I would be great appreciated of it. Thanks.
Mephisteus
10-13-2002, 12:11 PM
I'll work on it when I get back. Unless someone else already did it :p
BigJohnson
10-13-2002, 12:14 PM
Where are you goin? lol. And thanks to whom ever gets it done.
BigJohnson
10-14-2002, 12:24 PM
BUMP
BigJohnson
10-16-2002, 08:16 AM
Bump. Please someone help me out here.
BigJohnson
10-17-2002, 08:18 AM
DarkSS are u still working on this hack?
Mephisteus
10-18-2002, 05:11 PM
sorry dude, I just got back from sailing and I'm very tired, and I won't be much home later for the next few weeks so i can't work on the hack... I'll see if someone else can look into it for you
BigJohnson
10-20-2002, 11:51 AM
Thanks hellsatan said he could probably make one. Someone please help me out thanks.
BigJohnson
10-22-2002, 08:46 AM
bump
Chris M
10-22-2002, 12:37 PM
Oh yes...That hack...
I totally forgot about it:(
Sorry;)
Im a bit busy right now...I shall see if I can get it done soon:)
Satan
BigJohnson
10-22-2002, 08:16 PM
Thanks so much. This would be so amazing if you can get this done. PLease don't forget about me. Thanks so much.
BigJohnson
10-23-2002, 07:22 PM
Bump
BigJohnson
10-25-2002, 08:26 AM
Bump
BigJohnson
10-26-2002, 11:05 AM
What time do you think you can do this. I think all you go tot do is modify the above hacks posted. I think not to sure lol. When do u think you can do this?
Chris M
10-26-2002, 11:49 AM
Im not too sure...
Ive got a busy few days ahead with work etc, but I shall try and get it done:)
Satan
BigJohnson
10-27-2002, 03:11 PM
thanks man. hope to here from ya soon.
Xenon
10-28-2002, 02:44 PM
well the thread version is not so easy, because there is no threadcounter in the usertable
you need to run this query:
$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]");
then you can use $threads[counter] within you ifconditions
BigJohnson
10-28-2002, 08:04 PM
So how would this look exactly. I am not to good with php. Do you think you can please tell me what to do maybe. Thanks Xenon
Xenon
10-29-2002, 01:45 PM
well instead of this:if($threadinfo[forumid]==x and $bbuserinfo[posts]<y) show_nopermission;
you have to put in this now:
$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]");
if($threadinfo[forumid]==x and $threads[counter]<y) show_nopermission();
BigJohnson
10-30-2002, 07:20 PM
$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]");
if($threadinfo[forumid]==x and $threads[counter]<y) show_nopermission();
Do u think u can make directions on where i have to place these bits and pieces of code in the php files. I don't know what to do at all. I no how to run queries i just dont no where ot place all these code.
The hack need to be made so they need a certain amount of threads in certain forums before they can reply in other forums.
Say I have
FORUM1
FORUM2
FORUM3
FORUM4
In order to reply to a thread in FORUM3 you need a certain amount of NEW THREADS in FORUM2 and FORUM3.
That is example but I choose the forumids i need the have the new threads added to and the forum ids of the forums that need the certain amount of new threads before you can reply to as well. Please help me out. I hope you understand because some times i confuse myself hehehe. Thanks Xenon ur the greatest for helping me out so far.
Xenon
10-31-2002, 10:34 AM
well all the code belongs to newreply.php
after this:
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
add this:
$threads1=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=x"); //For example Forum2
$threads2=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=y"); // For example Forum3
if($threadinfo[forumid]==x and $threads1[counter]<y and $threads2[counter]<y) show_nopermission();
BigJohnson
11-02-2002, 11:20 AM
What do i actually plug into here?
if($threadinfo[forumid]==x
Also don't you need code in the newthread.php as well to put the certain amount of new threads in that new database query we ran earlier?
For
if($threadinfo[forumid]==x
Dont i need to put more than one number in this area of x? If I do How do i separate each number?
Xenon
11-02-2002, 12:49 PM
why to newthread?
you said just replying needs an special ammount of threads already stared....
What do i actually plug into here?
if($threadinfo[forumid]==x
well, the forumid of the forum you want a user to be able to reply only if he has a certain ammount of threads created already
BigJohnson
11-02-2002, 05:01 PM
"you said just replying needs a special amount of threads already started"
No. lol. What I need is that you need a certain amount of new threads in certain forums before you can make replies in certain forums.
I hope u can still help me out. Sorry to make it so confusing. lol. Thank you Xenon.
Xenon
11-03-2002, 07:51 PM
well, can you tell me the exact way you want it?
so say you need 5 threads in forumid 4 and 7 threads in forumid 6 to reply to a thread in forumid 1...
then i can code it the exact way you want it ;)
BigJohnson
11-05-2002, 09:52 PM
Ok this sounds great. Here we go.
In order to post replies in forum ID 13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, and 59 you need to have at least 5 new threads in the above forum id's. All you need is 5 new threads in any of the forums. You can have them spread out like 1 in each forum to equal up to 5 and that would be fine to post a reply then in the forums.
I think that would be a such a great feature. If you could do that that would be amazing.
Thanks so much Xenon
Xenon
11-06-2002, 09:54 AM
ahh, i see, well here we go :)
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)");
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 )) and $threads[counter]<5) show_nopermission();
put this into newreply.php dircetly after:if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
BigJohnson
11-06-2002, 10:14 PM
I didn't test it yet but how would we be able to make it so that if you don't have 5 new threads you go to an error page. Can you make it call for a template and I can write out the error message. Can you please post what I should do to do this. Thanks man so much.
BigJohnson
11-07-2002, 12:04 AM
Am I suppose to run a query or something. I get this error
Fatal error: Call to undefined function: query_first() in /usr/local/psa/home/vhosts/new-dimensionz.com/httpdocs/messageboard/newreply.php on line 87
Don't I need to change some files in new thread.php as well so it insert the counter info into the wuery?
Xenon
11-07-2002, 02:00 PM
redo it, there was a little spelling mistak in it ;)
the other question:
you can replace show_nopermission(); with:
{
eval("standarderror(\"".gettemplate("error_notenoughthreads")."\");");
exit;
}
then create a template error_notenoughthreads and enter a errormessage
BigJohnson
11-07-2002, 06:58 PM
Is there any way in the error message to say how many posts they need until they can post replies?
Like You have 2 posts in theses forums out of 5. You need 3 more to be able to reply.
Is there any way to do this so my members no how many more posts they need to make?
Thanks.
Xenon
11-07-2002, 07:00 PM
well you should be able to use $threads[counter] in the template, but not sure...
BigJohnson
11-07-2002, 10:15 PM
Yes it worked thanks so much. Your the greatest.
Xenon
11-08-2002, 12:05 PM
:)
glad to hear :)
you're welcome
BigJohnson
11-08-2002, 07:29 PM
Originally posted by Xenon
ahh, i see, well here we go :)
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)");
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 )) and $threads[counter]<5) show_nopermission();
put this into newreply.php dircetly after:if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
Ok one more thing. Lol. I am sorry to ask for something else but I was just wondering.
What you did to help me out is that you need a certain amount of new threads before you can reply in those threads.
How would I go about doing something like you need 5 new threads in the forum IDS above in order to post NEW THREADS in forumid's of 21, 28, 35, 46, 53, 61
That would be the greatest. What do ya think ya can do? Tanks for everything Xenon.
Xenon
11-09-2002, 12:08 PM
everything is possible, try to take out the other numbers in the if clause ;)
BigJohnson
11-10-2002, 01:32 PM
No this one is different. The other hack was u need a certain amount of new threads in certain forums in order to reply in those forums.
Now I was asking that you need a certain amount of new threads in those same forums in order to make NEW THREADS ( not replies ) in these forums
21, 28, 35, 46, 53, 61
I hope you can help me out. Thanks. Please post the code to what I should do. This is my last request. ;) Thanks so much Xenon.
Xenon
11-10-2002, 01:52 PM
ahh well, i see :)
no problem at all, just open newthread.php
find$foruminfo=getforuminfo($forumid);
if ($foruminfo['allowposting']==0) {
eval("standarderror(\"".gettemplate("error_forumclosed")."\");");
}
below add:
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)");
if(in_array($foruminfo[forumid],array(21, 28, 35, 46, 53, 61)) and $threads[counter]<5) show_nopermission();
that should be what you wanted
BigJohnson
11-10-2002, 07:04 PM
OMG thanks so much man this works great. Keep up the great work Xenon
Xenon
11-10-2002, 08:12 PM
i'll try ;)
you're welcome
BigJohnson
01-12-2003, 09:27 PM
Originally posted by Xenon
ahh, i see, well here we go :)
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)");
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 )) and $threads[counter]<5) show_nopermission();
put this into newreply.php dircetly after:if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
how do u do this for sub forums though?
Like need a certain amount of posts in a certain subforum before u can post in this subforum?
BigJohnson
01-13-2003, 09:31 AM
is there any code for subforums or is it all the same?
Xenon
01-13-2003, 02:22 PM
it's the same if i understand you the right way...
BigJohnson
01-20-2003, 07:59 PM
Originally posted by Xenon
ahh, i see, well here we go :)
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)");
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 )) and $threads[counter]<5) show_nopermission();
put this into newreply.php dircetly after:if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
}
This shows how many posts are needed until the user can reply to certain threads.
How do we make it that you need on AVERAGE of a certain amount of posts per MONTH (30 days = 720 hours).
I would love to see this. I hope Xenon or someone else can help me out. thanks.
Xenon
01-20-2003, 08:21 PM
it would be something like that:
$posts=$DB_site->query_first("SELECT COUNT(*) as counter FROM post WHERE userid=$bbuserinfo[userid] AND dateline>".(time()-3600*720));
if($posts[counter]< average) show_nopermission();
BigJohnson
01-20-2003, 09:18 PM
what would the full code look like if i wanted to insert it. I am a little confused. Thanks
BigJohnson
01-21-2003, 12:05 AM
Can u make the whole code please using the forum ids from above.
13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59
U need 5 new threads average monthly in these forum ids before u can post in those forum ids.
Thank you.
Originally posted by BigJohnson
Is there a hack out where u need a certain amount of posts to reply to threads in certain forums?
If there is I would love to know wher ei can download it. Also If it is not made I think this would be a great feature. Can someone help me out please. Thanks so much.
I no there is a hack for a certain amount of posts to make a new thread but this is not what i want. Thanks so much for helping me if you can.
Check Lesane's profile.
BigJohnson
01-21-2003, 12:27 AM
Teck this request is a little different. It is posts in certain forums, not just posts in general.
BigJohnson
01-21-2003, 08:39 PM
bump
BigJohnson
01-23-2003, 07:24 AM
Xenon please help.
BigJohnson
01-23-2003, 07:44 AM
I dont no if i am doing this right but I did this. Can u help me out. I get a database error everytime i try to make a reply now. Don't know what to do.
$posts=$DB_site->query_first("SELECT COUNT(*) as counter FROM post WHERE userid=$bbuserinfo[userid] AND forumid IN(23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56) AND dateline>".(time()-3600*720));
if(in_array($threadinfo[forumid],array(23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56)) and $posts[counter]<2) show_nopermission();
Xenon
01-23-2003, 08:37 AM
sorry, must have somehow overlooked this thread...
$posts=$DB_site->query_first("SELECT COUNT(*) as counter FROM post, thread WHERE post.userid=$bbuserinfo[userid] AND post.threadid=thread.threadid AND thread.forumid IN(23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56) AND dateline>".(time()-3600*720));
if(in_array($threadinfo[forumid],array(23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56)) and $posts[counter]<2) show_nopermission();
BigJohnson
01-23-2003, 09:07 PM
OK one last thing hehe. I no this is alot but so sorry haha. Xenon your so amazing.
OK the hack that you just posted above says
U need a certain amount of NEW THREADS in certain forums in order to post REPLIES in certain forums. This also uses the average feature.
I didint test it to see if it works but I will.
Now what I am looking for is sorta like the above but just a little different. Instead of needing a certain amount of NEW THREADS in certain forums in order to post REPLIES in certain forums. I need a certain amount of NEW THREADS in certain forums in order to post NEW THREADS in certain forums.
The past post is below which shows you how u did it before. The addon I would like to add is the same thing u added on the other one just made for me. The average month thingy. I hope you could please do that.
Originally posted by Xenon
ahh well, i see :)
no problem at all, just open newthread.php
find$foruminfo=getforuminfo($forumid);
if ($foruminfo['allowposting']==0) {
eval("standarderror(\"".gettemplate("error_forumclosed")."\");");
}
below add:
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56)");
if(in_array($foruminfo[forumid],array(21, 28, 35, 46, 53, 61)) and $threads[counter]<5) show_nopermission();
that should be what you wanted
Also is there any way I can have a counter i can put in the postbit and in the getinfo that shows how many NEW THREADS they have on average for the month? All I need is the variable. I can do the templates.
This average counter thing would be for just the new threads in these forum id's
23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56
Those Id's are in both little features. So it would show one counter that shows the average monthly NEW THREADS they have in these forum ids above.
I already have the counter that counts the NEW THREADS in those certain forums. I just want a little average info next to it so people know how many NEW THREADS they have average.
Thank you. I hope you understand hehe.
BigJohnson
01-25-2003, 04:13 PM
bump
BigJohnson
01-26-2003, 03:43 AM
Bump
BigJohnson
01-27-2003, 07:59 AM
bump.
BigJohnson
01-27-2003, 07:28 PM
I hope someone can help me with what is below this message.
Originally posted by BigJohnson
OK one last thing hehe. I no this is alot but so sorry haha. Xenon your so amazing.
OK the hack that you just posted above says
U need a certain amount of NEW THREADS in certain forums in order to post REPLIES in certain forums. This also uses the average feature.
I didint test it to see if it works but I will.
Now what I am looking for is sorta like the above but just a little different. Instead of needing a certain amount of NEW THREADS in certain forums in order to post REPLIES in certain forums. I need a certain amount of NEW THREADS in certain forums in order to post NEW THREADS in certain forums.
The past post is below which shows you how u did it before. The addon I would like to add is the same thing u added on the other one just made for me. The average month thingy. I hope you could please do that.
Also is there any way I can have a counter i can put in the postbit and in the getinfo that shows how many NEW THREADS they have on average for the month? All I need is the variable. I can do the templates.
This average counter thing would be for just the new threads in these forum id's
23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 55, 56
Those Id's are in both little features. So it would show one counter that shows the average monthly NEW THREADS they have in these forum ids above.
I already have the counter that counts the NEW THREADS in those certain forums. I just want a little average info next to it so people know how many NEW THREADS they have average.
Thank you. I hope you understand hehe.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.