Thread: Chat Modifications - MGC Chatbox (with AJAX)
View Single Post
  #1712  
Old 10-16-2007, 02:54 PM
class101 class101 is offline
 
Join Date: Sep 2007
Location: France
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MGC Chatbox 1.5 & vBadvanced CMPS Integration

First read the documentation to build the chatbox module in vBa, I assume you already have your Chatbox template module linked to a template adv_portal_mgc_chatbox with the variable
$mgc_chatbox into. Then follow theses instructions:

1) MGC Chatbox > Display and position > Display on defined pages above the navbar > NO
2) MGC Chatbox > Display and position > Display on defined pages in a variable > YES
3) vBa CMPS > Default Settings > Main Options > Portal Output Global Variables > Enter the value mgc_chatbox
4) Plugins & Products > Plugin Manager > Product : MGC chatbox : Variables globales chatbox > Click Large Edit Box and start editing as mentioned below:

FIND

Code:
	if (THIS_SCRIPT == 'adv_index' && !empty($forumpath)) {
		$mgc_cb_floc = $forumpath;
	} else {
		$mgc_cb_floc = '.';
	}
AND DELETE IT, SAVE THE FILE.

5) Styles & Templates > Style Manager > Edit Templates > MGC Chatbox Templates > mgc_chatbox and start editing as mentioned below:

FIND

Code:
var mgc_cb_jsloc = "$mgc_cb_floc";
REPLACE BY

Code:
var mgc_cb_jsloc = "$vboptions[bburl]";
FIND

Code:
<script type="text/javascript" src="$mgc_cb_floc/clientscript/mgc_chatbox.js"></script>
REPLACE BY

Code:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/mgc_chatbox.js"></script>
6) Styles & Templates > Style Manager > Edit Templates > MGC Chatbox Templates > mgc_chatbox_editor and start editing as mentioned below:

FIND

Code:
<a href="mgc_chatbox.php?$session[sessionurl]do=view_chatbox" target="_blank">
REPLACE BY

Code:
<a href="$vboptions[bburl]/mgc_chatbox.php?$session[sessionurl]do=view_chatbox" target="_blank">
FIND

Code:
<a href="mgc_chatbox.php?$session[sessionurl]do=view_chatbox" target="_top">
REPLACE BY

Code:
<a href="$vboptions[bburl]/mgc_chatbox.php?$session[sessionurl]do=view_chatbox" target="_top">
Pay attention to correct each steps carefully and MGC will run smoothly (This does not alter in any way how MGC is working, I have checked carefully my modifications the way that it shouldnt produce new bugs or disable functions, but if you have a problem feel free to report.)
It makes MGC no more dependent on directories paths so you must be able to place it in any dir/pages with $mgc_chatbox like vba wich is often placed in another one.

france 0wwnz ) Greetings VBDev , hope I helped you out
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02224 seconds
  • Memory Usage 1,781KB
  • 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
  • (9)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