View Full Version : Adding a new page to vB forums.
Kedmyster
07-01-2003, 06:17 PM
I wanted to add a new page to my forums (www.devay.com) named - rules.php
Though I want to have templates to it and all like every other page there's on the forums, so instead i'll use plain HTML, i'll be able to edit the page by editing the templates.
What do I need to do to create these templates, and what the template of the PHP page should be?
Thanks in advance!
-Kedmyster
-Devay.com
filburt1
07-01-2003, 06:19 PM
<?
require("./global.php");
eval("dooutput(\"" . gettemplate("your_template_name") . "\");");
?>
Kedmyster
07-01-2003, 06:36 PM
so that's the php file and in the template, I just need to use, header + footer and everything?
and what do I do in online.php so i'll be able to see someone is looking on that page in who's online?
MetroSports82
07-01-2003, 06:56 PM
Well, the online thingy you have 2 options... either doing it the hard way (hard coding), or using FireFly's hack...
If your like me, you'd like things done the easy way, so I suggest you take a look at his hack first, here...
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32849
Otherwise, if you decide to go the more technical route, you can just add a couple pieces of code right into the online.php file, to have it recognize the file, similar to this...
case 'sample':
$userinfo[where] = "Viewing <a href='sample.php?s=$session[sessionhash]'>Sample</a>";
break;
and...
case 'sample.php':
$userinfo[activity] = 'sample';
break;
Kedmyster
07-01-2003, 08:12 PM
"sample" I replace with what? the name of the file (^^ rules)?
I actually prefer the coding way (the hard way) =P
cindyd
07-06-2003, 11:20 PM
MetroSports, thanks so much for posting that code, it is just what I needed!
Cindyd
Smoothie
07-07-2003, 02:41 AM
all ya need to do this is here, simple:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=36600&highlight=page+via+templates
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.