Log in

View Full Version : Custom pages


unknowngiver
10-07-2005, 11:14 AM
Hey
can anyone PLEASE PLEASE PLEASE PLEASE tell me how can i make custom pages for vbulletin 3.5

Like make another .php page with the theme[template] showing...the header and the footer...just like any other pages...and be able to add PHP code in tht new page..i really really need this
Thanks

Andreas
10-07-2005, 11:16 AM
<a href="https://vborg.vbsupport.ru/showpost.php?p=787726&postcount=2" target="_blank">https://vborg.vbsupport.ru/showp...26&postcount=2</a>

unknowngiver
10-07-2005, 12:54 PM
hi
thanks
but that tutorial only tells u how to add TEXT into the custom page
i have a php code that i want to add to my custom page...can anyone help me with it

evenmonkeys
10-07-2005, 11:22 PM
You'll have to use plug-ins. Create a custom page and call for the variable in that custom page. For example...

$variable

Now create a plug-in that calls for the php file and defines the variable. You can do this with the following script. Be sure to set it to global_start.

ob_start();
include('hyperlink_to_the_php_file');
$variable = ob_get_contents();
ob_end_clean();

That's how I've done it.

Andreas
10-07-2005, 11:26 PM
That doesn't make much sense :)
If you are coding your own, custom files anyway you can directly enter whatever PHP Code you want/need.

unknowngiver
10-18-2005, 10:17 PM
That doesn't make much sense :)
If you are coding your own, custom files anyway you can directly enter whatever PHP Code you want/need.
explain pleasE :(

dsotmoon
10-19-2005, 01:34 AM
cant you follow the directions in this thread https://vborg.vbsupport.ru/showthread.php?t=98009 and just add in your php code in the template?

unknowngiver
10-20-2005, 11:02 AM
I tried but the PHP wont work in the template file..HTMl works but PHP wont work..

unknowngiver
10-31-2005, 04:16 PM
:( been askin this for like 3 months..

unknowngiver
11-14-2005, 04:05 PM
anyoneee gosh
there are so many coders here and not 1 can help me out

unknowngiver
11-24-2005, 02:52 PM
come on i really need this :(

Marco van Herwaarden
11-24-2005, 03:35 PM
If you want to make a new page, create a new PHP file with the following content and work from there:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'myscript');

// ################### 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');

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################

?>