Thread: Chat Modifications - MGC Chatbox Evo
View Single Post
  #3590  
Old 12-31-2008, 06:01 PM
Harley D's Avatar
Harley D Harley D is offline
 
Join Date: Jan 2003
Location: WagnerTech.net
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.K. I have found the reason why the ChatBox will only work with ONE theme.

For some reason this template mgc_cb_evo is not being removed during the UNINSTALL and/or is not being updated with a fresh install or update.

Here are the files... The first is the NOT UPDATED and causing the ChatBox not to load properly, The CORRECT version is in my next post as I exceed the text limit when posting both here.

Code:
<script type="text/javascript">
   var val_timeout = $vboptions[mgc_cb_evo_refresh_rate] * 1000;
   var auto_refresh = $vboptions[mgc_cb_evo_refresh_active];
   var chats_when_collapsed = $vboptions[mgc_cb_evo_nbchats_closed];
   var channel_id = 0;
   var chats_order = $vboptions[mgc_cb_evo_chats_order];
   var chat_input_prompt = $show[mgc_cb_evo_promptmsg];
   var inactive_mode = $vboptions[mgc_cb_evo_inactive_mode];
   var inactive_mode_delay = $vboptions[mgc_cb_evo_inactive_mode_delay] * 60 * 1000;
   var bburl = "$vboptions[bburl]";
   var mgc_cb_evo_jsloc = "$mgc_cb_evo_floc";
   var phrase_error_chat_in_process = "$vbphrase[mgc_cb_evo_jserror_chat_in_progress]";
   var phrase_enter_url = "$vbphrase[mgc_cb_evo_js_enter_url]";
   var phrase_enter_imgurl = "$vbphrase[mgc_cb_evo_js_enter_imgurl]";
   var phrase_already_editing = "$vbphrase[mgc_cb_evo_already_editing]";
   var phrase_edit_forbidden = "$vbphrase[mgc_cb_evo_edit_forbidden]";
   var phrase_inactive = "$vbphrase[mgc_cb_evo_inactive]";
   var chatbox_inactive = 0;
   var idleTimeout = null;
   var warn_active = $vboptions[mgc_cb_evo_channels_warning];
   var warn_delay = $vboptions[mgc_cb_evo_channels_warning_delay] * 60 * 1000;
   <if condition="!empty($vbulletin->options['mgc_cb_evo_whoisonline_autorefresh']) && $vbulletin->options['mgc_cb_evo_whoisonline_autorefresh']">
      var whoisonline_active = 1;
      var whoisonline_delay = $vboptions[mgc_cb_evo_whoisonline_autorefresh] * 1000 * 60;
		<if condition="!$vbulletin->options['mgc_cb_evo_whoisonline_showintab']">
      	whoisonlineTimeout = setTimeout("get_online_users()", whoisonline_delay);
      </if>
   </if>

   if ($vboptions[mgc_cb_evo_inactive_mode] && $vboptions[mgc_cb_evo_inactive_mode_onload])
   {
      chatbox_inactive = 1; 
   }
   else if ($vboptions[mgc_cb_evo_inactive_mode])
   {
      idleTimeout = setTimeout("activate_idle_chatbox()", inactive_mode_delay);
   }
</script>


<if condition="THIS_SCRIPT == 'mgc_cb_evo'">
   <script type="text/javascript">var cb_location = "full";</script>
<else />
   <script type="text/javascript">var cb_location = "inc";</script>
</if>

<script type="text/javascript" src="{$mgc_cb_evo_floc}clientscript/mgc_cb_evo.js"></script>
$commands_js_includes

<a name="mgc_cb_evo_top" id="mgc_cb_evo_top"></a>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<!-- Chatbox Title Row -->
<tbody>
   <tr>
      <td class="thead" align ="center" colspan="2">
         <a style="float:$stylevar[right]" href="#mgc_cb_evo_top" onClick="return exec_mgc_cb_evo_collapse();"><img id="collapseimg_mgc_cb_evo" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_mgc_cb_evo].gif" alt="" border="0" /></a>
         <span id='mgc_cb_evo_title_opened' style='display: <if condition="$vbcollapse[collapseobj_mgc_cb_evo] == ''"><else />none</if>'>
            <span class="normalfont">$vboptions[mgc_cb_evo_title]</span>
         </span>
         <span id='mgc_cb_evo_title_closed' style='display: <if condition="$vbcollapse[collapseobj_mgc_cb_evo] == ''">none<else /></if>'>
            $vboptions[mgc_cb_evo_title]&nbsp;<a href="#mgc_cb_evo_top" onClick="return exec_mgc_cb_evo_collapse();"><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" border="0" /></a>
         </span>		   	
         &nbsp;<span>[<a href="$vboptions[bburl]/mgc_cb_evo.php?$session[sessionurl]do=view_archives&page=1">$vbphrase[mgc_cb_evo_archives]</a>] 
      </td>
   </tr>
</tbody>
<!-- / Chatbox Title Row -->

<!-- vBulletin Collapse Tricking -->
<tbody id="collapseobj_mgc_cb_evo" style="$vbcollapse[collapseobj_mgc_cb_evo]">
</tbody>
<!-- / vBulletin Collapse Tricking -->

<!-- Chatbox inner in opened mode -->
<tbody id="mgc_cb_evo_opened" style="$vbcollapse[collapseobj_mgc_cb_evo]" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
   <!-- Announcement -->
   <if condition="!empty($vboptions[mgc_cb_evo_announcement])">
      <tr class="alt1" valign="middle" width="100%">
         <td colspan="2">
            $vboptions[mgc_cb_evo_announcement]
         </td>
      </tr>
   </if>
   <!-- / Announcement -->
	
	<!-- Editor if position above -->
   <if condition="$vboptions[mgc_cb_evo_editor_position] == 0">
		$mgc_cb_evo_editor
	</if>
	<!-- Editor if position above -->
	
	<!-- Chatbox row -->
   <tr class="alt2">
      <td width="100%" colspan="2">      
         <!-- Javascript popups -->
         <div style="z-index: 1; position: absolute; display: none;" id="mgc_cb_evo_chat_popup">
            <table class="tborder" align="center" cellpadding="5">
               <tr class="thead">
           	      <td align="center"><b>$vbphrase[mgc_cb_evo_information]</b></td>
           	   </tr>
           	   <tr class="alt1">
   			      <td style="padding: 5px 5px;">
   			         <div id="mgc_cb_evo_chat_popup_content"></div>
   			         <div id="mgc_cb_evo_prompt_input_div" style="display: none;"><input type="text" size="35" name="mgc_cb_evo_prompt_input" id="mgc_cb_evo_prompt_input" /></div>
      					<br />
   	     				<div align="center" id="mgc_cb_evo_close_button" style="display: none;">
                        <input type="button" value="$vbphrase[mgc_cb_evo_close]" onclick="mgc_cb_js_hidepopup();" />
                     </div>
   	     				<div align="center" id="mgc_cb_evo_okcancel_buttons" style="display: none;">
                        <input type="button" value="$vbphrase[go]" onclick="mgc_cb_js_hideprompt(1);" />
                        <input type="button" value="$vbphrase[cancel]" onclick="mgc_cb_js_hideprompt(0);" />
                     </div>
   		    		</td>
   			   </tr>
           </table>
         </div>
         <!-- / Javascript popups -->

         <!-- Channel icons and chats -->
         <table width="100%" cellpadding="0" cellspacing="2">
            <tr>
            	
						<td nowrap="nowrap" valign="top" align="$stylevar[left]">
							<div id="channel_gen_on">
								<img id="mgc_cb_channel_gen_on" src="$stylevar[imgdir_misc]/mgc_cb_evo/mgc_cb_gen_channel_sel.gif" width="20px" height="20px" alt="" border="0" title="$vbphrase[mgc_cb_evo_channel_gen]" />&nbsp;
							</div>
							<div id="channel_gen_off" style="display: none;">
								<a href="#mgc_cb_evo_top" onClick="return display_channel(0);"><img id="mgc_cb_gen_off" src="$stylevar[imgdir_misc]/mgc_cb_evo/mgc_cb_gen_channel_nosel.gif" width="20px" height="20px" alt="" border="0" title="$vbphrase[mgc_cb_evo_channel_gen]" /></a>&nbsp; 
							</div>
							<div id="channel_gen_new" style="display: none;">
								<a href="#mgc_cb_evo_top" onClick="return display_channel(0);"><img id="mgc_cb_gen_new" src="$stylevar[imgdir_misc]/mgc_cb_evo/mgc_cb_gen_channel_new.gif" width="20px" height="20px" alt="" border="0" title="$vbphrase[mgc_cb_evo_channel_new]" /></a>&nbsp; 
							</div>
							$channels_bit
						</td>
					
               <td width="100%" colspan="<if condition="$show['genchan']">2<else />3</if>">
                  <div style="width:100%; height: {$chatbox_height}px;overflow-y: auto;border: none; z-index: 1;" id="chats"> $vbphrase[mgc_cb_evo_loading] </div>
                  
					<!-- Chatbox whosonline in tab -->
					<if condition="$show['mgc_cb_evo_whoisonline'] && $vbulletin->options['mgc_cb_evo_whoisonline_showintab']">
						<div id="collapseobj_mgc_cb_evo_online" style="display: none;width:100%; height: {$chatbox_height}px;overflow-y: auto;border: none; z-index: 1;">
							<strong>$vbphrase[mgc_cb_evo_online_users]</strong> : <span id="mgc_cb_evo_nb_online_users"><if condition="$show['mgc_cb_evo_nouser_online']">0<else />$users_online[nb]</if></span> $vbphrase[mgc_cb_evo_users]
							<span id="mgc_cb_evo_online_users">
								<if condition="!$show['mgc_cb_evo_nouser_online']">
									<br />

									$users_online[list]
								</if>
							</span>
						</div>
					</if>
					<!-- / Chatbox whosonline in tab -->				                  
											
   
               </td>
            </tr>
   		</table>
         <!-- / Channel icons and chats -->   		
      </td>
   </tr>
   <!-- / Chatbox row -->
   
   <!-- Editor if position below -->
	<if condition="$vboptions[mgc_cb_evo_editor_position] == 1">
		$mgc_cb_evo_editor
	</if>
	<!-- / Editor if position below -->
	
	<!-- Who is online in the chatbox -->
	<if condition="$show['mgc_cb_evo_whoisonline'] && !$vbulletin->options['mgc_cb_evo_whoisonline_showintab']">
      <tr class="alt1">
         <td width="100%" colspan="2">
            <strong>$vbphrase[mgc_cb_evo_online_users]</strong> : <span id="mgc_cb_evo_nb_online_users"><if condition="$show['mgc_cb_evo_nouser_online']">0<else />$users_online[nb]</if></span> $vbphrase[mgc_cb_evo_users]
            <span id="mgc_cb_evo_online_users">
               <if condition="!$show['mgc_cb_evo_nouser_online']">
                  <br />
                  $users_online[list]
               </if>
            </span>
         </td>
      </tr>         
   </if>
	<!-- / Who is online in the chatbox -->
</tbody>
<!-- Chatbox inner in opened mode -->

<!-- Chatbox inner in closed mode -->
<if condition="($vbcollapse[collapseobj_mgc_cb_evo] == '') || ($vbcollapse[collapseobj_mgc_cb_evo] != '' && !$vboptions['mgc_cb_evo_nbchats_closed'])">
   <tbody id="mgc_cb_evo_closed" style="display:none;">
<else />
   <tbody id="mgc_cb_evo_closed" style="">
</if>
   <tr class="alt2">
      <td colspan="2">
         <div id="chats_last"></div>
      </td>
   </tr>
</tbody>
<!-- / Chatbox inner in closed mode -->
</table>

<!-- Javascript calls before the end of the chatbox display build -->
<script type="text/javascript">
   $js_channels_ids_array
   
   /* Overflow problem with some browsers */
   if (is_opera || is_saf || is_ns)
   {
      fetch_object('chats').style.overflow = 'auto';
   }
</script>

<!-- Chats retrieving loading when not in collapsed mode -->
<if condition="empty($vbcollapse['collapseobj_mgc_cb_evo'])">
   <if condition="!$vbulletin->options['mgc_cb_evo_inactive_mode'] || ($vbulletin->options['mgc_cb_evo_inactive_mode'] && !$vbulletin->options['mgc_cb_evo_inactive_mode_onload'])">
      <script type="text/javascript">
         chatbox_refresh('forced');
      </script>
   <else />
      <script type="text/javascript">
         fetch_object('chats').innerHTML = "<div align=\center\>$vbphrase[mgc_cb_evo_inactive]</div>";
      </script>
   </if>
<else />  
<!-- Chats retrieving loading when in collapsed mode -->
   <if condition="$vboptions['mgc_cb_evo_nbchats_closed']">
      <script type="text/javascript">
         mgc_cb_evo_get_last_chats();
      </script>  
   </if>
</if>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02181 seconds
  • Memory Usage 1,840KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete