Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, How to create your own vBulletin-powered page! (uses vB templates) in vBulletin; <div> How to create your own vBulletin-powered page! (uses vB templates) Want to create your very own vBulletin powered page ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3302


Reply
LinkBack Thread Tools Display Modes
How to create your own vBulletin-powered page! (uses vB templates)
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
08-09-2008, 07:19 PM
 
<div> How to create your own vBulletin-powered page! (uses vB templates)

Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well?

Well now you can Egypt.Com EnForum

Want to know how it will look? Take a look at the attached screenshot below! Egypt.Com EnForum

Now includes the Who's Online modification! Egypt.Com EnForum
Also, instructions included on how to create your own pages that are integrated with current vBulletin files! Egypt.Com EnForum

I'm going to give you a generic page but you can easily modify the contents of the page by changing the template Egypt.Com EnForum

So here we go Egypt.Com EnForum

Instructions:

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):<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">PHP Code:
PHP 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:<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">HTML
PHP 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>
All done Egypt.Com EnForum
Now check it out by going to test.php Egypt.Com EnForum

Who's Online Modification

Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find:<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">PHP Code:
PHP Code:
               case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break;
Below, add:<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">PHP Code:
PHP Code:
               case 'test.php':
        
$userinfo['activity'] = 'test';
        break;
(Be sure to change the values to your own!)

Then find:<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">PHP Code:
PHP Code:
                   case 'modcplogin':
            
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
            break;
Below add:<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">PHP Code:
PHP Code:
                   case 'test':
            
$userinfo['action'] = 'Viewing Test Page';
            break;
All done! Egypt.Com EnForum

----------------------------------

Also if you want to create your own pages 'within' current vBulletin files, do the following:

Open the file you want, and then right before the final ?> in the source code, add the following:

<div style="margin: 5px 10px;"> PHP Code:
PHP Code:
           if ($_REQUEST['do'] == 'xxx')
{
    eval(
'print_output("' . fetch_template('TEMPLATE_XXX') . '");');
}
Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple!
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
 
Junior Member

Reply With Quote
 
Join Date: Apr 2009
Location: Papua New Guinea
Posts: 6
18-04-2009, 08:33 AM
 
What the hell he is selling much reseller stuff.http://reseller-heaven.ko.cxorhttp:/...er.200gigs.com
__________________
Life is short
 
 
 
 
Junior Member

Reply With Quote
 
Join Date: Apr 2009
Location: Papua New Guinea
Posts: 6
18-04-2009, 08:43 AM
 
What the hell he is selling much reseller stuff.http://reseller-heaven.ko.cxorhttp:/...er.200gigs.com
__________________
Life is short
 
 
 
 
Junior Member

Reply With Quote
 
Join Date: Apr 2009
Posts: 1
19-04-2009, 04:48 PM
 
Hi my name is Joanna.I am 24 years old.I come from United Kingdom LondonI hope we have a great timeSome of my pictures you can see here:me in holiday with my girlfriends ^^LinkBucks.com - Get your share!ps:Theire not Adult or spam take a look and see
 
 
 
Reply

Articles Thread, How to create your own vBulletin-powered page! (uses vB templates) in vBulletin; <div> How to create your own vBulletin-powered page! (uses vB templates) Want to create your very own vBulletin powered page ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3302


Bookmarks

Tags
create, page, templates, vbulletin, vbulletinpowered


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vBulletin Mod :Let PHP Live! (Allow PHP code in templates) - 3.6.x Developer Mods for 3.6.x 100 26-05-2009 12:55 PM
200 Web Page Maker Templates Developer Web Application 1 26-12-2008 02:36 PM
Create a Custom 404 Page Developer Articles 0 28-10-2008 04:53 PM
Alphabetical Search Menu for your vBulletin page Developer Articles 0 22-09-2008 03:20 AM
Redirect guests to register page from no permission page. Increase Registrations Developer Mods for 3.7.x 0 18-09-2008 09:19 AM