Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2001, 04:08 PM
irc's Avatar
irc irc is offline
 
Join Date: Feb 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #2  
Old 02-22-2001, 04:09 PM
Guest
 
Posts: n/a
Default

include ("./global.php");

Gives you access to the entire vBulletin engine.
Reply With Quote
  #3  
Old 02-22-2001, 04:15 PM
Guest
 
Posts: n/a
Default

Cool. So I can just look at the templates and files for examples of how they pull these variables. Thanks for the help.
Reply With Quote
  #4  
Old 02-26-2001, 01:37 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #5  
Old 02-26-2001, 01:39 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #6  
Old 02-26-2001, 02:23 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #7  
Old 02-27-2001, 12:42 PM
Guest
 
Posts: n/a
Default

just use

include ("../gallery/global.php");
Reply With Quote
  #8  
Old 02-27-2001, 01:25 PM
Guest
 
Posts: n/a
Default

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");
Reply With Quote
  #9  
Old 02-27-2001, 02:31 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #10  
Old 02-27-2001, 02:55 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04620 seconds
  • Memory Usage 2,228KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete