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 |
#642
|
|||
|
|||
Here is a question:
Using the instructions given it took about 30 seconds to get an additional template driven page into my forum, which was nice Now I am fiddling around trying to get data from the database into a html table in the template and have hit a wall. Just for the sake of testing I am attempting to select all users from a specific user group and display their username in a table. So to do this after this line: Code:
$navbits[$parent] = 'Test Page';
Code:
$userlist = $db->query_read_slave("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE usergroupid = 2"); while ($user = $db->fetch_array($userlist)) { //print_r($user); } $db->free_result($userlist); As an example if the select return 2 users (Bob & Dave) I want to render a table that looks like this: Code:
<table> <tr> <td>Username</td< </tr> <tr> <td>Bob</td> </tr> <tr> <td>Dave</td> </tr> </table> |
#643
|
|||
|
|||
Is it against the law to embed other websites into your own? because I got a complaint lol
|
#644
|
|||
|
|||
It's not another website, it's one i own. I own www.mummybrain.com but want to open www.mummybrain.com/tickers/ inside looking like it's vB. Is that the best way to do this? All i really need is just the header, but thought this might be able to do it. But i can't copy and paste all the code, cos then it doesn't work.
|
#645
|
||||
|
||||
Quote:
It's not against the law. It's more like free advertisment. They still get the hit to their website, and your not hotlinking anything. |
#646
|
|||
|
|||
Does anyone know how to insert $forumbits in test.php so that it will display some threads ??? (or any reason this wouldnt work ?)
edit: seems to be working now. |
#647
|
|||
|
|||
Can I have the php pages set outside the forum root. Basically at the host root?
|
#648
|
|||
|
|||
Amazing !
Works perfectly - even managed to get it into the Navbar |
#649
|
|||
|
|||
Thank you to the original poster for providing this source code.
I have successfully installed the test page. Is there a way to only allow the test page to load if the user is logged in? I allow guests to browse my forums; but I do not want them to be able to browse my test page. Regards, Robert |
#650
|
|||
|
|||
Quote:
|
#651
|
||||
|
||||
I keep running into parse errors for some reason. I don't know why though since I've used this writeup before to add pages to another of my forums. On this other forum, I'm having issues. The forums are with different hosting companies. Would that make a difference?
The first error that I got said that there was a parse error due to an unexpected ~ on line 4. I took the tilde out and then it told me this: Code:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/v/e/r/vermontoutdoor/html/forum/writeups.php on line 8 Code:
// #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'writeups'); // change this depending on your filename |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|