SMF Support > SMF 2.0.x Support
easy way to integrate theme?
Metal_13:
how do i integrate my SMF2 with an html page? is there an easy way to do this? i tried to do iframe but it sux...
anyone? pls...
Oldiesmann:
http://www.simplemachines.org/community/ssi_examples.shtml
Just save the page as .shtml and use the code from the ssi_examples page to include various SMF functions wherever you want them.
Metal_13:
hmmm...usefull but... i want to insert the forum on an html page.... or like put smf on my site's default template /design
rsw686:
Then you need to make a theme for SMF. Add your websites header and footer into the theme code and you can integrate it nicely.
Owdy:
Make test.php and put it in your main site. In test.php, try something like this:
--- Code: ---<?php
$ssi_gzip = true;
$ssi_ban = true;
$ssi_layers = array('html', 'body');
$context['page_title'] = 'Cool test page!!';
ob_start();
$ssi = include('/path/to/your/smf/SSI.php');
if (!$ssi)
{
echo 'Server seems busy or down. Please try again later.';
die;
}
?>
Own stuff here. It works!
<?php
ssi_shutdown();
?>
--- End code ---
If you wanna use certain theme, ad this in second line
--- Code: ---$ssi_theme = '1';
--- End code ---
Change that '1' to your themes id number.
What that code above does? It prints out your forums header and footer in page and you can add your own stuff between those. It also add forum bans and gzip to that page. Try it :)
Navigation
[0] Message Index
[#] Next page
Go to full version