Quote:
Originally Posted by powerbook
Hi,
Guiding me would be brilliant!! :up:
Thanks again
|
Basically what you have to do is edit the chatbox plugin attached to the global hook.
In this hook, you'll find a global condition to check if the chatbox is active ($vboptions[mgc_chatbox] or kinda, I don't have the code beyond the eyes so don't remember the exact one).
Before the content in the condition, you have to add an sql query to count the messages since the last 24 hours (dynamic count):
Code:
$getcount = $vbulletin->db->query_first("SELECT COUNT(postid) AS nb_posts FROM " . TABLE_PREFIX . "post WHERE userid='" . $vbulletin->userinfo['userid'] . "' AND dateline > '" . ( TIMENOW - 86400 ) . "'");
The query is not tested so you should verify before that the postid and dateline fields are the good one in the post table (for the postid I am pretty sure but not for the dateline).
Then you have to put all the actual part of the condition in a second condition :
Code:
if ($getcount['nb_posts'] > 10) {
/* Put the actual content of the condition here */
}
Where 10 is the number of posts per day you require before using the chatbox.
Of course this a homemade and hardcoded modification so you could also replace the 10 value by the one you want or even better, create a new option in the chatbox group (possible by activating the debug mode) to do just the same thing but giving easier access to modify it
Feel free to ask for any help if you encounter problems ! And give me back the final code so that I could use it in the versions following the v2.0.
Quote:
Originally Posted by nebu
i have a question.
tell me plz how to set the writing settings?
i want that my messages in the chatbox are allways blue and size4,
but i have do set it again and again 
|
I suppose you have done the mandatory modification to the modifyoptions template so you just have to go in your usercp and then you'll see chatbox options for that purpose