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)

VBDev 05-31-2007 04:32 PM

To do so, open the includes/functions_mgc_cb.php, then find the construct_bbcode_tag_list function.

You'll see the supported bbcode, you juste have to add code like that :

PHP Code:

  $bbcode_list['option']['size'] = array(
   
'html' => 'your_html_code',
   
'option_regex' => 'your_regex',
   
'strip_empty' => true
  
); 

You then just have to fill it to your wishes. You can add as much as you want ;)

But becareful when upgrading for the enxt version as the file will be updated.

solong2 05-31-2007 04:47 PM

i try more then style put still i can't get the chat box

VBDev 05-31-2007 04:54 PM

Quote:

Originally Posted by solong2 (Post 1258467)
i try more then style put still i can't get the chat box

You might not have set the permissions ! You must set the can use chatbox to yes for your usergroup and then the number of posts to access the chatbox to a good value (less than the number of post you have ;))

VBDev 05-31-2007 05:17 PM

Quote:

Originally Posted by NeutralizeR (Post 1258327)
-The queries are still being executed for who doesn't have permission to view/use chatbox

-The query is still being executed for forumdisplay no matter if chatbox is disabled or enabled for forumdisplay

I've more than 2000 online users and these extra queries are a major issue for me. I can wrap the plugins with some php to prevent the query execution for the usergroups who don't have permission to view the chatbox but this must be built in.

Note: Ignore my post at the other website.

Back at my home, I have just checked that. Are you sure of that ? Coz this is impossible, I have checked the conditions and if the chatbox doesn't show, then no sql queries can appear for user with no permissions.

NeutralizeR 05-31-2007 06:21 PM

Quote:

Originally Posted by VBDev (Post 1258484)
Back at my home, I have just checked that. Are you sure of that ? Coz this is impossible, I have checked the conditions and if the chatbox doesn't show, then no sql queries can appear for user with no permissions.

Chatbox 'product' completely disabled = 10 queries (forumhome)

Chatbox 'product' enabled = 12 (10+2) queries (forumhome - statistics disabled)

Chatbox disabled for the guests = 8 (7+1) queries (forumhome)

Chatbox enabled for the guests = 8 (7+1) queries (forumhome)

Chatbox disabled @ forumdisplay = 15 (14+1) queries

Chatbox enabled @ forumdisplay = 15 (14+1) queries

VBDev 05-31-2007 07:08 PM

I am really sorry you were right, I have just found what the problem was after a bit of search, I'll correct automatically in the next version but here is the fix :

Here is how you can fix this unuseful query problem:

Go in your acp in the manager of plugins and edit the MGC chatbox plugin linked to the global_start hook.

Then remove from it :

Code:

  $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
  $vbulletin->options['mgc_cb_annonce'] = $parser->do_parse($vbulletin->options['mgc_cb_annonce'], true, true, true, true, false, false);

Once this is done, validate and edit the one linked to forumhome_complete and add the removed code of above just after that bit of code :

Code:

if ($chatbox_permission && $vbulletin->options['mgc_cb_forumhome']) {
Then validate again, and to the same operation with the one linked to forumdisplay_complete after :

Code:

if ($chatbox_permission && $vbulletin->options['mgc_cb_forumdisplay']) {
Validate and do it again with the one linked to showthread_complete, after :

Code:

if ($chatbox_permission && $vbulletin->options['mgc_cb_showthread']) {
Here it is fixed no :)

NeutralizeR 05-31-2007 08:22 PM

Thank you :)

But it still executes 2 queries at forumhome...

Mastar 05-31-2007 08:33 PM

Here is the screen shot for the issues with opera.

VBDev 05-31-2007 09:33 PM

Quote:

Originally Posted by NeutralizeR (Post 1258588)
Thank you :)

But it still executes 2 queries at forumhome...

I have found the problem. Unfortunately, this is a vbulletin issue, a question of datastore.

Here is the description of the problem:

To parse chatbox announcment bbcode, I need to use the bbcode parsing php class to parse bbcode tags.

The problem is that this class needs the bbcodecache datastore which contains the custom bbcode.

And as plugins are part of the datastores, it is impossible to add a new datastore to be retrieved in a file which doesn't contain it actually.

There is a possible fix with a file modification :

Open the includes/global.php file and add just after :

PHP Code:

define('CWD', (($getcwd getcwd()) ? $getcwd '.')); 

the following code bits :

PHP Code:

$specialtemplates[] = 'bbcodecache'

Quote:

Originally Posted by Mastar (Post 1258595)
Here is the screen shot for the issues with opera.

This problem is due to the overflow-y property is use which is unfornately not yet supported by opera as I've just seen.

Anyway you can fix this with the following modification :

In the template mgc_chatbox, find
Code:

overflow-y: auto;
and replace it by
Code:

overflow: auto;
.

This will fix the problem but you will have a horizontal scrollbar and a vertical one, even though the horizontal one is of no use ...

In the next version, I'll put a detection mechanism which check the browser of the user and applies the compatible css so that user with browser supporting the overflow-y css property don't loose the beauty of having only the vertical scrollbar.

NeutralizeR 05-31-2007 10:22 PM

What if i completely disable the announcement feature?

When i click on a smiley, it scrolls me to the top of the chatbox.


All times are GMT. The time now is 02:25 AM.

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.04484 seconds
  • Memory Usage 1,756KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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