[SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system

Started by Daniel15, January 27, 2007, 02:49:11 AM

Previous topic - Next topic

Rappadappa77

Hey Guys,

What if i don't have an html template, my designer didn't create one, because my site is completely converted to PHP, what can i do?

Howard

IchBin™

Well if you're following the instructions properly, you'll notice that it says you create 2 php files for the header and footer.
IchBin™        TinyPortal

thechronic2001

excellent guide mate, thanks a lot  ;)

1 question though, now that index.template is modified, how do you adj thew size of the forum to suit a page? it is doing it automatic  which would be great is my page was a square box but its not, inner container is a box and a fade out effect is used so the forum overhangs it


any help will be appreciated  ;)

IchBin™

The size of the forum is totally dependent upon the theme. Depending on the theme, it is changed in different places. I'd suggest you start another topic for help on that since it's not related to this topic. You'll get better support, and it won't convolute the topic with unrelated issues. :)
IchBin™        TinyPortal


lukef44

hey everyone, complete newbie here, so excuse my really dumb/amateur questions, im just building my first website.
Im trying to follow what going on here but have run into some difficulties.

1)Where do you save the header and footer.php files you create? it says save but im not sure where.

2)the index.php file...where do I get this? it says there is one attached, if not how do you split it?

Any help is huge, I am a complete novice struggling here, thanks.

IchBin™

From the instructions on the first page:
QuoteThe index.template.php file assumes that header.php and footer.php are in your forum's directory.

As for the index.php you probably can't find that because your supposed to be looking for an index.template.php which is attached at the bottom of the first post as well.
IchBin™        TinyPortal

Biology Forums

Is there a way of incorporating the header and footer of my forum and have the content in the middle from my website? Technically, the opposite of what this achieves.

IchBin™

Quote from: shuban on May 20, 2011, 10:49:19 PM
Is there a way of incorporating the header and footer of my forum and have the content in the middle from my website? Technically, the opposite of what this achieves.


if (file_exists('SSI.php') && !defined('SMF'))
        require_once('SSI.php');

template_header();

echo 'your website code in between these to template functions';

template_footer();


You may need to change the path to your SSI.php file in the top two lines.
IchBin™        TinyPortal

Biology Forums

Quote from: IchBin™ on May 20, 2011, 11:02:57 PM
Quote from: shuban on May 20, 2011, 10:49:19 PM
Is there a way of incorporating the header and footer of my forum and have the content in the middle from my website? Technically, the opposite of what this achieves.


if (file_exists('SSI.php') && !defined('SMF'))
        require_once('SSI.php');

template_header();

echo 'your website code in between these to template functions';

template_footer();


You may need to change the path to your SSI.php file in the top two lines.

Hey IchBin™,

What's the code I'm looking at (index.template ?)...

So, if I have a wiki, say on mywebsite.com/wiki/main_page, how could I incorporate what it is you have here?

Really stumped.

IchBin™

The code you're looking at that I typed you would put into your own custom page. As for integrating a wiki, I don't know how the wiki's work. I would assume if you can figure that out, that you can just add the code in the same way into their template systems. But that depends on the way their templates work. Since I gave you the code on how to integrate SMF into a page, you should probably ask the wiki people how to integrate that into their code.
IchBin™        TinyPortal

Biology Forums

Makes sense, thanks, so I guess I would adjust the ssi.php address to fit my websites' pathway.

Biology Forums

It's so strange, this works wonderfully on my test forum, but on my actual forum, when I go to the wiki page, it's blank page (white page). Would could  I have done to my actual forum that's causing this function template_header(); not to work properly? :-\ I'm using 1.1.13.

I tried a brand-new SSI.php file and it still didn't work, tried a brand new index.template.php, didn't work, this is going to be hard to impossible to target :-\ So it's not a matter of not knowing how to integrate SSI into wiki, it's a matter of targeting why it's not working for my forum.

Furthermore, if it turns out that I cannot find the cause of error, do you think it would be a good idea if I combine the database of my current forum with the test forum and use the new forum's files?

grankpeq

So I was following this guided and when I got to the part of running the SQL

REPLACE INTO smf_themes
   (ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'site,main');

I now cannot access my forum, I get a white page that says

Unable to load the 'site_above' template.

I deleted the template I was working on since it was not the default. But what SQL do I need to run to revert this back I had a lot of contnt and mods but no backup of the db.

Help!!

:)
Joe VanHorn

IchBin™

You can restore the backup that you took before you made the changes to your database. You did take a backup right?

The error is telling you that it cannot find the template_site_above() function which is what the index.template.php file has int it, that is attached to the first post of this topic.
IchBin™        TinyPortal

grankpeq

I am a novice to the SMF forum, I made a copy of the theme as a quote backup for it but not of the db no. So my fault. Is there any way to add that back into the template?
Joe VanHorn

IchBin™

Add "that" back into the template? What does "that" mean? If you follow the instructions in the first post you should already have the template in your theme.
IchBin™        TinyPortal

grankpeq

Sorr, I mean is there anyway since I do not have a good backup of my db to replace or add back the 'site_above' template.

Or should I just be much more careful and reinstall the forum?

:-)

thanks for the help!
Joe VanHorn

IchBin™

REPLACE INTO smf_themes
   (ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'main');
IchBin™        TinyPortal

Advertisement: