| |

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
September 08, 2010, 07:50:11 AM
Congratulations to Amanita Phalloides for winning CG-1!

Congratualtions to Guinsoo and the Pirate Alliance for winning CG-2!
   Home   Forum Help Search Login Register  

Purchase Premium Features














Recent Topics
[Today at 07:27:19 AM]

[Today at 07:26:55 AM]

[Today at 07:24:50 AM]

[Today at 07:18:57 AM]

by Hal
[Yesterday at 10:10:42 PM]
Members
Total Members: 1101
Latest: investstroypto1961
Stats
Total Posts: 57792
Total Topics: 2066
Online Today: 15
Online Ever: 136
(March 08, 2010, 04:03:22 PM)
Users Online
Users: 4
Guests: 12
Total: 16
Permissions


M.C. Escher
"Ascending and descending"

Introduction..

This page illustrates one way of using the template system in SMF for adding custom pages. All you need is to make template files(PHP files really) and place it into a folder of the actual Novelty theme folder called "pages". Then you go to Admin section, "Themes and Settings" and look for "current theme settings".

There you can add the entries for the custom files. First its real name(minus "template.php") and the title you like to use. For example, this custom page is the file "about.template.php" and has "Custom" as the title. Therefore we insert "about,Custom" for this one. To add more, do the same, but put a "|" inbetween, like: "about,Custom|my,My Page!"

Content of custom pages

..can be anything really, since its PHP pages, you can even add your own PHP routines in there. Note that its indeed still a part of SMF, so any values you might want to use from the forum, is available. If you look at the other custom page called "homepage.template.php" you will see its using a lot of SSI functions to show a simple "news" page. It can also mix PHP and HTML freely, as this template shows.