Back to vBulletin 3 Articles

Making new pages
by ultimatearco 15 Nov 2008
Rating: (2 votes - 5.00 average)

Hello all,
In this tutorial i'm going to show you how to make extra pages
Note:

Go into your Admincp, klick Styles & Templates, klick Style Manager, klick your template that your'e working with, hover your mouse to the dropdown menu and klick, klick Add Template

Give your template a name:
(like gallerytemplate)
and add this code to it:
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">Tutorials</td>
</tr>
<tr>
 <td class="alt1">
<!-- html code here -->
PUT THE HTML CODE YOU WANT HERE
<!-- end of html code -->
</td>
</tr>
</table>
$footer
</body>
</html>
Search for:
Code:
<!-- html code here -->
and add some stuff like:
HTML Code:
<p>Hello, this is my gallery</p><br>
<img src="yourimages" border="0"></img><br>
<p>^^My favorite picture^^
You can allways do anything else

Now save it, were nothing with that
Now we are going to make the PHP file
Open notepad
add this code in it
PHP Code:
<?php 
 
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE); 
 
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''privacy'); // 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( 
    
'privacytemplate'
); 
 
// pre-cache templates used by specific actions 
$actiontemplates = array( 
 
); 
 
// ######################### REQUIRE BACK-END ############################ 
require_once('./global.php'); 
 
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
 
$navbits = array(); 
$navbits[$parent] = 'name'
 
$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
eval(
'print_output("' fetch_template('templatename') . '");'); 
 
?>
Note: Allways put this on the root directory of the forum otherwise you will have problems with the images
Find:
PHP Code:
define('THIS_SCRIPT''scriptname'); // change this depending on your filename 
Change privacy (keep the ' ') to the name of your file (without .php after it)

Find:
PHP Code:
$navbits[$parent] = 'name'
Change name (keep the ' ') to whatever you want

Find:
PHP Code:
eval('print_output("' fetch_template('templatename') . '");'); 
Change templatename (keep the ' ') to the template you just made

Save it to whatever you want (Make sure its the same name as in edit 1 (scriptname) and with .php after it)

Upload it to your webserver and your'e done!

If you want it to appear it into your navbar i suggest to:
Use my Navbar Edit mod (for all vB versions) (Manual code changes)
Or to download the double navigation bar mod
Attached Thumbnails
Click image for larger version
Name:	pic1.PNG
Views:	332
Size:	15.5 KB
ID:	89399   Click image for larger version
Name:	customtemplate.jpg
Views:	265
Size:	36.8 KB
ID:	89400   Click image for larger version
Name:	templateedit.jpg
Views:	248
Size:	60.4 KB
ID:	89401  

vblts.ru supports vBulletin®, 2022-2024