Find the right theme for you. Browse through our gallery of expertly-crafted free SMF themes to find the perfect one for your needs.

Custom pages for your SMF forum

Mick in Tutorials on Feb 27, 2010
Create pages for your smf forum.   Easy as pie.

Create a php file called.... whatever.php  (change the name to your liking) as long it ends with .php

Insert this code in wharever.php:

<?php require("/home/*******/public_html/SSI.php"); 
$context['page_title_html_safe'] = 'title of the page goes here';
template_header();
echo'

Your content goes here';

template_footer(); ?>

-Replace line 1 with your own path to your forum.  Mine is omitted.

-Page can be viewed at yoursite.com/whatever.php   or  yoursite.com/forum/whatever.php  depending on where your SMF is installed.


Tagged with:


Mick

Mick G

idesignsmf.com

    

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time and has a weakness for Tacos and Pizza.


10 Comments

When I do this I get the following:

No database selected
1

When I do this I get the following:

No database selected

Whats up hoodie....

This has nothing to do with databases.   Did you add the correct forum path in line 1?
2

Yeah. The path is correct. I double checked it. I tried it on another forum as well.
3

I just created a test page with the code in reply #1

http://idesign360.com/test.php


Make sure your new page resides where ssi.php is.   In your SMF root.

4

Ok, that's weird. I just recopied the code and uploaded it again and now it works. Don't know what went wrong the first time.
5

Ok, that's weird. I just recopied the code and uploaded it again and now it works. Don't know what went wrong the first time.

Sweet.    Now you can add your own content.   You can make as many as you want and add links to the nav bar. ;)
6

For 1.1.x series, this is the title code...

In the code in reply #1....

Replace:

$context['page_title_html_safe'] = 'title of the page goes here';

with:


$context['page_title']= 'title of the page goes here';
7

This error happens to me

Warning: require(/home/*******/public_html/SSI.php) [function.require]: failed to open stream: Result too large in C:\wamp\www\install2\pageteam.php on line 2

Fatal error: require() [function.require]: Failed opening required '/home/*******/public_html/SSI.php' (include_path='.;C:\php5\pear') in C:\wamp\www\install2\pageteam.php on line 2


 <?php 
require("/home/*******/public_html/SSI.php");
$context['page_title_html_safe'] = 'title of the page goes here';
template_header();
echo'

Your content goes here';

template_footer();
?>
8

Make sure the full path to your forum is correct in line 2.

require("/home/*******/public_html/SSI.php");
9

Como ser?a la ruta correcto?
10



Connect with us:


Improve SMF

If you wish to contribute to the development of SMF you can contribute to the coding discussions taking place on Github. You are also welcome to suggest features which you would like to see added to the software in the Feature Requests board.

  Receive our monthly newsletter right in your inbox.
Commitment issues? Unsubscribe at any time.


Get 100% complete access to our entire collection and find out why SMF owners prefer our themes





Latest Discussions

Join the conversation