Hello! im a kind of new user to SMF and i really like its features.
Ive also looked around for a Content magagement system but all the ones ive seen so far havent been my cup of tea. but then i had a spark of genius while looking though the code. The Way SMF is set up you can turn it into a complete Site management system.
as of writing this I have managed to Modify SMF so that to get to the forums you use "index,php?action=forums" and have modified the forums linktree to put there also. i have also managed to put in a basic home page but no fancy parts there yet
Has anyone else attemped this? i did a look through the forums and coundlt find anyhting similar. If anyone has done anything similar to this i would like to know. and if you want to know my exact steps i could also write them down too :P
Thanks
-pengwin
I know that a static page mod exists where you can add a number of static pages that fit in with your SMF theme and are edited through SMF.
Oh ok then well what i was trying to achieve was to actually Change the index page of the forums to My own index page and then have PHP code and database queries like all the other SMF pages.
Well ill jot down the things i have done
Open Index.php
(alter the inex.php to create a new index for SMF)
after
'.xml' => array('News.php', 'ShowXmlFeed'),
add
'forums' => array('BoardIndex.php' , 'BoardIndex')
Change
// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
To
// EDIT: Fall through to the site index then...
require_once($sourcedir . '/SiteIndex.php');
return 'SiteIndex';
Close index.php
Create a new file in "Sorucres" called SiteIndex.php
(the New Pages Source file)
Contents
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function SiteIndex()
{
global $txt, $scripturl, $db_prefix, $ID_MEMBER, $user_info, $sourcedir;
global $modSettings, $context, $settings;
// For wireless, we use the Wireless template...
if (WIRELESS)
$context['sub_template'] = WIRELESS_PROTOCOL . '_boardindex';
else
loadTemplate('SiteIndex');
$context['page_title'] = 'The Ice Cap - Home';
}
Create a new file in "Themes/Default" called SiteIndex.template.php
(the new page's theme file)
Code
<?php
// Version: 1.0.1;
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
}
?>
Done!
By making a new index page like this you can literally intergrate a whole site into SMF. I think its a lot better for user than using the SSI which i had problems with.
to get to the forums its just "index.php?action=forums". you could just create a new button in the menu for this if you wish
is that useful to anyone? im learning how the sources and the theme interact and will work on a home page shortly :)