The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PHP page with my VB forum style
Hi I asked this question here, please read to understand what I am going to ask
https://vborg.vbsupport.ru/showthread.php?t=121741 What it is I want is to be able to just have a php pahe with all the code that is needed for the php page like MP3 did here then this template also in the code PHP Code:
Can some one help on this or is it a big job? |
#2
|
|||
|
|||
Hi there,
It seems you are trying to execute PHP (an include) in your template. Wich is not possible, a template is just text that is being read and has no PHP capability's. You should and move that include to your .php file. And use the variables of that file in your templates. Hope this is a little bit clear |
#3
|
||||
|
||||
yer thats what I want but I dont know how to add the variables to my php page, as I am not that good on php so I was hoping some one would help me do that bit
Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'MP3'); // change this depending on your filename // ################### 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( 'mp3', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = 'MP3 Home Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('mp3') . '");'); ?> Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar include('file.php'); $footer </body> </html> |
#4
|
|||
|
|||
Move this:
Code:
include('file.php'); PHP Code:
|
#5
|
||||
|
||||
is there know way I can do it the other way and just add the template to the php file like these $footer, $header, $navbar etc etc......
that way all I have to do is add the include for the files I need, its just that there scripts these other files |
#6
|
|||
|
|||
Not that I know and I woudn't advise it.
The template system is a powerfull tool. Why not take the time and efford to learn how to use it ? |
#7
|
||||
|
||||
lol i know how to use the templates section as I have done mods using it, I just want to be able to pull some info from there into some php pages, it must be able to be done as some mod do this.
Can any one help on this?? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|