Jacquii Cooke Blogs JacquiiDesigns.com

The Designers Blog.

The JacquiiDesigns Blog contains random posts by Jacquii Cooke.  Mostly there will be uncategorized tidbits you may or may not be interested in... Tongue out No doubt the posts will be unique, witty & one-of-a-kind as is JacquiiDesigns.

Of course - If you're interested in obtaining any of our services (creative content writing is available...) don't hesitate to use our system or Send An Email to Jacquii.

As always - Enjoy the site and feel free to post commentary if you like.

JacquiiDesigns.com Blog Articles

By MsJacquiiC
Published: June 7, 2009
Print    Email

vBulletin Custom PagesCreating Custom vBulletin Pages

Adding customized, vBulletin-powered pages to your forum is easy as Grandma's blueberry cobbler.  There are only a few steps to complete and you will have your own vBulletin pages which will use your own header, footer and usergroup permissions!  The easy-to-follow steps for vBulletin custom page implementation follows below:

  1. Create a.php file which will upload to your forum root directory.
  2. Create a custom template with the html contents of your new page.

First you will create a new .php file which you will upload to your forum's root directory.  For instance - if your forum is in a folder called "forum" -- Upload your new .php file to the "forum" directory.  If your forum is in your main site root "public_html" -- Then upload your new .php file to that directory.  Please be assured that your newly created .php file is uploaded into the same directory as your index.php file.

So - We shall start off by opening a text editor of your choice.  JacquiiDesigns recommends you use the open source Notepad++, a freely available, easy-to-use, notepad replacement source code editing application.  Paste the following code into a blank page:

<?php

error_reporting(E_ALL & ~E_NOTICE);


define('NO_REGISTER_GLOBALS', 1); 
define('THIS_SCRIPT', 'NAME OF CUSTOM PHP FILE NAME'); 

$phrasegroups = array( );
$specialtemplates = array( );
$globaltemplates = array( 'NAME OF CUSTOM TEMPLATE', );
$actiontemplates = array( ); 

require_once('./global.php'); 

$navbits = array(); 
$navbits[$parent] = 'TITLE PAGE TO APPEAR IN NAVIGATION'; 
$navbits = construct_navbits($navbits); 

eval('$navbar = "' . fetch_template('navbar') . '";'); 
eval('print_output("' . fetch_template('NAME OF CUSTOM TEMPLATE') . '");'); 

?>

 

Please take special notice to four (4) capitalized text fields which will need to be edited in the code above as follows:

  1. NAME OF CUSTOM PHP FILE NAME:  If your page will be "advertise.php" -- Change the capitalized text to "advertise"
  2. NAME OF CUSTOM TEMPLATE:  In the next step you will create a new template.  If the exact name of that template will be called "advertise-page" -- Please change the capitalized text to "advertise-page"
  3. TITLE PAGE TO APPEAR IN NAVIGATION:  Change this capitalized text to whatever text you want to show in your navbits.  For example "Advertise On Our Forum" would be a suitable text replacement.
  4. NAME OF CUSTOM TEMPLATE:  Again - Replace the capitalized text with the name of the new template you will complete in the following step.

Now save & upload your newly created .php file to your forum's root directly as mentioned above.  1st Step is now complete.  Congratulations.

So...  Now that the new .php file has been created and uploaded, you will need to add the new template mentioned in your .php file. You will add the template via your vBulletin AdminCP.  This step is about as easy as Mama's sweet sweet applie pie. Kiss

Moving forward:  To create your new template -- Please browse to your AdminCP --> Styles & Templates --> Style Manager --> ((Select from the dropdown menu of your style)) Add New Template.  Then include the following for your template creation:

  1. Title: Include the title you set in Step #2 above.  Make sure you use the exact spelling (case-sensitive) in the title of your new template.
  2. Template: In the larger formfield, paste the following code.  You will replace the <!-- CONTENT OF YOUR CUSTOM PAGE /--> with the actual html code of your page's content.

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">

<head>
$headinclude
<title>TITLE OF PAGE - $vboptions[bbtitle]</title>
</head>

<body>
$header
$navbar

<!-- CONTENT OF YOUR CUSTOM PAGE /-->

$footer
</body>
</html>

 

  1. Custom Table Code: You can use the following html code in place of the <!-- CONTENT OF YOUR CUSTOM PAGE /--> to create a table of the same style as most tables in your vBulletin style.  Simply replace "TABLE TITLE" with the title of your table, and likewise, replace "TABLE CONTENTS" with your table's custom content.

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">TABLE TITLE</td>
</tr>
<tr>
<td class="alt1">TABLE CONTENTS</td>
</tr>
</table>



2302 Views - View Comments (1)

Highly Recommended | Affordable, Quality VPS & Dedicated Webhosting With HostV!
(Let us know if you choose HostV or shared hosting from Cirtex as your web host solution...)

Real-Time Live Chat

LiveZilla Live Help

What's Up With You?

Request Your Free Quote!

Request Your Custom Quote Today.

About Jacquii Cooke

Premium Webhosting