vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   I would like to write some hacks which use the variables from vbulletin (https://vborg.vbsupport.ru/showthread.php?t=9452)

irc 02-22-2001 04:08 PM

Particularly the fonts and colors specified by the admin. Can someone post an example of code which I need to use to get access to these variables?

02-22-2001 04:09 PM

include ("./global.php");

Gives you access to the entire vBulletin engine.

02-22-2001 04:15 PM

Cool. So I can just look at the templates and files for examples of how they pull these variables. Thanks for the help. :)

02-26-2001 01:37 AM

Is there some way you can include globa.php if the software you are using is in a directory other than the one vB is in?

I have an image gallery program I'm trying to integrate, which is in websitename/gallery, whereas vB is in websitename/forums

If I hardcode the ref to global.php it obviously breaks, since it then tries to look up config.php, etc.

TIA,
Chris
Quote:

Originally posted by wluke
include ("./global.php");

Gives you access to the entire vBulletin engine.


02-26-2001 01:39 AM

just put the absolute path inside the quotes, or if the directory isn't that far away in the hiarchy you could use the '..''s to create a relative path.

02-26-2001 02:23 AM

Hmm, so I need to edit the global.php too, then? The problem is I told my addon where global.php was, but then inside global.php it calls config.php, which has a relative path to global.php, which confused my addon.

Did I confuse anyone else now? :)

Chris
Quote:

Originally posted by leadZERO
just put the absolute path inside the quotes, or if the directory isn't that far away in the hiarchy you could use the '..''s to create a relative path.

02-27-2001 12:42 PM

just use

include ("../gallery/global.php");

02-27-2001 01:25 PM

Ok...

The program resides in www.mysite.com/gallery. Forums are in www.mysite.com/forums

I did an include ("../forums/global.php"); but this is the error I get when I try to load the file that has the include:

Warning: Failed opening './admin/config.php' for inclusion (include_path='.:/usr/local/nusphere/apache/php/lib') in ../forums/global.php on line 48

Thanks,
Chris
Quote:

Originally posted by cyo
just use

include ("../gallery/global.php");


02-27-2001 02:31 PM

I'd like to know the solution to this too (if there is one). My fix was to simply always put the php file using global.php in the folder with the rest of message board files.

02-27-2001 02:55 PM

Code:

chdir($DOCUMENT_ROOT . "/forums");
include("$DOCUMENT_ROOT/forums/global.php");
chdir($DOCUMENT_ROOT . "/gallery"); // Only need this if you are going to call any files in the /gallery directory



All times are GMT. The time now is 07:33 AM.

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.01072 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete