vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   call a vBUlletin PHP script from a different php script (https://vborg.vbsupport.ru/showthread.php?t=110261)

Bhuwan 03-13-2006 06:36 PM

call a vBUlletin PHP script from a different php script
 
I am using require_once .... and it works great, except the phrases arent being displayed...not sure why

merk 03-13-2006 08:34 PM

Have you setup the vBulletin enviroment properly? You need to fill out the variables below to make sure vBulletin knows what templates and phrases to load.

PHP Code:

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./global.php'); 


Bhuwan 03-13-2006 08:45 PM

Quote:

Originally Posted by merk
Have you setup the vBulletin enviroment properly? You need to fill out the variables below to make sure vBulletin knows what templates and phrases to load.

PHP Code:

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
 
// get special data templates from the datastore
$specialtemplates = array();
 
// pre-cache templates used by all actions
$globaltemplates = array();
 
// pre-cache templates used by specific actions
$actiontemplates = array();
 
// ######################### REQUIRE BACK-END ############################
require_once('./global.php'); 


Those variables are already setup int he script im trying to load (showthread.php for example). Would they need to be setup AGAIN ?

merk 03-13-2006 08:51 PM

Why are you trying to load showthread.php like that?

Bhuwan 03-13-2006 08:52 PM

Quote:

Originally Posted by merk
Why are you trying to load showthread.php like that?

just wanna avoid using mod rewrites.

merk 03-13-2006 08:56 PM

So make a copy of showthread.php and rename it to what you want.

Bhuwan 03-13-2006 08:59 PM

Quote:

Originally Posted by merk
So make a copy of showthread.php and rename it to what you want.

but i have to pass it through my.php file. There has tob e a way!

merk 03-13-2006 09:01 PM

There might be, but when there are easier ways I really dont see a need.

mod_rewrite is the solution you're after.

Bhuwan 03-13-2006 10:45 PM

Quote:

Originally Posted by merk
There might be, but when there are easier ways I really dont see a need.

mod_rewrite is the solution you're after.

the problem is that Rewritecond's doesn't handle # properly.

merk 03-14-2006 12:20 AM

You cant have the # character in a query string. It is a delimiter that the browser uses to scroll.


All times are GMT. The time now is 01:56 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.01114 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_php_printable
  • (4)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