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)

m002.p 06-12-2007 04:55 PM

Ok thanks, will wait untill the next version then :)

pewp 06-12-2007 05:03 PM

ok, after working with it a bit when you have it set to have the newest posts at the bottom you have to scroll down to the bottom when you first enter a page with the chatbox as it displays the top of the chat window. at least that's an issue i'm running in to.

VBDev 06-12-2007 05:20 PM

Quote:

Originally Posted by pewp (Post 1267043)
ok, after working with it a bit when you have it set to have the newest posts at the bottom you have to scroll down to the bottom when you first enter a page with the chatbox as it displays the top of the chat window. at least that's an issue i'm running in to.

This is not an issue as it is coded like that ;) I haven't still searched a way to move down the scrollbar down to the last chat on load.

I'll try to check that, noted on todo list !

1337_macro 06-12-2007 06:00 PM

version 1.1 was working great for me but then i switched to 1.2 and now one my main template it keeps saying loading...i switched it to UTF-8 and that didnt help. Any ideas of what im doing wrong? my other template is working fine

bashy 06-12-2007 06:02 PM

Try reverting the mgc_chatbox template ;)

Howell 06-12-2007 08:33 PM

Quote:

Originally Posted by hardiono (Post 1266969)
Thank you for this very nice mod, installed and voted for MOTM.
But I still could not fix the problem of jumping to the top after inserting smilie.

I changed "#top" to "#", and "" did not work, I changed it back to "#top," it keeps jumping.
Please help

I fixed this problem by doing the following...

Open the includes/function_mgc_cb.php file

FIND:
Code:

$chatbox_smileys .= '<a href="#top" onclick="return ajout_smilie(\'' . $textsmilie . '\');" alt="' . $smilie['title'] . '"><img src="' . $smilie['smiliepath'] . '" border="0" /></a> ';
REPLACE WITH:
Code:

$chatbox_smileys .= '<a href="#shout_top" onclick="return ajout_smilie(\'' . $textsmilie . '\');" alt="' . $smilie['title'] . '"><img src="' . $smilie['smiliepath'] . '" border="0" /></a> ';

Then go into the Styles editor and edit the template - mgc_chatbox
FIND:
Code:

<a style="float:$stylevar[right]" href="#top" onClick="return exec_collapse_chatbox();"><img id="collapseimg_mgc_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_mgc_chatbox].gif" alt="" border="0" /></a>
REPLACE WITH:
Code:

<a style="float:$stylevar[right]" href="#shout_top" onClick="return exec_collapse_chatbox();"><img id="collapseimg_mgc_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_mgc_chatbox].gif" alt="" border="0" /></a>

Plus I found the same problem with the collapse / expand function so I altered one further line...
FIND:
Code:

<a href="#top" onClick="return collaspe_chatbox();"><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" border="0" /></a>
REPLACE WITH:
Code:

<a href="#shout_top" onClick="return collaspe_chatbox();"><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" border="0" /></a>

Hope this helps? ;)

VBDev 06-12-2007 09:00 PM

Hum yes that a nice idea on how to fix it, I just don't figure that option out :)

Nice done Howell ! Thansk, I'll modify that in the next version !

alessai 06-12-2007 09:04 PM

Quote:

Originally Posted by Howell (Post 1267154)
I fixed this problem by doing the following...

Open the includes/function_mgc_cb.php file

FIND:
Code:

$chatbox_smileys .= '<a href="#top" onclick="return ajout_smilie(\'' . $textsmilie . '\');" alt="' . $smilie['title'] . '"><img src="' . $smilie['smiliepath'] . '" border="0" /></a> ';
REPLACE WITH:
Code:

$chatbox_smileys .= '<a href="#shout_top" onclick="return ajout_smilie(\'' . $textsmilie . '\');" alt="' . $smilie['title'] . '"><img src="' . $smilie['smiliepath'] . '" border="0" /></a> ';

Then go into the Styles editor and edit the template - mgc_chatbox
FIND:
Code:

<a style="float:$stylevar[right]" href="#top" onClick="return exec_collapse_chatbox();"><img id="collapseimg_mgc_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_mgc_chatbox].gif" alt="" border="0" /></a>
REPLACE WITH:
Code:

<a style="float:$stylevar[right]" href="#shout_top" onClick="return exec_collapse_chatbox();"><img id="collapseimg_mgc_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_mgc_chatbox].gif" alt="" border="0" /></a>

Plus I found the same problem with the collapse / expand function so I altered one further line...
FIND:
Code:

<a href="#top" onClick="return collaspe_chatbox();"><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" border="0" /></a>
REPLACE WITH:
Code:

<a href="#shout_top" onClick="return collaspe_chatbox();"><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" border="0" /></a>

Hope this helps? ;)

same problem ill try it thanx:)

Edit: Perfect it works

Tulsa 06-12-2007 09:50 PM

When doing a /del all, I received this message.

Quote:

Warning: ksort() expects parameter 1 to be array, null given in /mgc_chatbox.php on line 122

VBDev 06-12-2007 10:58 PM

hum yes small bug, open mgc_chatbox.php.

Find :
Code:

  /* Tri des messages selon l'ordre d'affichage (ascendant ou descendant) */
  $nb_chats = $vbulletin->db->num_rows($chat_messages);
  if ($vbulletin->options['mgc_cb_chats_ordre']) { // ascendant
  $cpt = $nb_chats - 1;
  while ($chat = $vbulletin->db->fetch_array($chat_messages)) {
    $tableau_chats[$cpt] = $chat;
    $cpt--;
  }
  ksort($tableau_chats);
  } else { //descendant
  while ($chat = $vbulletin->db->fetch_array($chat_messages)) {
    $tableau_chats[] = $chat;
  } 
  }

Replace it by :
Code:

  /* Tri des messages selon l'ordre d'affichage (ascendant ou descendant) */
  $nb_chats = $vbulletin->db->num_rows($chat_messages);
  if($nb_chats) {
  if ($vbulletin->options['mgc_cb_chats_ordre']) { // ascendant
    $cpt = $nb_chats - 1;
    while ($chat = $vbulletin->db->fetch_array($chat_messages)) {
    $tableau_chats[$cpt] = $chat;
    $cpt--;
    }
    ksort($tableau_chats);
  } else { //descendant
    while ($chat = $vbulletin->db->fetch_array($chat_messages)) {
    $tableau_chats[] = $chat;
    } 
  }
  }

Will correct it in the next version :)


All times are GMT. The time now is 11:37 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.02469 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
  • (14)bbcode_code_printable
  • (4)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