vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   how do i make this code work ? (https://vborg.vbsupport.ru/showthread.php?t=71720)

pagekeeper 11-14-2004 12:11 AM

how do i make this code work ?
 
Quote:

<?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

Quote:

Originally Posted by pagekeeper
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

Quote:

Originally Posted by pagekeeper
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

Quote:

Originally Posted by pagekeeper
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 ?


All times are GMT. The time now is 11:49 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.01148 seconds
  • Memory Usage 1,724KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete