The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
HELP for new php page
[I have 3.8.4 vBulletin]
Hello, I need to create an editable page where I'm going to write somethings, but I don't want a page in simple html, but in PHP with the dependence of the site. Iwant a page with the fixed elements of my forum (header, background, footer) but that is editable in central part of how I want to. Someone help me? Thank you so much |
#2
|
||||
|
||||
Create a new file, whatever you want to call it (let's say test.php).
Open up test.php and add the following (replace TEST with whatever template you want to show ): Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'test'); // 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( 'TEST', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = 'Test Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('TEST') . '");'); ?> Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example). Now create the template, called TEST with the following content: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Title</td> </tr> <tr> <td class="alt1">Text</td> </tr> </table> $footer </body> </html> More info : https://vborg.vbsupport.ru/showthread.php?t=62164 |
Благодарность от: | ||
tbworld |
#3
|
|||
|
|||
Thank you so much !!!!!!!!!!!!!!!!!!!!!!!!!!!
All fast and simple !!! I have only a problem: I have create one template every Style ID, but when change style on my new created page, this is result on screen: Unable to add cookies, header already sent. File: /home/real9bdb/public_html/negozio.php Line: 12 How can I fix it? --------------- Added [DATE]1393689903[/DATE] at [TIME]1393689903[/TIME] --------------- I soved ! Problem was into PHP file ! Thanks again |
Благодарность от: | ||
omardealo |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|