How To New Pages in vb style
Ok ive seen that alot of people have been asking how to create new pages with the vbulletin style on them like i have used on forum.imaedia.com for the link/games etc pages, so ive decided to write this to tell everyone how to do it
Ok i usualy start by creating a basic template in the admin cp that i will use for all the pages that im going to add. log into your admin cp go to styles and templates then go to the style manager and expand the style that you are currently using on the right of the page you will see a drop down menu, select add new template from it and then you need to name it for this example im naming mine : "test" now we need to create a very basic html template to go in this template: because im doing this quickly i just added any css i wanted to use onto this page instad of using the vbulletin css styles ok so put the following into your temoplate and change the parts that say page name and page content to suit your needs :) Code:
$stylevar[htmldoctype] The next step is to create the php file that will call the template, Here is the code i used, to incldue the naviation and header/footer Code:
<?php then go to yourforumurl/pagename.php and you got yourself a non vb page with vb template on it hope that helps post any questions, i prolli missed something or done something totaly wrong but hehe just trying to help :P |
Nice job, but I don't like the way you coded the PHP file, looks like you just threw it in there, un-organized so to speak.
But still good job. ^_^ |
replace TEMPLATENAME with your template's name :) (it's 2 times on this file)
Code:
<?php |
yea thats better hehe, alot nicer organised
|
That's why i posted it ;)
Kier and his team made an amazing job in commenting all the functions and stuff you can find in that files so let's honor that work and use their comments :) |
yea.....ill put that code into the first post aswell :)
|
Now that is better! :) Nice job!
|
thanks, and thanks to MrNase too :)
|
white page seeing this
http://www.interfans.org/forum/rules.php some of my members don't see this page. They get a white page. Why? |
Thanks .. I really like this and have started using it!! :)
|
glad you like it
Quote:
|
Okay but what about coding a .php file to handle more than 1 template?
|
Quote:
|
Hi, i dont everything correctly and still i cannot see the page :S it comes up white....
can someone help please. /moley |
This looks like the same hack Livewire released on his forum :confused:
|
how would i go about calling a post on a vbulletin powered page in the template ???
|
any 1 *bump*
|
thanks works
|
thanks! very helpful!!!
|
actually i am having a problem, only users that are logged in are able to see this page, guests see a white screen with some text... see for yourself :/ http://www.torontogolfnuts.com/links.php
says: Quote:
|
bump :)
|
1 Attachment(s)
Thanks a bunch.
I did EVERYTHING you said to do, but I get this roster2.php Code:
$headinclude </head> <body> $header $navbar Code:
$headinclude $header $navbar **********Test Page********** I eventually want to have multipul styles so I don't want to half-*** it. I attached an image of what i'm trying to do. There might be an easier way. And no, I don't want to have a forum for each page and post the roster in a forum and have VB Index read it. I want to fully HTML whats inside each block (eg. block= roster) The problem: roster2.php |
Ok, I got it working now. I copied it wrong. I edited it and it worked. Looks great!
Is there an easy way to get all the VB Index stuff on the side of the pages? |
Is there a way to store my custom .php page in a non-forum directory?
|
I don't think so considering all vBulletin data is read within the main directory.
|
I am getting a white page as well. Not sure what I did wrong. I copyed and pasted everything you typed and changed the TEMPLATE NAME to the correct template I have added. Also I created a php file as well. Do I need to change anything else besides TEMPLATE NAME to make this work. Sorry I am very new at this. But edger to learn it. Thanks, Chain
|
Quote:
chdir('/server/path/to/forum/directory'); after define('THIS_SCRIPT', 'yourscript'); in the php file. |
Well I am still having problems with this wo if anyone could help me out that would be great. I go ahead and tell you the way I uploaded it to my site.
First made the template (rules) in my styles. Also when I did that it placed it under custom templates. I sure that is right but one thing is that it is the only templete that looks tabed out???? Rules Template Code:
$stylevar[htmldoctype] PHP Code:
|
you don't mention what the problems are.
|
oh sorry the problem is that I still get a white page like the others were getting. I not sure if I did all the code correctly.
|
Nevermind I don't know what I did but I got it to work. And thanks very much for showing me how to do this. I like this "how to". Thanks
|
Nothing like bumping a very old topic...
I've used this tutorial to create a page, and for the most part, it's working. But this part: define('THIS_SCRIPT', 'yourscript'); What does 'yourscript' refer to? I'm not sure what to replace there. |
Hello just feeling my way too...
I havce an insight and a question... There are two places in the .php program where you must put the name of your script. If the .php program is calles say "wunderbar.php" then near the top of the program is define('THIS_SCRIPT', 'wunderbar');// note no .php towards the end of the program you need eval('print_output("' . fetch_template('wunderbar') . '");'); In my case the template is called wunderbar too so that things work. My question. I'd like to know the user name in the program wunderbar.php. I've jsut got it working a little. I have a post with a link to my-forum/wunderbar.php If I click on the link it executes wunderbar.php. wunderbar.php calls the template script wuinderbar. I need some way to get the username in here. I'd really like to put some dynamic content into the template script. Or perhaps have two templates, a top and a tail, and I'll put in the dynamic content in wunderbar.php. John |
Is there an updated version for 3.6.x ?
|
Ok I'm stumped
I have put in the php file betaform.php http://askatech.autorepairdata.com/betaform.php Modified the base template Code:
<?php Code:
$stylevar[htmldoctype] |
You need to include global.php from your forum directory...
Change: PHP Code:
PHP Code:
|
Quote:
Here is my folderstructure. /rootfolder/forum I want a php file to work in /rootfolder/anotherfolder So here is the code I am trying to use in my php file in /rootfolder/anotherfolder PHP Code:
Thanks if you can help. BTW, I have dropped a straight HTML file in /rootfolder/anotherfolder and that works fine. The php files gives me a white screen and when I view the source all I see are the default html structure tags. |
Try:
PHP Code:
PHP Code:
|
Code:
<?php Code:
$stylevar[htmldoctype] If the code you posted is what you're actually using, you need to change the DEFINE 'yourscript' to the name of the PHP file, minus the .php extension. |
I have no idea how to do this sorry I have managed to do the first part but the second code i have no idea what to do with where to put it or what i should do cause when i did put it onto a blank page i got errors.
|
All times are GMT. The time now is 06:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|