View Full Version : Adding a PHP page for other things
Sangrun
09-02-2006, 03:55 PM
A few weeks ago I found a post on how to do this here, but lost it and tried searching again. I just cannot seem to find it again.
Sorry if this seems silly.
I want to add several pages that hold rules, advertising info, and links to my forum sponsors.
It has to be fairly easy and common as I know a lot of forums have it.
Any help is appreciated.
Kirk Y
09-02-2006, 04:03 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=98009" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=98009</a>
Sangrun
09-02-2006, 04:14 PM
Thanks acidburn0520! That is what I was looking for.
Hmm.... A little technical for me. I'm not a coder, so I'm not undertanding much of that post.
Kirk Y
09-02-2006, 09:40 PM
Create a new PHP File with the following contents:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'rules'); // 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(
'siterules',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$navbits = array();
$navbits[$parent] = 'Site Rules';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template(siterules') . '");');
?>
Create a new Template called siterules and fill it with this:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - Site Rules</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"><i>Site Rules</i></td>
</tr>
<tr>
<td class="alt2"><font size="1" color="blue"><b>Our Rules</b></font></td>
</tr>
<tr>
<td class="alt1">Some stuff here....</td>
</tr>
<tr>
<td class="alt2"><font size="1" color="blue"><b>2. more here...</b></font></td>
</tr>
<td class="alt1"><font size="1" color="white"> <b>2.1</b> Don't be bad.
</table>
$footer
</body>
</html>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.