PDA


View Full Version : integrating vb pages into vba cmps


scruby
11-20-2005, 11:12 PM
What I want to do is something lots of people have done as mentioned in
11895.

I'm using vbadvanced 2.0.0 and vbulletin 3.5.1, and have followed the instructions to the letter in http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6

what happens is that the page I'm adding (original vbulletin index.php) replaces the entire page without any of the other modules showing.

this is the top of index.html:

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

/*======================================================================*\


this is what's in includes/functions.php:

function print_output($vartext, $sendheader = true)
{
global $pagestarttime, $querytime, $vbulletin;
global $vbphrase, $stylevar;
if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_
SCRIPT'))
{
define('SKIP_OUTPUT', true);

global $home;

print_portal_output($home, $vartext);
}
if ($vbulletin->options['addtemplatename'])
{
if ($doctypepos = @strpos($vartext, $stylevar['htmldoctype']))
{
$comment = substr($vartext, 0, $doctypepos);
$vartext = substr($vartext, $doctypepos + strlen($stylev
ar['htmldoctype']));
$vartext = $stylevar['htmldoctype'] . "\n" . $comment .
$vartext;
}

scruby
11-21-2005, 12:32 AM
this line in cmps_index.php,

define('VBA_SCRIPT', 'CMPS');

ensures that VBA_SCRIPT is always defined when calling print_output()
so, the manual's recommendation in http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6 does not work.

my fix is to replace !defined('VBA_SCRIPT') in functions.php with defined('VBA_INTEGRATED')
and in index.php adding the line define('VBA_INTEGRATED',true);

If somebody wants to tell the real fix, I'm listening.

scruby
11-21-2005, 01:07 AM
DIRP!

I figured it out. You don't view it through cmps_index.php
You link directly to index.php and the left column automatically appears

KW802
11-21-2005, 01:14 AM
Scruby,

Glad to see you got it worked out. :cool: Yes, it works exactly as you described... you load the 3rd party script as normal and then the 'page identifier' value is used to determine which modules should be shown.

scruby
11-21-2005, 01:53 AM
Any modules that should display below the custom content (contents of original index.php), or in the right column won't show up.

I could of sworn I saw a fix for this in some other thread, but I'm having a rough time finding it.