Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Restartt on August 26, 2014, 12:13:13 AM

Title: Embedding SMF on a website
Post by: Restartt on August 26, 2014, 12:13:13 AM
Hi!  Please bear with me, i'm still growing as a website developer (using a fresh install of latest SMF)

I've started a website.  I tried for a clean look, it uses includes to keep the same menubar across the top of each page and it looks very uniform.  I am 100% against websites that throw you to a forum that looks different then all the uniform pages you were just browsing, where you lose the easy to navigate menubar and have trouble getting back.  i want it to look just like any other page, just with a forum in the middle.

I did some research and saw SMF was a good free forum.  I installed it to a subdomain (forum.mysite.org) so it didn't overwrite my index.php on my main site (mysite.org/index.php)

I want to embed SMF on mysite.org/forum so i dont loose my uniform look.  I first looked to frames, but from some experimenting and digging up old posts it seems SMF just can't handle being put it a frame, it will never work that way.  So that seems out.

I tried using the SSI commands on mysite.org/forum.  I have    

<?php
require("path/to/the/SSI.php");
ssi_menubar();
?>

and it KINDA works - it displays the hyperlinks for the menubar options, but it's not in any good format, it's just 5 lines of bulleted hyperlinks.

trying to add in other functions from the SSI examples in the same folder gets me
Fatal error: Call to undefined function template_ssi_above() in /homepages/12/somenumbers/htdocs/forum.php on line 42]

What am I missing?  Is it the subdomain messing things up?  is embedding SMF just a monumental task newbies shouldn't try?

I've tried messing with just changing the template to have my menubar at the top as a less than ideal but doable workaround, but i'm not finding any luck there either  though i might be able to power through it by going back to HTML instead of an include and hardcoding all links instead of trying to be relative.
Title: Re: Embedding SMF on a website
Post by: Mstcool on August 26, 2014, 12:28:02 AM
Maybe this can help. :PPPPP

How do I integrate SMF into my PHP coded website? (http://wiki.simplemachines.org/smf/How_do_I_integrate_SMF_into_my_PHP_coded_website)
Title: Re: Embedding SMF on a website
Post by: Restartt on August 26, 2014, 12:33:51 AM
I appreciate that, but thats what i tried when i said "I've tried messing with just changing the template to have my menubar at the top as a less than ideal but doable workaround".

It doesn't work for me.  I think all my php references stuff under the main domain, not the subdomain, and never the twain shall meet.   I can hard code around this by actually using HTTP://mysite.org/whatever for each image and link, it just defeats a lot of the purpose of a common header file.