PDA

View Full Version : [2.3.x] vb powerd page


ashly
06-14-2004, 08:23 AM
For the one's that want to make there own page power bij vb2 than here are the codes for template and the .php file.


view.php (Change to what you want)

<?php

error_reporting(7);

$templatesused='site';

$loadbirthdays=1;

$loadmaxusers=1;

require('./global.php');

eval("dooutput(\"".gettemplate('site')."\");");

?>



You can replay's in de php code site with what ever you want.


Make template called SITE (or what ever you want)
{htmldoctype}
<html>
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<!-- end no cache headers -->
<meta name="keywords" content="vbulletin,forum,bbs,discussion,jelsoft">
<meta name="description" content="$bbtitle is a discussion forum powered by vBulletin. To visit the forum, go to $bburl/ . To find out about vBulletin, go to http://www.vbulletin.com/ (http://www.vbulletin.com/) .">
<title>$bbtitle - powered by vBulletin</title>
$headinclude
</head>
<body>
$header
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" bgcolor="{tablebordercolor}" width="100%">
<!--DWLayoutTable-->
<tr>
<td width="973" height="27" bgcolor="{tableheadbgcolor}"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Title</b></normalfont></td>
</tr>
<tr>
<td height="27" valign="top" nowrap bgcolor="{secondaltcolor}"><normalfont><b>Text</b></normalfont></td>
</tr>
</table>
$footer
</body>
</html>

If you want to make more pages to the page and dont want to make a lot of those .php files thane here is a coding you can add.

open view.php(or what ever you name it) look for:
eval("dooutput(\"".gettemplate('site')."\");");

Replace it With:
if ($_REQUEST['do'] == '')
{
eval("dooutput(\"".gettemplate('site')."\");");
}

This changes makes shure that the view.php still works.

And you nied to do this if you want to ad more pages.

Open view.php (or what ever you named it) look for
?>

Add byfor that:
if ($_REQUEST['do'] == 'XXX')
{
eval("dooutput(\"".gettemplate('TEMPLATE_XXX')."\");");
}

And do that evey time you want to make more pages.
But Replace the XXX whit what you want to ?do=XXX to by called.
And where it says TEMPALTE_XXX you put the name of the template that you want to show up for your new page.

ashly
06-14-2004, 10:59 AM
Here is the code if you want the vbpower page in the root of your site.

<?php

// ####################### SET PHP ENVIRONMENT ###########################

error_reporting(7);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('NO_REGISTER_GLOBALS', 1);

define('THIS_SCRIPT', 'index'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################

$templatesused='site';

// ######################### REQUIRE BACK-END ############################

chdir('./forum/');

require_once('./global.php');

// #######################################################################

// ######################## START MAIN SCRIPT ############################

// #######################################################################

eval("dooutput(\"".gettemplate('site')."\");");

?>

If you nied help just ask here in this post. Than im gona help. or samone els is gona help.
</FONT>

iKwak
06-16-2004, 02:43 AM
Thanks for sharing. :cool:

ashly
06-27-2004, 05:46 PM
np. I will share same templates for it later on. :d

ultimate05
02-27-2005, 10:52 PM
ok thanks for all this few question:
i have a template called chat saved now what do i type in chat.php in my root folder to make chat template appear as a vb powered page?
Thanks

ashly
02-28-2005, 04:46 AM
eval("dooutput(\"".gettemplate('site')."\");");

Put where site is your template name that your gona use for its page.

ultimate05
02-28-2005, 09:02 AM
hey

i added that code like this: in the chat.php
<?php

error_reporting(7);

$templatesused='chat';

require('./global.php');

eval("dooutput(\"".gettemplate('chat')."\");");

?>
and i just get a blank page.

ashly
02-28-2005, 03:51 PM
Did you make a new template for it in admin cp with content in it.
And is in in root of site or in folder forum.

Zachery
02-28-2005, 03:57 PM
Not sure why I allowed this here in the first place. But this is not the place to get vBulletin 2 support, coding or otherwise, Try vBulletin.org