try another color scheme:


Go Back   TECH6.0 > Web Design/Development and SEO > Internet Forum Softwares > vBulletin


Create your own vBulletin-Powered page

This is a discussion on Create your own vBulletin-Powered page within the vBulletin section, part of the Internet Forum Softwares category; Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as ...

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1  
Old 28-05-2008, 05:40 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default Create your own vBulletin-Powered page

Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well? A live example of this complete process can be seen if you view our Privacy Statement and Advertise page.

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):

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
define('CSRF_PROTECTION'true);

// ################### 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
<br /><div style="z-index:3" class="smallfont" align="center">SEO by <a rel="nofollow" href="http://www.vbseo.com/1394/">vBSEO</a> 3.2.0</div><br /><div style="z-index:3" class="smallfont" align="center">SEO by <a rel="nofollow" href="http://www.vbseo.com/1394/">vBSEO</a> 3.2.0</div></body>
</html> 
Note: The following should be added to all of the forms which POST back to vBulletin or a vBulletin script. This will automatically be filled out with a 40 character hash that is unique to the user.

HTML Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> 
Now you may check it out by going to test.php

Adding Custom Online Locations

If you want Who's Online to reflect your new custom page when someone is browsing it (rather than Unknown Location), do the following steps:

1. Open AdminCP.
2. Plugin System -> Add New Plugin
3. Fill in the following:
Code:
      Product: vBulletin
      Hook Location: online_location_process
      Title: My Custom Location (Part1)
      Plugin PHP Code: if ($filename == 'test.php')
      {
              $userinfo['activity'] = 'test';
      }
      Plugin is Active: Yes
4. Click Save.
5. Plugin System -> Add New Plugin
6. Fill in the following:
Code:
      Product: vBulletin
      Hook Location: online_location_unknown
      Title: My Custom Location (Part2)
      Plugin PHP Code: if ($userinfo['activity'] == 'test')
      {
              $userinfo['action'] = 'Viewing Test Page'; // you might wanna use a $vbphrase here...
              $userinfo['where'] = '<a href="./test.php' . $vbulletin->session->vars['sessionurl'] . '">This is My Test Page</a>'; // you might wanna use a $vbphrase here...
              $handled = true;
      }
      Plugin is Active: Yes
7. In each of the above two, make sure to change "test" values to your own.
8. Note that $userinfo['where'] is optional. It can be controlled with a usergroup permission "can view detailed location".

You are done!

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

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:

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!
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #2  
Old 04-06-2008, 12:15 PM
iBlake's Avatar

Techie
 
Name: Blake
Join Date: May 2008
Location: United States
Phone: Not in the list
Posts: 91
iBlake is on a distinguished road
Send a message via MSN to iBlake
Default

Do you know if this is leagle without a licsence?
__________________
My iPhone is better than yours...........

I Am Back!
Reply With Quote
  #3  
Old 04-06-2008, 05:03 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

Do you know if this is leagle without a licsence?
As Said by iBlake View Post
i did not understood what you mean !!
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #4  
Old 05-06-2008, 12:40 AM
iBlake's Avatar

Techie
 
Name: Blake
Join Date: May 2008
Location: United States
Phone: Not in the list
Posts: 91
iBlake is on a distinguished road
Send a message via MSN to iBlake
Default

Nevermind. I looked it up.

To All: THIS IS LEGAL!!!
__________________
My iPhone is better than yours...........

I Am Back!
Reply With Quote
  #5  
Old 09-03-2009, 11:40 AM
No Avatar
Chennairam

Guest
 
Posts: n/a
Default

Dear Admin sir

I Create a Test.php page which you mention sample code In 1st thread

http://chennaigsm.org/forums/test.php

can you tell pls

How to Create a Test templete pls
Reply With Quote
  #6  
Old 09-03-2009, 12:52 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

Your page has some problem still. Its giving me an error of unable to add cookies. Read the instructions carefully and redo it.

How to Create a Test templete pls
The whole process is already described in 1st post.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #7  
Old 10-03-2009, 02:23 AM
David's Avatar

Techie
 
Name: David
Join Date: Aug 2008
Location: United States
Posts: 54
David is on a distinguished road
Default

good tutorial and nice and easy to understand!
__________________
Hey everyone! I'm David McHenry and I run a Nintendo Wii Forums
Reply With Quote
  #8  
Old 11-03-2009, 12:17 AM
No Avatar
Chennairam

Guest
 
Posts: n/a
Default

Still I cant Sir

to Create a Templete Called Test

Tell me pleae

Last edited by Chennairam; 11-03-2009 at 12:22 AM.
Reply With Quote
  #9  
Old 11-03-2009, 08:20 AM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

I have no idea how to explain better than that. Its easy enough and explained in the best possible way already. At what step you're having problem.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #10  
Old 11-03-2009, 08:38 AM
No Avatar
Chennairam

Guest
 
Posts: n/a
Icon14

This Step i Dont have Any idea To create Sir

other Steps plugin AndOther steps i done I having To Create Test Templete Sir


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:

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
<br /><div style="z-index:3" class="smallfont" align="center">SEO by <a rel="nofollow" href="http://www.vbseo.com/1394/">vBSEO</a> 3.2.0</div><br /><div style="z-index:3" class="smallfont" align="center">SEO by <a rel="nofollow" href="http://www.vbseo.com/1394/">vBSEO</a> 3.2.0</div></body>
</html>
Reply With Quote
  #11  
Old 11-03-2009, 11:14 PM
No Avatar
Chennairam

Guest
 
Posts: n/a
Default

i made a new templete also

Now getting error When i Login In Who.is

This error on Top :-
Code:
Parse error: syntax error, unexpected T_STRING in /home/chennaig/public_html/forums/includes/functions_online.php(2135) : eval()'d code on line 5

Parse error: syntax error, unexpected T_STRING in /home/chennaig/public_html/forums/includes/functions_online.php(1167) : eval()'d code on line 21
please help me What this error
Reply With Quote
  #12  
Old 12-03-2009, 09:14 AM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

Now getting error When i Login In Who.is
What is who.is?

Dude, I think you really need to hire somebody to get these things done. Its hard to understand you most of the time.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #13  
Old 12-03-2009, 09:16 AM
No Avatar
Chennairam

Guest
 
Posts: n/a
Icon14

What is who.is?

Dude, I think you really need to hire somebody to get these things done. Its hard to understand you most of the time.
As Said by webwizzy View Post
Sorry Sir

Wrong Type When i Checking whois online Getting That Error


sorry For bad english
Reply With Quote
  #14  
Old 13-03-2009, 09:00 AM
No Avatar
Chennairam

Guest
 
Posts: n/a
Default

Finally i did

Thx To Tech6 for This post

here for example :-
www.chennaigsm.org/forums/downloads.php
Reply With Quote
  #15  
Old 14-04-2009, 04:36 PM
sundar's Avatar

Techie
 
Join Date: Oct 2008
Posts: 57
sundar is on a distinguished road
Default

hi i tried, like wat u said in 1st post in my testing forum its work fine but in my running forum am getting database error here is the link pls help me........

Getting database error in this link:

http://www.srimeenakshimobiles.com/forums/test.php

works fine:

http://www.srimeenakshimobiles.net/forums/test.php
Reply With Quote
Reply

Bookmarks

Tags
templates, vbulletin


Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://tech6.com/f51/create-your-own-vbulletin-powered-page-t133/
Posted By For Type Date
vBPlusMe - About vBulletin Solutions Blog Archive Custom Templates - The Right Way This thread Refback 30-03-2009 10:00 AM



All times are GMT +5.5. The time now is 10:47 AM.

Contact Us - Tech6.com - Link to Us - Advertise - Submit Site - Privacy Statement - TOS - Top