Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: mattizzy on July 11, 2018, 08:43:15 AM

Title: How to use custom front page without portal
Post by: mattizzy on July 11, 2018, 08:43:15 AM
Hello I need a clean homepage to write all my codes the way I want it. How can I also make SMF to recognize the page used as the home page.
Title: Re: How to use custom front page without portal
Post by: Kindred on July 11, 2018, 09:45:57 AM
you have three options.

1- install a portal. You can then use the portal mainpage as the homepage and include custom HTML or php
2- install the custom homepage mod. Never used it, but I assume you can include HTML - maybe php
3- code it yourself, like we did here... (put the forum in a subdirectory and your homepage in the root)  then modify the button array to point the home button to your new homepage and add a forum button that points to your forum
Title: Re: How to use custom front page without portal
Post by: wintstar on July 11, 2018, 10:22:05 AM
Look here => https://wiki.simplemachines.org/smf/Integrating_SMF_with_your_website (https://wiki.simplemachines.org/smf/Integrating_SMF_with_your_website)

sample start.php
<?php
require_once('SSI.php'); //path to your SSI.php
$context['page_title_html_safe'] = '<-- your page titel -->';

$context['html_headers'] = '<-- your own css or java script -->';
$context['linktree'][] = array(
      
'name' => '<-- your page titel  or own titel-->',
 ); 
//breadcrumb 


template_header(); //header with menue
echo '<-- your html content -->';
template_footer(); // footer 

?>




Title: Re: How to use custom front page without portal
Post by: Kindred on July 11, 2018, 10:42:20 AM
that would be option 3
Title: Re: How to use custom front page without portal
Post by: mattizzy on July 11, 2018, 01:37:45 PM
So basically, How can I modify the FRONT PAGE OF SIMPLE PORTAL
Title: Re: How to use custom front page without portal
Post by: Illori on July 11, 2018, 01:38:28 PM
post in the support topic for the mod you using.
Title: Re: How to use custom front page without portal
Post by: mattizzy on July 11, 2018, 01:40:02 PM
Quote from: Illori on July 11, 2018, 01:38:28 PM
post in the support topic for the mod you using.

Okay