The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
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 Want to know how it will look? Take a look at the attached screenshot below! Now includes the Who's Online modification! Also, instructions included on how to create your own pages that are integrated with current vBulletin files! I'm going to give you a generic page but you can easily modify the contents of the page by changing the template So here we go 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:
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 </body> </html> Now check it out by going to test.php 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: PHP Code:
PHP Code:
Then find: PHP Code:
PHP Code:
---------------------------------- 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:
edit by Lynne: If running 3.8.4 or above, see this post to take care of the PHP 5.3.0-related problems - https://vborg.vbsupport.ru/showpost....postcount=1171 |
#842
|
|||
|
|||
If you have more than one style, is it possible to use this on a style other than the predomanant style?
I can get it working hith the main style of my forum but if I create a new style and make a new template in the new style, all I get is a blank page. Interestingly if I go to /forums/test/php?style=........whatever that style ID# is, I will get the page, HOWEVER, it changes the style of the forum to that ID style...... |
#843
|
|||
|
|||
Quote:
|
#844
|
||||
|
||||
Quote:
|
#845
|
|||
|
|||
Quote:
This is one of the pages I got all the info to do the conditional. But everybody seems to have their own ideas and nothing worked for me. https://vborg.vbsupport.ru/showthrea...=62164&page=37 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') . '");'); ?> |
#846
|
||||
|
||||
Quote:
PHP Code:
PHP Code:
|
#847
|
|||
|
|||
Hi Lynne,
Thank you for responding. After 'literally' going through every single thread and carefully re-reading @ Digital Jedi's responses, I have figured it out. Although my links were working this way: http://www.mywebsite.com/misc.php?do...te=downloads_1 As DJ said, I had created my templates wrong. I went back and re-config'd my templates as just "downloads_1" and added this right below "Start Main Script" Code:
if ($show['guest']) { print_no_permission(); } Whoooo! Thanks everybody for your expert help and for straightening me out |
#848
|
|||
|
|||
i got this error :
Unable to add cookies, header already sent. Line: 1 and this is my page php code : Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'chatbox'); // 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( 'chatbox', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = 'chatbox'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('chatbox') . '");'); ?> |
#849
|
||||
|
||||
I notice your template is named chatbox. Are you trying to use combine this with another modification?
|
#850
|
|||
|
|||
Quote:
============ Edited : My Problem Solved but new problem appear! now it cache a bit more ! for example i have to press Ctrl+F5 to see something new on it ! why it cached ? |
#851
|
||||
|
||||
hey all, after reading through this thread i am a little lost, i need to create a page with php code from linkmarket embedded into it .
I was able to the the page running, having trouble addign PHP code to it. anyone can help? This is what i got for my template: Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle] - $pagetitle</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr class="tcat"> <td><strong>Resouces</strong></td> </tr> <tr> <td class="alt1"> <?php ../mylinks.php ?> </td> </tr> </table> $footer </body> </html> here is the code i need to add: Code:
<?php /* Link Market Link Page Module Copyright 2003 Link Market, All Rights Reserved. WARNING: Do not changecode below or your link page will not work! */ $user_id = ""; $url = "http://api.linkmarket.com/mng_dir/get_links.php?user_id=" .$user_id."&cid=".$_GET['cid']."&start=".$_GET['start'].""; echo GetLMDSContent($url); function GetLMDSContent($url) { $buffer = ""; $urlArr = parse_url($url); if($urlArr[query]) { $urlArr[query] = "?".$urlArr[query]; } $fp = fsockopen($urlArr[host], 80, $errno, $errstr, 30); if (!$fp){echo "$errstr ($errno)<br />\n";} else { $out = "GET /".substr($urlArr[path], 1).$urlArr[query]." HTTP/1.0\r\n"; $out .= "Host: ".$urlArr[host]."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $buffer .= fgets($fp, 128); } fclose($fp); } $buffer = strstr($buffer,"\r\n\r\n"); return $buffer; } ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|