virtus
03-08-2011, 06:04 PM
I am trying to make a "post a day" limit for a specific forum. here is the code.
if($threadinfo["forumid"] == 51){
if(mktime(date("G"),date("i"),date("s"),date("n"),date("j"),date("Y")) < ($threadinfo["lastpost"] + 86400)){
header('Location: http://www.example.com/');
}
}
Obviously I will change the end result to an error.
It works exactly how I want ti to and I have this set under the newreply_start hook. However, this does not work for the quick reply, which I am assuming uses ajax, but have not been able to find a hook that triggers for it.
So, how can I have this code trigger when someone tries to just do a quick reply?
Are there any other options?
Thanks
if($threadinfo["forumid"] == 51){
if(mktime(date("G"),date("i"),date("s"),date("n"),date("j"),date("Y")) < ($threadinfo["lastpost"] + 86400)){
header('Location: http://www.example.com/');
}
}
Obviously I will change the end result to an error.
It works exactly how I want ti to and I have this set under the newreply_start hook. However, this does not work for the quick reply, which I am assuming uses ajax, but have not been able to find a hook that triggers for it.
So, how can I have this code trigger when someone tries to just do a quick reply?
Are there any other options?
Thanks