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)

solong2 06-03-2007 03:12 PM

how can banned user

thanks

VBDev 06-03-2007 03:41 PM

Quote:

Originally Posted by solong2 (Post 1260380)
how can banned user

thanks

you type /ban followed by a space and the name of the user :)

You then can see the banned users with the /showban command and you can unban them within the show ban popup or by typing in the chatbox the /unban command followed by a space and the name of the user.

ragtek 06-03-2007 04:16 PM

just look into the help ;)

bashy 06-03-2007 04:46 PM

Hi

What can i add to this code to make the popup to the size i require please?
Code:

                <span class="smallfont">$vbphrase[mgc_cb_aide]&nbsp;<a href="#top" onClick="return open_aide();"><img id="mgc_cb_aide" src="$stylevar[imgdir_button]/collapse_alt_collapsed.gif" alt="" border="0" /></a>
</span


VBDev 06-03-2007 05:31 PM

You can't in this bit of code.

Go in the clientscript/mgc_chatbox.js file and the open_aide javascript function in the mgc_chatbox template (at the top).

There, you should find a window_open call in which you can change the width and height value :)

itdevil 06-03-2007 06:11 PM

Hi, there is seems to be problem with the with Uninstall process. After uninstalling the hack it giving me DB error when try to update groups.

Code:

Database error in vBulletin 3.6.7:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        `title` = '(COPPA) Users Awaiting Moderation',
        `description` = '',
        `usertitle` = '',
        `opentag` = '',
        `closetag` = '',
        `passwordexpires` = '0',
        `passwordhistory` = '0',
        `forumpermissions` = '655375',
        `genericpermissions` = '33554499',
        `attachlimit` = '0',
        `pmquota` = '50',
        `pmpermissions` = '0',
        `pmsendmax` = '0',
        `calendarpermissions` = '1',
        `wolpermissions` = '0',
        `adminpermissions` = '0',
        `genericoptions` = '56',
        `profilepicmaxwidth` = '100',
        `profilepicmaxheight` = '100',
        `profilepicmaxsize` = '65535',
        `avatarmaxwidth` = '80',
        `avatarmaxheight` = '80',
        `avatarmaxsize` = '20000',
        `signaturepermissions` = '0',
        `sigpicmaxwidth` = '500',
        `sigpicmaxheight` = '100',
        `sigpicmaxsize` = '10000',
        `sigmaxrawchars` = '1000',
        `sigmaxchars` = '500',
        `sigmaxlines` = '0',
        `sigmaxsizebbcode` = '7',
        `sigmaximages` = '4',
        `vbppermissions` = '0',
        `vbp_discountrate` = '0.00000',
        `vbp_paycheckamount` = '0.00000',
        `vbp_secondarycost` = '0.00000',
        `vbp_primarycost` = '0.00000',
        `mgccustomusergroupperms` = '0',
        `nbmsgshowchatbox` = ''
WHERE usergroupid=4;

MySQL Error  : Unknown column 'mgccustomusergroupperms' in 'field list'

How can i Fix it ?

VBDev 06-03-2007 06:23 PM

I think you haven't followed the uninstalling steps rightly ;)

You should have removed the files before removing the products, especially the files in includes/xml concerning the chatbox as they contains bitfields which are generated upon install and uninstall process.

The regeneration upon uninstall is here to remove the bitfield concerning the chatbox but before files must have been removed.

So to correct this, you must remove the xml files concenrnig the chatbox and then rebuild the bitfields by hand (activation of the debug mode and the in the options menu the rebuild bitfields link shall be there :))

bashy 06-03-2007 06:45 PM

Hi VBDev

The only bit of code i can find in there with regards to a window is this
Code:

function attente_fin_envoi_chat() {
    if(envoiAjax.handler.readyState == 4 && envoiAjax.handler.status == 200 && envoiAjax.handler.responseText) {
        chatEnCours = 0;
        if (envoiAjax.handler.responseText == 'do_showban')
          window.open("mgc_chatbox.php?" + SESSIONURL + "do=showban" , "showban", "toolbar=no,scrollbars=no,resizable=yes,left=0 top=0,width=600,height=900");
        else if(envoiAjax.handler.responseText != 'ok')
          myAlert(envoiAjax.handler.responseText);
        <!-- Clear du timeout pour lancer le refresh -->
        clearTimeout(refreshTimeout);
        chatbox_refresh('forced');
    }
}

problem is, the popup aint changing size, as you can see i made it quite big with no change?
It wernt at the top either, it was a little way down!

Also, this hack actually ppears to add 3 queries even without the stats enabled,

Hack active: 35 queries and server load of 4.64
Hack disabled: 32 queries and server load of 0.84

Killing my server if i may say so... Anyway of improving this please?

VBDev 06-03-2007 07:27 PM

Quote:

Originally Posted by bashy (Post 1260504)
Hi VBDev

The only bit of code i can find in there with regards to a window is this
Code:

function attente_fin_envoi_chat() {
    if(envoiAjax.handler.readyState == 4 && envoiAjax.handler.status == 200 && envoiAjax.handler.responseText) {
        chatEnCours = 0;
        if (envoiAjax.handler.responseText == 'do_showban')
          window.open("mgc_chatbox.php?" + SESSIONURL + "do=showban" , "showban", "toolbar=no,scrollbars=no,resizable=yes,left=0 top=0,width=600,height=900");
        else if(envoiAjax.handler.responseText != 'ok')
          myAlert(envoiAjax.handler.responseText);
        <!-- Clear du timeout pour lancer le refresh -->
        clearTimeout(refreshTimeout);
        chatbox_refresh('forced');
    }
}

problem is, the popup aint changing size, as you can see i made it quite big with no change?
It wernt at the top either, it was a little way down!

Also, this hack actually ppears to add 3 queries even without the stats enabled,

Hack active: 35 queries and server load of 4.64
Hack disabled: 32 queries and server load of 0.84

Killing my server if i may say so... Anyway of improving this please?

In the template mgc_chatbox, you should find this bit of code:

Code:

  function open_aide() {
    window.open("mgc_chatbox.php?" + SESSIONURL + "do=showaide" , "showaide", "toolbar=no,scrollbars=no,resizable=yes,left=0 top=0,width=600,height=375");
  }

This is where you can change the size not as you mentionned above ;)

For the query part, how did you measure the server load and the queries ?

For the queries, the chatbox actually uses 2 queries on the forumhome page, one to retrieve the smilies and one to retrieve the custom bbcode. The one for the bbcode can be removed (see a previous post in the thread, about bbcodecache :)).

The other query might be for the refresh if you saw it by another way than the debug mode of vbulletin it might have appeared.

I think more information on the way you did it might be useful.

For the smiliey part, it could be removed in the next version by activating the smilie in a popup instead of on the page itself (queries would be run only in case of click on the button to show the page :))

bashy 06-03-2007 08:56 PM

Yep thats the one lol, didnt see you mention the template, i only noticed ya mention the file int he clientscript folder lol me is blind :o

I have added 2 images for the server load as well, i also hace the refresh set to 30 seconds...(default setting)
Page loading jumps about up 3 seconds

Willl look foward to the update :)

Sofia 06-03-2007 09:03 PM

Quote:

Originally Posted by bashy (Post 1260504)
Also, this hack actually ppears to add 3 queries even without the stats enabled,

Hack active: 35 queries and server load of 4.64
Hack disabled: 32 queries and server load of 0.84

Killing my server if i may say so... Anyway of improving this please?

On my forum, memory usage is less than 1 kb and the Chatbox add only 2 queries.

4,64 -> 0,84 = 3,80. What is it ? Kb ? It's rather big. Strange.


Edit : Ohh ok, no Kb but seconds :)

bashy 06-03-2007 09:07 PM

Quote:

Originally Posted by Sofia (Post 1260592)
On my forum, memory usage is less than 1 kb and the Chatbox add only 2 queries.

4,64 -> 0,84 = 3,80. What is it ? Kb ? It's rather big. Strange.

I aint got a clue about the kb side of it, i only break things lol

I did the edit to the global.php as explained in the post below and now my queries have
gone from 35 to 64 pmsl.... i am gonna undo that edit

Page generated in 0.86726 seconds with 64 queries

https://vborg.vbsupport.ru/showpost....8&postcount=79

VBDev 06-03-2007 09:18 PM

There is an error on the code bit, its ( I correct the previou post) :

PHP Code:

$specialtemplates[] = 'bbcodecache'

The 3 seconds seems enormous to me, I haven't experienced such added delays. What are the numberes between the []?

Sofia 06-04-2007 10:36 AM

Quote:

Originally Posted by VBDev (Post 1260605)
There is an error on the code bit, its ( I correct the previou post) :

PHP Code:

$specialtemplates[] = 'bbcodecache'

The 3 seconds seems enormous to me, I haven't experienced such added delays. What are the numberes between the []?

Yes, it's enormous. When the hack is enabled on my forum, it's only ~0.2 seconds more i think.

bashy 06-04-2007 02:54 PM

There must be something else conflicting with the hack as well then
I have vbshout 2.1 installed but that is only for the staff and dont get used much.

Tis a puzzling one this, I would like a box for the members but its not looking good atm!!

DementedMindz 06-04-2007 03:03 PM

yeah by far this is the best one I used so far dont even touch my server load. how many users are using it at once bashy? also what refresh rate do you have? maybe its something with the 2 shout boxes installed why not remove that one and just use this cause then you can use the team channel.

here is my server load

GZIP ON (level 1) | 0.02 : 0.04 : 0.01 | Uncached Templates: None

VBDev 06-04-2007 03:16 PM

Quote:

Originally Posted by bashy (Post 1261041)
There must be something else conflicting with the hack as well then
I have vbshout 2.1 installed but that is only for the staff and dont get used much.

Tis a puzzling one this, I would like a box for the members but its not looking good atm!!

We used to have vbshout 2.1 and my chatbox on vbulletin-ressources when we were using the first release (v1.0) as the double channel principle was not introduced. And we didn't experienced any load problem.

I didn't understand your second phrasen could you explain it please ? I think you're using current language words I am not used to as a french guy ;)

DementedMindz 06-04-2007 03:39 PM

he has vbshout for his staff and the second part hes saying that its getting him confused he wants a shoutbox for his members but right now its not looking to good I guess cause of his server loads. that is why I said he should remove vbshout and just install this one and use the team channel for the staff and the regular channel members only see.

VBDev 06-04-2007 03:51 PM

Quote:

Originally Posted by DementedMindz (Post 1261072)
he has vbshout for his staff and the second part hes saying that its getting him confused he wants a shoutbox for his members but right now its not looking to good I guess cause of his server loads. that is why I said he should remove vbshout and just install this one and use the team channel for the staff and the regular channel members only see.

Hum I see !

Try to deactivate the vbshout and just see how much server load you have with only the mgc chatbox active bahsy to see.

bashy 06-04-2007 04:24 PM

Yeah i will try that and see how it pans out,
when it was enabled there was actually no one using it at all!!

VBDev 06-04-2007 04:29 PM

Quote:

Originally Posted by bashy (Post 1261099)
when it was enabled there was actually no one using it at all!!

Yep so that's event stranger as as you might have seen, Sofia and DementedMindz have a small server load even with the chatbox enabled.

Maybe an incompatibility with both chatbox together activated at the same time but I doubt it.

DementedMindz 06-04-2007 04:34 PM

bashy what refresh rate do you have it on? cause I have even lowered mine down to 5 seconds and my server load dont jump or nothing. also do you have it enabled on all parts of the forum?

Snatch 06-04-2007 05:13 PM

I get an MySQL error when I edit the Usergroup permissions.

Code:

Datenbankfehler in vBulletin 3.6.7:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        `title` = 'Administratoren',
        `description` = '',
        `usertitle` = 'Administrator',
        `opentag` = '',
        `closetag` = '',
        `passwordexpires` = '180',
        `passwordhistory` = '360',
        `forumpermissions` = '1048575',
        `genericpermissions` = '1073741759',
        `attachlimit` = '0',
        `pmquota` = '50',
        `pmpermissions` = '7',
        `pmsendmax` = '5',
        `calendarpermissions` = '63',
        `wolpermissions` = '31',
        `adminpermissions` = '3',
        `genericoptions` = '55',
        `profilepicmaxwidth` = '300',
        `profilepicmaxheight` = '350',
        `profilepicmaxsize` = '65535',
        `avatarmaxwidth` = '100',
        `avatarmaxheight` = '100',
        `avatarmaxsize` = '20000',
        `signaturepermissions` = '237567',
        `sigpicmaxwidth` = '500',
        `sigpicmaxheight` = '100',
        `sigpicmaxsize` = '10000',
        `sigmaxrawchars` = '0',
        `sigmaxchars` = '0',
        `sigmaxlines` = '0',
        `sigmaxsizebbcode` = '7',
        `sigmaximages` = '0',
        `profileviewpermissions` = '15',
        `photoplogpermissions` = '32767',
        `photoplogmaxfilesize` = '512000',
        `photoplogmaxfilelimit` = '100',
        `mgccustomusergroupperms` = '3',
        `nbmsgshowchatbox` = '1'
WHERE usergroupid=6;

MySQL-Fehler : Unknown column 'mgccustomusergroupperms' in 'field list'
Fehler-Nr.  : 1054
Datum        : Monday, June 4th 2007 @ 08:07:50 PM
Skript      : http://www.gratis-chat.org/forum//admincp/usergroup.php?do=update
Referrer    : http://www.gratis-chat.org/forum//admincp/usergroup.php?do=edit&usergroupid=6
IP-Adresse  : xx.xx.xx.xx
Benutzername : Snatch
Klassenname  : vb_database


VBDev 06-04-2007 06:09 PM

This is because you haven't put the xml files in the includes/xml directory before importing the products !

Here are the possible solutions to solve this problem:
- Check that the files are in the includes/xml directory (the one from the zip archive) and then activate the debug mode (through a modification in the config.php file) and then in the vbulletin options menu, you just have to click on Rebuild bitfields !
- Remove the product, check that the files are in the includes/xml directory and then import the product again.

solong2 06-04-2007 06:28 PM

heelo

i have arabic fourm when i write english it's ok but when i try arabic nothing happen i cat ues arabic in it

thanks alo

vitrag24 06-04-2007 07:27 PM

can u show me demo or give link of any forum installed with this addon

bashy 06-04-2007 07:29 PM

check mine in my signature....not sure if it shows for guests though, i cant remember and i aint no guest so dont see that side of things often lol

Endurer 06-04-2007 07:37 PM

Vbdev, is the date bug fixed? :)

VBDev 06-04-2007 07:45 PM

Quote:

Originally Posted by Endurer (Post 1261254)
Vbdev, is the date bug fixed? :)

Ooopps really sorry I forgot you :( Going to check that out right now.

Quote:

Originally Posted by solong2 (Post 1261193)
heelo

i have arabic fourm when i write english it's ok but when i try arabic nothing happen i cat ues arabic in it


thanks alo

Sofia is doing some test to check that, she'll get some feedback soon.

Quote:

Originally Posted by vitrag24 (Post 1261244)
can u show me demo or give link of any forum installed with this addon

Unfortunately not unless you register as chatboxes are rarely shwon to guests as bashy mentionned. Anyway you could see it fi you register to my forum (vb-hacks), it is shown to registered users.

soniceffect 06-04-2007 07:52 PM

I get same error m8 ... have rebuilt bitfields .. uninstalled, reinstalled the lot :( ... shame coz looks like some excellent work ya done there m8

VBDev 06-04-2007 07:54 PM

you have installed both products given in the zip file ?

VBDev 06-04-2007 07:55 PM

Quote:

Originally Posted by Endurer (Post 1261254)
Vbdev, is the date bug fixed? :)

Could you try that:

Open the mgc_chatbox.php file, find :
PHP Code:

             /* Mise en forme de la date */
             
$chatbit['date'] = vbdate($vbulletin->options['dateformat'], $val['date'], truetruefalse);
             
$chatbit['date'] .= "&nbsp;&nbsp;" vbdate($vbulletin->options['timeformat'], $val['date']); 

Replace by :
PHP Code:

             /* Mise en forme de la date */
             
$chatbit['date'] = vbdate($vbulletin->options['dateformat'], $val['date'], true);
             
$chatbit['date'] .= "&nbsp;&nbsp;" vbdate($vbulletin->options['timeformat'], $val['date']); 

Tell me if that changes something

soniceffect 06-04-2007 07:55 PM

one of only ..... is that what Im doin wrong?

EDIT:- dosey git ... it is n all LOL ... my appologies .. cheers for the pointer :)

Sofia 06-04-2007 08:02 PM

Quote:

Originally Posted by solong2 (Post 1261193)
heelo

i have arabic fourm when i write english it's ok but when i try arabic nothing happen i cat ues arabic in it


thanks alo

On my forum, arabic characters works perfectly (example : ستايل روعه لمنتديات)

But try this :

In includes/functions_mgc_cb.php,

Find:

PHP Code:

$chatbox_utf8 0

Replace by:

HTML Code:

$chatbox_utf8 = 1;

solong2 06-04-2007 08:24 PM

Quote:

Originally Posted by Sofia (Post 1261275)
On my forum, arabic characters works perfectly (example : ستايل روعه لمنتديات)

But try this :

In includes/functions_mgc_cb.php,

Find:

PHP Code:

$chatbox_utf8 0

Replace by:

HTML Code:

$chatbox_utf8 = 1;


i try still not working

thanks for help

Sofia 06-04-2007 08:27 PM

Quote:

Originally Posted by solong2 (Post 1261286)
i try still not working

thanks for help

And when you post a message with arabic characters, what happens? Nothing?

VBDev 06-04-2007 08:29 PM

Maybe you could change the following bit of code in the mgc_chatbox.php file :

Code:

header('Content-type: text/html; charset=ISO-8859-15');
By the charset corresponding to your charset.

Unfortunately I am not really used to arabian characters but I know that with ajax, this a real problem as it might not be really well supported :(

solong2 06-04-2007 08:32 PM

sorry

but in my databaes i'm not uesing loclhost i'm uesing IP server

Sofia 06-04-2007 08:35 PM

Edit the mgc_chatbox.php file :

Find:

PHP Code:

header('Content-type: text/html; charset=ISO-8859-15'); 

Replace by:

PHP Code:

header("Content-Type: text/xml; charset=windows-1256"); 


solong2 06-04-2007 08:52 PM

Quote:

Originally Posted by Sofia (Post 1261300)
Edit the mgc_chatbox.php file :

Find:

PHP Code:

header('Content-type: text/html; charset=ISO-8859-15'); 

Replace by:

PHP Code:

header("Content-Type: text/xml; charset=windows-1256"); 


thanks Sofia but still seam nothing happen


All times are GMT. The time now is 02:43 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.02128 seconds
  • Memory Usage 1,880KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (10)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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