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 |
#1362
|
||||
|
||||
how to check on database, on what table to look
|
#1363
|
||||
|
||||
You'd look at your template table.
Did you look at your error_logs? |
#1364
|
||||
|
||||
i empty the error_logs and then create new template, error_log its still empty
i looked on table template and i see it the new created template, and those i create before, so if i want to edit them i must edit via phpmyadmin, couse i dont see them on vbulletin admincp |
#1365
|
||||
|
||||
Something is wrong on your site if it will not give you the full list of templates. Do you have any modifications? Try disabling them.
|
#1366
|
||||
|
||||
Quote:
and take a look on the template i still didnt see the custom templates ahhh |
#1367
|
||||
|
||||
If you have ticket support, I would suggest putting in a ticket.
|
#1368
|
||||
|
||||
no i dont have
|
#1369
|
||||
|
||||
bump, still no sollytion if i wanna to edit the template i need to edit via database directly
|
#1370
|
|||
|
|||
thanks for this, this is what i want to
--------------- Added [DATE]1327200411[/DATE] at [TIME]1327200411[/TIME] --------------- ok now i have a question. i your attachment look like this but what i gonna do this.. it looks like this how can i fixed? |
#1371
|
||||
|
||||
Read and implement the article for the vB version you are running. This is for vB3, you're clearly running vB4.
|
#1372
|
|||
|
|||
ahhh yea is true, but there is no way to put on vb 4?
|
#1373
|
||||
|
||||
|
#1374
|
|||
|
|||
thanks bro, that what i need
|
#1375
|
|||
|
|||
OK, so being new to vB, I just tried this out and received the following error message and am not sure what I need to do? Probably very simple but...
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 4330 Parse error: syntax error, unexpected T_STRING in /home/brishi69/public_html/vb/test.php(42) : eval()'d code on line 1 Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: TEST in [path]/includes/functions.php on line 4330 Cheers, BriShi |
#1376
|
||||
|
||||
Please note that this tutorial is for vB3.x. You are obviously running vB4.x, so you need to look out for the vB4-article on this topic (in the vB4-articles subforum).
|
#1377
|
|||
|
|||
Thanks you for responding cellarius, I noticed and found the one for vB4 late last night and was too tired to change it then. I just tried that one and now I just get a white page. So am looking through the replies on that page too see if anyone had a similar problem before I post in there....
Cheers, BriShi |
#1378
|
|||
|
|||
When I am browsing my forum on my phone I am unable to view my custom page ... All I get is a white blank page. But when I view the forum on the desktop skin I can view the custom page just fine.
How can I get my custom page to show up when I am using my mobile theme? |
#1379
|
||||
|
||||
You probably need to add the template you created to your mobile style.
You probably added it initially only to your default style, so your mobile style is missing the template. I don't know if it talks about it in this article but you should really enable debug mode in the admin cp (https://vborg.vbsupport.ru/showthread.php?t=165623) In debug mode you can add a net template to the usually hidden "MASTER Style" which will automatically allow it to be used in ALL styles simultaneously instead of having to add it individually to each style. |
#1380
|
|||
|
|||
Thank you... that was the issue.
|
#1381
|
|||
|
|||
Hi all, i have created a privacy page using this code, but if i try to see that page logged out, the browser report:
Code:
Unable to add cookies, header already sent. File: /home/download/public_html/vb/tos.php Line: 1 Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE & ~8192); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'tos'); // 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( 'Tos', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = 'Privacy e Tos'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('Tos') . '");'); ?> Thanks @@@@@@@@@@@@@@@@@@@@@@@@@@ Solved, there'was a white space before <?php |
#1382
|
||||
|
||||
hi I am asking for advice.
by code I want to have a link with PHP Code:
thanks you |
#1383
|
||||
|
||||
That can't be your full page code. If this isn't about writing a page, then you are in the wrong thread.
|
#1384
|
|||
|
|||
I searched includes/function_online.php for this
PHP Code:
|
#1385
|
||||
|
||||
This thread is for vB3, not vB4.
|
#1386
|
|||
|
|||
DOH.. Do you have a link for the vb4 version of this?
|
#1387
|
||||
|
||||
|
#1388
|
||||
|
||||
i have this mss!
Code:
Unable to add cookies, header already sent. File: /home/gamerol/public_html/leaguelegends.com.ar/foro/Livestream.php Line: 1 |
#1389
|
|||
|
|||
Well, I am looking for a way of just adding the navbarto my own stand alone page. This seems to do the trick but I don't get a navbarwhich uses the template or looks formatted nicely.
have a look here where I am testing http://www.snoozingonthejob.com/test.php by the way, i omit the other part of the code because I just want the navbar see below. Any help would be appreciated. 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') . '";'); print $navbar; ?> |
#1390
|
||||
|
||||
You can't omit anything from the PHP file. You customize how you want the page to look in the template.
|
#1391
|
|||
|
|||
Well I copied the files just like they are in the original post but just get a blank page
i created test2.php and the file TEST. Hate to beat a dead horse but I am clueless at this point |
#1392
|
||||
|
||||
I just now looked a little more closely at your PHP page and I see what the problem is. This custom page needs to use your custom template. Not your navbar template or any other template. Just the new template you created.
You haven't followed the tutorial exactly. Go back, do exactly as Gary details. Then when you want to edit the look of your page the only thing you change is the template code. This custom page will ALWAYS use your custom template, regardless of what you're trying to put on that page. |
#1393
|
|||
|
|||
ok. i must be dumb or am missing something. Even if I create the exact files as described in the original post, makes the modes for the newer version of vb, i still get nothing that is formatted.
|
#1394
|
||||
|
||||
Have you successfully made just the default page in the tutorial first? Before trying to make any changes?
|
#1395
|
|||
|
|||
Thats just it. I try to mimic the exact code in the example on the tutorial. Two files a test.php and a TEST template file. Using those I get nothing back
|
#1396
|
||||
|
||||
Remember that the template needs to exist in the style you're using, and every style you plan on using it with. Otherwise, all you'll get is a blank page when that skin has no template for it.
|
#1397
|
|||
|
|||
Ah, there lies my problem. So I changed the name TEST to be FAQ which is a template in te software and it finally showed something. Well, I appreciate the help but unfortunately this does not address my problem or should I say my need.
I will just highlight what I need and maybe you can point me to an existing post because I can't find one that works for me. I wrote some gallery software whih you can see on sites like LeicaImages.com or Nikonimages.com It is stand alone nd does not use templates. I am testing on http://www.snoozingonthejob.com/ an integration of vb with my software. I have account info working. The only thing I need is to include the vb navbar at the top of this page http://www.snoozingonthejob.com/ag2sigallery/index.php so that when people are in my part of the sftware they can stil navigate through the forum softwre. Thanks for any feedback you could provide. |
#1398
|
|||
|
|||
not working for me on vbulletin 5 can anybody help me out
the page is coming but l am unable to include header and footer |
#1399
|
||||
|
||||
Of course this won't work in vB5 this article is for vB3
|
#1400
|
|||
|
|||
vB3 is not work !, content code error.
|
#1401
|
||||
|
||||
Works perfect for vb3.x
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|