PDA

View Full Version : how do i make this code work ?


pagekeeper
11-14-2004, 12:11 AM
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ######################### REQUIRE BACK-END ############################
chdir('/home/website/public_html/'); //edit path to your vbulletin directory
require('./global.php');
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'chat');

eval('$HTML = "' . fetch_template('chat') . '";');

$navbits = array();
$navbits[$parent] = 'Chat';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');
?>

the above code works on a normal page such as, forums/index.php but the images wont appear when i put it in forums/chat/index.php any ideas on why ?

Sean S
11-14-2004, 12:42 AM
the above code works on a normal page such as, forums/index.php but the images wont appear when i put it in forums/chat/index.php any ideas on why ?
I'm not good at php, but I guess that happens because of the global.php. Once you put that code in a different directory, you need to specify where global.php is. That's my guess. Someone more experienced with php could probably help out better.

Zachery
11-14-2004, 02:36 AM
the above code works on a normal page such as, forums/index.php but the images wont appear when i put it in forums/chat/index.php any ideas on why ?
The images wont appear?

AdminCP > Styles & Templates > STyle Manager > STyle Vars (from the drop down) >

make sure each style var path is a FULL URL

like
http://www.vbulletin.com/images/
not
/images

pagekeeper
11-14-2004, 02:51 AM
sorry i meant specifcally that page forums/chat/index.php ? the images everywhere else in the forum run normally its only that page.

Zachery
11-14-2004, 03:01 AM
sorry i meant specifcally that page forums/chat/index.php ? the images everywhere else in the forum run normally its only that page.
^ what i said above

pagekeeper
11-14-2004, 10:48 PM
hmm, some of the images work, but it seems the rest of the tables dont appear i think its the css not applying and i suspect the javascript etc?

isnt there any other way of making this page working without changing what you said above ?