vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Chat Modifications - MGC Chatbox (with AJAX) (https://vborg.vbsupport.ru/showthread.php?t=148472)

yoyoyoyo 11-07-2007 12:41 PM

Quote:

Originally Posted by VBDev (Post 1374721)
This red box is displayed also in the chatbox if you activate the corresponding option in your admincp :)

cool - thanks - found the setting and enabled it :)

VBDev 11-07-2007 01:28 PM

Quote:

Originally Posted by powerbook (Post 1377678)
Hi,

Is there a way that you can disable the shoutbox for members who haven't made a specific amount of posts on the site within a 24hour period.
The same idea as is the case with ibProArcade where you can't play arcade games if you haven't made the number of posts within 24hrs as set by admin?

Members keeps on using the shoutbox as a replacement for posting and for me the only way is to either annoy them or to force them to make X amount of posts per 24hrs period before the shoutbox is either visible or enabled for them to use..

Many Thanks

As Is it's not possible. It would require a bit of coding but that's not very complicated.

I don't have the time to do it now but I could guide you through the steps if you have a bit of knowledge in php ?

powerbook 11-07-2007 01:44 PM

Hi,

Guiding me would be brilliant!! :up:

Thanks again

Quote:

Originally Posted by VBDev (Post 1377726)
As Is it's not possible. It would require a bit of coding but that's not very complicated.

I don't have the time to do it now but I could guide you through the steps if you have a bit of knowledge in php ?


nebu 11-07-2007 04:46 PM

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 :(

VBDev 11-07-2007 05:57 PM

Quote:

Originally Posted by powerbook (Post 1377742)
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 (Post 1377857)
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 :)

powerbook 11-07-2007 10:03 PM

Thanks for the guidelines. I will get cracking on it.

I really hope this is something other members would also be able to use. Since I installed the chatbox I could physically see posts dropping. Hopefully this will encourage my members to post once again. Guess the mods will now just have to be wary of 1 liners but that is the least of the problems... :D:D

Thanks again and if I have any questions I'll let you know. :up:

VBDev 11-08-2007 04:11 AM

Yeah, users always use the easiest ways to communicate which is not always the good one.

vBulletin software is used to build forum so the chatbox is only an addition which should not be used as much as the posting but users tends to do the contrary lol

NeutralizeR 11-08-2007 04:15 AM

Quote:

Originally Posted by VBDev (Post 1377543)
Ok so this is what I supposed :)

You have used the cmd with the wrong syntax, the good syntax is:

/ban user Tester
or
/ban uid 207833

As stated in the help window (maybe your help template is not up-to-date if you modified the original one ?)

Yes, my help template was not up-to-date.... thanks :)

Bicho?? 11-08-2007 11:55 PM

How can i do to delete these "<" ">" in the chat box?


Anybody could tell me please?


Thanks for this great mod first of all, kind regards.

https://vborg.vbsupport.ru/

Serenity 11-09-2007 02:14 AM

i have an issue with this mod. today out of no where the chat box just disappeared. i have searched this thread and saw that others had this issue, but it looked to be fixed. so far i am the only one experiencing this issue. i even tried otehr browsers on my pc and it does not work, but it shows up when i use a different computer.

any ideas?

edit to add:
i logged out of my admin account and used a test account i created and it appears.... it has soething to do with my user account... ???


All times are GMT. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02585 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete