PDA

View Full Version : [Any Version] How to add Custom Pages to your forum


Gomjaba
Wed 23rd Aug '06, 6:12pm
If you would like to add custom pages (including header / footer of your forum) do the following:

Add a new template in the style of your choice. You can name it whatever you want, it has to have the prefix

custom_


though.

You are then able to call the custompage using

http://<domain>/misc.php?do=page&template=test2

Change the red code with your domain and the blue code with your template name accordingly.

Lets make an example.

Admincp > Styles & Templates > Style Manager > In drop down choose Add New Template

Name the template for example custom_google

Use the following code :


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>

$header
$navbar
<!-- Custom Code Start Here -->
<center>
<iframe src="http://www.google.com" width="80%" height="400"></iframe></center>
<!-- / Custom Code Ends here -->
$footer
</body>
</html>


As you can see, I just use an iframe for you to see any results.

Now use your web-browser and go to

http://<domain>/misc.php?do=page&template=google

And change the domain to your own.

See attached a screenshot how the above example would look like. Also attached a default html code for a template.

Wayne Luke
Wed 13th Aug '08, 1:20pm
A couple of notes:

If you use the contents of the GENERIC_SHELL template as your base, you will get proper headers, footers, and navigation included as well.

When linking to your custom page do not add the word custom into the link. For example to link to a Privacy page, you can create a template called custom_Privacy. However your link will look like:
misc.php?do=page&template=Privacy