Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Daniel15 on January 27, 2007, 02:49:11 AM

Title: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Daniel15 on January 27, 2007, 02:49:11 AM
This guide currently covers the default SMF theme. In the future, I'll extend it so it explains how to do this for custom themes as well :)

I am currently rewriting sections of this, and will post a significantly improved version soon :)




This topic will aim to show you how to integrate your SMF installation into your current website, using SMF's layer system (in fact, this is how the SMF site itself is powered). This takes a little bit of work, but isn't overly hard to achieve. The end result is something like what I've done: http://www.daniel15.com/forum/.

This guide assumes you have basic (X)HTML and CSS knowledge. If you've made your website, you probably already have enough knowledge in this area :). If not, some guides on CSS and HTML are available here:
http://www.w3schools.com/html
http://www.w3schools.com/xhtml
http://www.w3schools.com/css
When I say HTML, I really mean XHTML, but the difference is more like a new version than a separate language.  XHTML is preferred, but if you know HTML it should be fine.  For more information on them and their differences, see the tutorials above

Overview:

Now, we'll begin with an explanation of the layer system

The layer system - What is it?
SMF's templating system uses a thing called "layers". Essentially, a layer is simply two sub-templates, one that goes above the content, and another that goes below the content. For example, the default layer is called "main", which means that "main_above" is above the content, and "main_below" is below the content:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.daniel15.com%2Fstuff%2Fsmf%2Flayers.jpg&hash=c28ee0c4602b7bfefdb27e0d31c5b96026006f01)
Since you're integrating the forum into your site, we'll add a new layer called "site". This layer will be before the "main" layer, so the order will be site_above --> main_above --> Content --> main_below --> site_below

Very first steps - Website template
The first thing you need is get the contents for the new layer. I assume that you have a HTML template for your current site, so we'll use that. For the purposes of this tutorial, I'll be using this template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</head>

<body>
<h1 align="center">My really cool website</h1>
<div align="center"><a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a></div>
<hr />

This would be the actual content!<br />
bla bla bla

<hr />
&copy;2007 Your site
</body>
</html>

You will need to split this into two files, one for the header and one for the footer. For the header, copy all text after the <body> tag until the point where the page content begins, and save this into a file called header.php. For the purpose of this tutorial, this code would be used:

<h1 align="center">My really cool website</h1>
<div align="center"><a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a></div>
<hr />

You also need to do a similar thing for the footer. Copy all the text from the end of the content until the </body> tag, and save it into a file called footer.php. Again, for the purpose of this tutorial, this code will be used:

<hr />
&copy;2007 Your site


Once you've done this, the next thing you'll want to do is make a copy of the default theme. To do so, go to the Themes and Layout section of the admin panel. Under "Install a New Theme", type what you want to call the new theme into the Create a copy of Default named box. You will get a prompt asking "Install a new theme?" - Please say yes. After doing this, the URL in your address bar will have something like theme_id=4 in it... Remember this ID for later!

One of the very first things you may want to do is change some of the colours of your forum, to 'fit in' better with the colours used on your site. To do so, edit the Themes/[your theme name]/style.css file. There are comments in this file, but the main ones are catbg and titlebg (various headings), windowbg1, windowbg2 and windowbg3 (background colours for posts, etc.), and bordercolor/tborder (borders for tables, etc.).

Split up index.template.php
Since we've created the new theme, the next step is to edit the index.template.php file. I've attached a base index.template.php file which you may use (save it into Themes/[your theme name]). This is SMF 1.1.1's index.template.php, except it has been split into two layers (site and main). The site_above sub-template contains everything from the very start of the page to the <body> tag. The site_below sub-template contains everything directly under the body. The main_above and main_below sub-templates contain the top (info box, menu, etc.) and bottom (copyright) of the actual forum.

The index.template.php file assumes that header.php and footer.php are in your forum's directory. If they're not, either move them there, or edit the index.template.php file (search for include('header.php'); and include('footer.php');, and change the paths to suit

CSS stylesheets?
If your site uses a CSS stylesheet, you'll need to add a link to the stylesheet to index.template.php (otherwise, the styles won't come up). To do this, open index.template.php, and find:

// ]]></script>
</head>
<body>';

Replace with:

// ]]></script>
<link rel="stylesheet" type="text/css" href="http://www.example.com/style.css" />
</head>
<body>';

Replace http://www.example.com/style.css with the correct URL (this can be found in your site's template, usually near the top).

Database Modifications
There's one very vital thing we need to do now. We've added a new layer, but SMF doesn't yet know about this. So, if you go to your forum, it would look really bad (no header or footer). To tell SMF about the layers, we need to run a MySQL query in phpMyAdmin (if you don't know what phpMyAdmin is, take a look at the What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0) topic). Open phpMyAdmin, go to the SQL tab, and enter this in:

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

This tells SMF that you want to use two layers: site, and then main. Replace smf_ with your database prefix (smf_ by default), and 4 with the theme's ID number (you found this when adding the theme - If you don't remember it, go to the admin panel, go to Themes and Layout --> Themes and Settings, click on the name of the theme, and look for the th= in the URL [eg. th=4]. This is the ID).

We're done!
That's about all we need to do. In the "Themes and Layout" section of the admin panel, make this theme the default one (choose it in the "Overall forum default" dropdown box), and visit your forum. If everything worked correctly, it should look perfect :)

SSI stuff
Now that you've done this, you can use SMF's SSI functions to power your site. Doing this is very simple. Try creating a file called test.php in your forum's directory, and place the following into it:

<?php
error_reporting
(E_ALL);

// Theme we're going to use
$ssi_theme 4;
// Layers we're going to use
$ssi_layers = array('site');
// Enable GZip compression (saves bandwidth)
$ssi_gzip true;

require(
'SSI.php');

echo 
'See? SMF is cool :)';

ssi_shutdown();
?>


Replace 4 with the theme ID (found earlier).
Now, go to the page. If successful, it will show the text "See? SMF is cool :)" with your header and footer :D. You can use this to power anything from a few pages, up to a whole site (as I've done at http://www.daniel15.com/). Have fun! :D

Feel free to reply here if you have any problems with this :D
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Minare on January 29, 2007, 06:46:45 PM
Hi Daniel15

I checked through your work and now I appreciate what you prepared for us.The things you've told were like an entegration of Smf board into another system and then it hit my mind that if we could make an entegration Smf board into an existing php-nuke system.

I mean aren't they all the same? By using SSI and some entegration changes,isn't it possible to success it ?
Or is there any entegration forms of this ?

Waiting for your comments bro

Have a nice smf time
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on January 29, 2007, 09:49:36 PM
Quotethen it hit my mind that if we could make an entegration Smf board into an existing php-nuke system.

I mean aren't they all the same? By using SSI and some entegration changes,isn't it possible to success it ?
Or is there any entegration forms of this ?
I haven't looked at phpNuke, so I have no idea how easy this would be to achieve ;)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: wcravens on February 09, 2007, 05:12:46 PM
I'm getting strange non-printable characters output whenever an include ('file.php'); is used in the index.template.php theme file.  I've put details at:

http://www.simplemachines.org/community/index.php?topic=19638.218

I'm getting the exact same problems using this technique.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 09, 2007, 06:59:59 PM
Check my reply in the other topic:

Quote from: Daniel15 on February 09, 2007, 06:59:20 PM
QuoteIn using the 'simple' method I'm getting extra non-printable characters output any time I use an include('xyz.php') in the index.template.php.  The characters are '' by the time they get to the browser.  The codes seen on the network are #ef #bb and #bf.  I've tried both with and without compression just in case.
Have you tried simple header.php file? Try something like:

A test header

and see if it still occurs.

Note that PHP files do not need to include PHP code. If you put plain HTML (as I did), it will be output directly to the client. Basically, you don't need to put everything in echo statements, just copy the raw HTML directly into the PHP file  :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: foxed on February 15, 2007, 04:27:27 AM
Very helpful topic :D

My work in progress is going so much smoother after reading this!

http://wow.aab-clan.co.uk/smf/index.php
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Synaptic Anarchy on February 16, 2007, 05:37:31 PM
This is an awesome tutorial. I'm a lot more optimistic about cross-site integration. Thanks, Daniel15!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: foxed on February 16, 2007, 05:54:58 PM
Urm I wonder if you could help?

Sort of struggling a bit with the last modification to my sites layout. We are migrating from the terribly insecure phpBB (Have you SEEN how many false registrations get through? :( )

Our current forum layout is this: http://wow.aab-clan.co.uk/forum - a take on the popular wowmoonclaw theme.

As you can see the forum is framed by the site borders, with about a 7% gap on either side. Trying to achieve this with the SMF templating system has been ... troublesome! Despite the awesome tutorial!

Heres my stuff SMF url: http://wow.aab-clan.co.uk/smf

Style.css

/* Normal, standard links. */
a:link
{
   color: #007799;
   text-decoration: none;
}
a:visited
{
   color: #007799;
   text-decoration: none;
}
a:hover
{
   color: #0398c2;
   text-decoration: underline;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited
{
   color: #007799;
   text-decoration: none;
}
a.nav:hover
{
   color: #0398c2;
   text-decoration: underline;
}

/* Tables should show empty cells. */
table
{
   empty-cells: show;
}

/* By default (td, body..) use verdana in black. */
body, td, th , tr
{
   color: #FFFFFF;
   font-size: small;
   font-family: verdana, sans-serif;

}

/* The main body of the entire forum. */
body
{
   
background-color: #000000;
   margin: 0px;
   padding: 0px 10px 10px 0px;
   color: #000;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
   color: #000;
   font-family: verdana, sans-serif;
}
input, button
{
   font-size: 90%;
}

textarea
{
   font-size: 100%;
   color: #000;
   font-family: verdana, sans-serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check
{
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
   font-size: 90%;
   font-weight: normal;
   color: #000;
   font-family: verdana, sans-serif;
}

/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
   height: 1px;
   border: 0;
   color: #666666;
   background-color: #666666;
}

/* No image should have a border when linked */
a img
{
   border: 0;
}
/* A quote, perhaps from another post. */
.quote
{
   color: #000000;
   background-color: #D7DAEC;
   border: 1px solid #000000;
   margin: 1px;
   padding: 1px;
   font-size: x-small;
   line-height: 1.4em;
}

/* A code block - maybe even PHP ;). */
.code
{
   color: #000000;
   background-color: #dddddd;
   font-family: "courier new", "times new roman", monospace;
   font-size: x-small;
   line-height: 1.3em;
   /* Put a nice border around it. */
   border: 1px solid #000000;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   /* Don't wrap its contents, and show scrollbars. */
   white-space: nowrap;
   overflow: auto;
   /* Stop after about 24 lines, and just show a scrollbar. */
   max-height: 24em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
   color: #000000;
   text-decoration: none;
   font-style: normal;
   font-weight: bold;
   font-size: x-small;
   line-height: 1.2em;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help
{
   cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
   color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
   width: 96%;
}

/* Highlighted text - such as search results. */
.highlight
{
   background-color: yellow;
   font-weight: bold;
   color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
   color: #FFFFFF;
   background-color: #202020;
}
.windowbg2
{
   color: #FFFFFF;
   background-color: #353535;
}
.windowbg3
{
   color: #000000;
   background-color: #202020;
}
/* the today container in calendar */
.calendar_today
{
   background-color: #FFFFFF;
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg2, tr.titlebg2 th, tr.titlebg2 td
{
   color: 007799;
   font-style: normal;
   background: url(catbg3.jpg) #E9F0F6 repeat-x;
   border-bottom: solid 1px #000000;
   border-top: solid 0px #FFFFFF;
   padding-left: 10px;
   padding-right: 10px;
}
.titlebg, .titlebg a:link, .titlebg a:visited
{
   font-weight: bold;
   color: black;
   font-style: normal;
}

.titlebg a:hover
{
   color: #404040;
}
/* same as titlebg, but used where bold text is not needed */
.titlebg2 a:link, .titlebg2 a:visited
{
   color: white;
   font-style: normal;
   text-decoration: underline;
}

.titlebg2 a:hover
{
   text-decoration: underline;
}

/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers*/
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td
{
   background: url(catbg3.jpg) #000 repeat-x;
   color: #FFFFFF;
   padding-left: 5px;
   padding-right: 5px;
}
.catbg2 , tr.catbg2 td
{
   background: url(images/catbg2.jpg) #A1BFD9 repeat-x;
   color: #ffffff;
   padding-left: 10px;
   padding-right: 10px;
}
.catbg, .catbg2, .catbg3
{
   border-bottom: solid 1px #000;
}
.catbg, .catbg2
{
   font-weight: bold;
}
.catbg3, tr.catbg3 td, .catbg3 a:link, .catbg3 a:visited
{
   font-size: 95%;
   color: 007799;
   text-decoration: none;
}
.catbg a:link, .catbg a:visited , .catbg2 a:link, .catbg2 a:visited
{
   color: 007799;
   text-decoration: none;
}
.catbg a:hover, .catbg2 a:hover, .catbg3 a:hover
{
   color: #fff;
}
/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
   background-color: #000000;
   padding: 0px;
}

/* This is used on tables that should just have a border around them. */
.tborder
{
   padding: 0px;
   border: 0px solid #696969;
   background-color: #000000;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
   font-size: x-small;
   font-family: verdana, sans-serif;
}
.middletext
{
   font-size: 90%;
}
.normaltext
{
   font-size: small;
}
.largetext
{
   font-size: large;
}


/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
   width: 100%;
   overflow: auto;
   line-height: 1.3em;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
   width: 100%;
   overflow: auto;
   padding-bottom: 3px;
   line-height: 1.3em;
}

/* Sometimes there will be an error when you post */
.error
{
   color: red;
}


/* definitions for the main tab, active means the tab reflects which page is displayed */
.maintab_first, .maintab_back, .maintab_last, .maintab_active_first, .maintab_active_back, .maintab_active_last
{
   color: white;
   text-transform: uppercase;
   vertical-align: top;
}
.maintab_back, .maintab_active_back
{
   color: white;
   text-decoration: none;
   font-size:  9px;
   vertical-align: top;
   padding: 2px 6px 6px 6px;
   font-family: tahoma, sans-serif;
}

.maintab_first
{
   background: url(images/maintab_first.gif) left bottom no-repeat;
   width: 10px;
}
.maintab_back
{
   background: url(images/maintab_back.gif) left bottom repeat-x;
}
.maintab_last
{
   background: url(images/maintab_last.gif) left bottom no-repeat;
   width: 8px;
}
.maintab_active_first
{
   background: url(images/maintab_active_first.gif) left bottom no-repeat;
   width: 6px;
}
.maintab_active_back
{
   background: url(images/maintab_active_back.gif) left bottom repeat-x;
}
.maintab_active_last
{
   background: url(images/maintab_active_last.gif) left bottom no-repeat;
   width: 8px;
}

/* how links behave in main tab. */
.maintab_back a:link , .maintab_back a:visited, .maintab_active_back a:link , .maintab_active_back a:visited
{
   color: white;
   text-decoration: none;
}

.maintab_back a:hover, .maintab_active_back a:hover
{
   color: #e0e0ff;
   text-decoration: none;
}
/* definitions for the mirror tab */
.mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last
{
   color: white;
   text-transform: uppercase;
   vertical-align: top;
}
.mirrortab_back, .mirrortab_active_back
{
   color: white;
   text-decoration: none;
   font-size: 9px;
   vertical-align: bottom;
   padding: 6px 6px 2px 6px;
   font-family: tahoma, sans-serif;
}

.mirrortab_first
{
   background: url(images/mirrortab_first.gif) no-repeat;
   width: 10px;
}
.mirrortab_back
{
   background: url(images/mirrortab_back.gif) repeat-x;
}
.mirrortab_last
{
   background: url(images/mirrortab_last.gif) no-repeat;
   width: 6px;
}
.mirrortab_active_first
{
   background: url(images/mirrortab_active_first.gif) no-repeat;
   width: 6px;
}
.mirrortab_active_back
{
   background: url(images/mirrortab_active_back.gif) repeat-x;
}
.mirrortab_active_last
{
   background: url(images/mirrortab_active_last.gif) no-repeat;
   width: 8px;
}

/* how links behave in mirror tab. */
.mirrortab_back a:link , .mirrortab_back a:visited, .mirrortab_active_back a:link , .mirrortab_active_back a:visited
{
   color: white;
   text-decoration: none;
}

.mirrortab_back a:hover, .mirrortab_active_back a:hover
{
   color: #e0e0ff;
   text-decoration: none;
}

/* The AJAX notifier */
#ajax_in_progress
{
   background: #32CD32;
   color: white;
   text-align: center;
   font-weight: bold;
   font-size: 18pt;
   padding: 3px;
   width: 100%;
   position: fixed;
   top: 0;
   left: 0;
}


Not sure if you need the index.template file - its basically what you have above.

header.php

<table width="90%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td width="14" rowspan="4" background="http://wow.aab-clan.co.uk/images/index_14.gif">&nbsp;</td>
<td height="117" background="http://wow.aab-clan.co.uk/images/headbg.gif"><img src="http://wow.aab-clan.co.uk/images/logo.gif" width="715" height="117"></td>
<td width="14" rowspan="4" background="http://wow.aab-clan.co.uk/images/index_03.gif">&nbsp;</td>
</tr>
<tr>
<td height="38" background="http://wow.aab-clan.co.uk/images/index_13.gif">
<div align="center"><img src="http://wow.aab-clan.co.uk/images/index_04.gif" width="10" height="38" alt="">
    <a href="http://wow.aab-clan.co.uk/index.php"><img src="http://wow.aab-clan.co.uk/images/index_05.gif" alt="" width="54" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/forum/"><img src="http://wow.aab-clan.co.uk/images/index_06.gif" alt="" width="88" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/phpraid/"><img src="http://wow.aab-clan.co.uk/images/index_07.gif" alt="" width="83" height="38" border="0"></a>
    <a href="http://dkp.aab-clan.co.uk"><img src="http://wow.aab-clan.co.uk/images/index_08.gif" alt="" width="82" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/forum/groupcp.php?g=23&sid=f746da02edfc94542d830b37c178ff67
"><img src="http://wow.aab-clan.co.uk/images/index_09.gif" alt="" width="91" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/progress.php"><img src="http://wow.aab-clan.co.uk/images/index_10.gif" alt="" width="117" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/index.php"><img src="http://wow.aab-clan.co.uk/images/index_11.gif" alt="" width="81" height="38" border="0"></a>
    <a href="http://wow.aab-clan.co.uk/teamspeak.php"><img src="http://wow.aab-clan.co.uk/images/index_12.gif" alt="" width="111" height="38" border="0"></a>
      <img src="http://wow.aab-clan.co.uk/images/index_13.gif" width="5" height="38" alt=""></div></td>
</tr>
<tr >
<td height="100%" bgcolor="#000000">












<br />
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">


footer.php

</table>
</td>

</tr>

</table>


</td>
</tr>
<tr>
<td height="34" valign="middle" background="http://wow.aab-clan.co.uk/images/index_18.gif"></td>
</tr>
</table>


Please excuse the shoddy coding - I'm not the best at this stuff but I try hard :)

Thanks ... would appreciate any help.

Cheers
Foxed

p.s I've tried updating the padding in this bit of the CSS:


/* The main body of the entire forum. */
body
{
   
background-color: #000000;
   margin: 0px;
   padding: 0px 10px 10px 0px;
   color: #000;
}


However it resized the whole site - not just the forum bit :(
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 16, 2007, 09:53:41 PM
Quote from: Synaptic Anarchy on February 16, 2007, 05:37:31 PM
This is an awesome tutorial. I'm a lot more optimistic about cross-site integration. Thanks, Daniel15!
No problem :D

QuoteThanks ... would appreciate any help.
At the bottom of your header.php, you have a <table> tag, but missed the <tr> and <td> tags ;)
Instead of:

<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">


Try:

<table border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
<td width="90%">
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 16, 2007, 10:51:09 PM
Daniel15, thanks for the work man!!!
This is one of the easiest ways to intergrate...a definite bookmark....brilliant.
All the best!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: babjusi on February 17, 2007, 10:01:06 AM
Thank u for this very useful and handy tutorial. I know some friends of mine who would be very grateful to you as well for this
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: shaylor2005 on February 19, 2007, 06:00:45 PM
I'm having great difficulty actually achieving this.
My SMF version is 1.2
here is my html for my site.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Forums</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="default.css" />
</head>
<body>

<div id="upbg"></div>

<div id="outer">


<div id="header">
<div id="headercontent">
<h1>Richard Shaylor</h1>
<h2>&nbsp;</h2>
  </div>
</div>
<div id="headerpic"></div>


<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#" class="active">News</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div id="menubottom"></div


><div id="footer">
<div class="left">&copy; 2006 Richard Shaylor. All rights reserved.</div>
</div>
</div>

</body>
</html>


I split my code into header and footer.
Header
<div id="upbg"></div>

<div id="outer">


<div id="header">
<div id="headercontent">
<h1>Richard Shaylor</h1>
<h2>&nbsp;</h2>
  </div>
</div>
<div id="headerpic"></div>


<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#" class="active">News</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div id="menubottom"></div>

footer
<div id="footer">
<div class="left">&copy; 2006 Richard Shaylor. All rights reserved.</div>
</div>

i created a theme and made note that it was id 4. i then when on the the index.template.php file, when i got to this part i got a bit stuck because this tutorial is for 1.1 and not 1.2 at first i thought this didn't matter because i have seen other people doing the same as this, so i thought id give it a try.

i don't get where i have to put the header and footer and what should i do with my css file and the images to go with it.

as for adding the location in the index.template.php file i cannot find where to make the change.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 19, 2007, 07:24:35 PM
Quotei don't get where i have to put the header and footer
belive it or not I had better luck following the article from Unknown that loopbacks to this one :)
http://www.simplemachines.org/community/index.php?topic=19638.0

Quote.....and what should i do with my css file and the images to go with it.
if you are refering to SMF css then this should have been copied over when  you made a duplicate of your template.
If you are talking about your Joomla css then look up for CSS stylesheets at the orignal post here....essentially your css should point to your own template:

<link rel="stylesheet" type="text/css" href="http://www.example.com/templates/my style/template_css.css"/>

This what got me through...hope it helps.
All the best!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: shaylor2005 on February 19, 2007, 07:45:02 PM
this still makes no sence i have tryed all the ways i have read up but its still not working.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 19, 2007, 09:14:50 PM
Are you getting any errors on process of the index page?
I had a weird timeout (don't ask why) issue with phpMyAdmin where it 'looked' like it executed the querrry above. can you confirm that values are enters in the table?
Sorry if I am pointing out the obvious...
All the best!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: foxed on February 20, 2007, 04:07:12 AM
Hmm thanks Daniel, that sort of helped.

The problem I'm having now however is that nowhere seems to follow a set "width" standard.

For example:

Forum index: http://wow.aab-clan.co.uk/smf/
Topic View: http://wow.aab-clan.co.uk/smf/index.php?topic=1326.0
Board View: http://wow.aab-clan.co.uk/smf/index.php?board=20.0

They all appear to be different widths - driving me mental :(
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: shaylor2005 on February 20, 2007, 03:01:53 PM
i have found an easy solution a mod called global header and footer. it enables you it edit the header and footer within smf
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 20, 2007, 08:12:02 PM
Please do tell and link us  :D
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 21, 2007, 10:22:54 PM
Hi Daniel - I am having some trouble making this work also, ive been through everything, checked it twice, and cant see where im going wrong? Ive checked the DB & they entry went in fine..

All i get is the default theme? http://www.eliteairbrush.com/forum/ ???
I have tried everything i can think of, and it just wont happen! anything else you can think of to diagnose where the problem is?

Cheers for your time :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 22, 2007, 12:04:55 AM
Quote from: foxed on February 20, 2007, 04:07:12 AM
Hmm thanks Daniel, that sort of helped.

The problem I'm having now however is that nowhere seems to follow a set "width" standard.

For example:

Forum index: http://wow.aab-clan.co.uk/smf/
Topic View: http://wow.aab-clan.co.uk/smf/index.php?topic=1326.0
Board View: http://wow.aab-clan.co.uk/smf/index.php?board=20.0

They all appear to be different widths - driving me mental :(

I believe that this is due to your HTML coding, but I'm not sure. I don't have time at the moment to look into this in detail, but I'll see if I can check it out on Saturday.

Quoteedit: here is my error output, inside smf
Hmmm... It looks like it doesn't like the include() line.
In the new index.template.php, find:

include('header.php');

Replace it with:

global $boarddir;
include($boarddir . '/header.php');


Also, in the same file, find:

include('footer.php');

Replace it with:

global $boarddir;
include($boarddir . '/footer.php');

Please tell me if this works. If it does, then I'll replace the index.template.php file with a "fixed" one.

Quote from: shaylor2005 on February 20, 2007, 03:01:53 PM
i have found an easy solution a mod called global header and footer. it enables you it edit the header and footer within smf
Yeah, that mod is quite nice, but it's not as powerful as this ;)

Quotebelive it or not I had better luck following the article from Unknown that loopbacks to this one
What does [Unknown]'s have that mine is missing? What do you feel should be added to this?
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 22, 2007, 01:06:39 AM

No joy mate

Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 22, 2007, 01:55:59 AM
Are the files at /public_html/forum/header.php and /public_html/forum/footer.php? They need to be in the forum's root, not in the Themes/[theme name] directory (very sorry if this wasn't clear).
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 22, 2007, 02:04:24 AM
Quote from: Daniel15 on February 22, 2007, 01:55:59 AM
Are the files at /public_html/forum/header.php and /public_html/forum/footer.php? They need to be in the forum's root, not in the Themes/[theme name] directory (very sorry if this wasn't clear).

Ooh No they werent, i added them and it has solved it, the css isnt turning up but i should be able to sort that now! cheers
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Goggles on February 22, 2007, 08:07:57 AM
I've created a copy of the default theme and created functions in index.template.php called template_site_above and template_site_below.  I've moved the <html>...<body>, </body></html> code into these functions.  I've created the appropriate record in the themes table with theme_layer set to "site,main".  I've ensured that I am actually using the new theme and yet the site layer is not being output.  Is there any step I may have missed here or is there any reason why non default layers might not be displayed?
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 22, 2007, 08:31:28 AM
As above make sure your footer.php and header.php are in the root directory of your forum folder..

Also go to your admin panel, find your username, then your ip address, and click on it, it will how a list of errors..

See how u go!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 22, 2007, 08:34:11 AM
Quote from: Goggles on February 22, 2007, 08:07:57 AM
.  I've moved the <html>...<body>, </body></html> code into these functions. 

If you read carefully your supposed to start just after the <body> tag for your header, and continue to the content part of the page, then after the content to the </body is the footer.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Goggles on February 22, 2007, 08:43:01 AM
Quote from: fondled on February 22, 2007, 08:31:28 AM
As above make sure your footer.php and header.php are in the root directory of your forum folder..

Also go to your admin panel, find your username, then your ip address, and click on it, it will how a list of errors..

See how u go!

Quote from: fondled on February 22, 2007, 08:31:28 AM
If you read carefully your supposed to start just after the <body> tag for your header, and continue to the content part of the page, then after the content to the </body is the footer.

I'm not using any external php files.  The code in template_site_above and template_site_below is pretty much just the <html>...<body>, </body></html> code copied from the template_main_above/below functions (I'll obviously change it to do more but wanted to test the simplest possible scenario first).  I am not using the attached template file but 1 I've modified myself (reason below).

I have however just noticed I can now see the attached template file (guess you need to be register to see it) which may help.  Looking at it though I can see no differences other than the includes for header/footer.php which I'm not bothering with yet (and I can't believe that's causing the errors).

Thanks for the tip on errors though, I'll take a look this evening.  
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 22, 2007, 11:48:19 AM
Hi Daniel15,
Your tutorial is 'cleaner' but I did have issues with my index.template.php as I never could find reference in it to where footer.php and header.php are mentioned. Part of it may have been due to fact I am new to smf code structure.
All the best!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 22, 2007, 04:53:59 PM
Goggles there is a setting under themes, that makes a theme default for all users..

In the admin panel go to configuration, themes and layout, and set and reset everyones theme.. :) Good Luck

Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 23, 2007, 01:13:45 AM
QuoteI've created a copy of the default theme and created functions in index.template.php called template_site_above and template_site_below.  I've moved the <html>...<body>, </body></html> code into these functions.  I've created the appropriate record in the themes table with theme_layer set to "site,main".  I've ensured that I am actually using the new theme and yet the site layer is not being output.
This should be working perfectly...
Are you sure the index.template.php file is in the right place (it should be in Themes/[your new theme name]? Also, are you sure you updated the right database field (there's one layers entry for each theme)?

Note that what Goggles has done is exactly what I need to edit my tutorial to cover ;)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: seacoast on February 23, 2007, 06:36:20 PM
Hi Daniel15,

I'm assuming I don't need to go through this process if I'm bridging into Joomla and just want a couple of template changes, but set me straight otherwise because I want everything to work properly. After viewing your site where you are using Apollo, I would like to know:

1. It seems to change the color of the top area where you have your login I will need to alter an image file rather than using css. But which one?

2. In the Apollo default, there's a bar below that same login area that says SMF Just Installed. How did you remove it?

Thanks
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 23, 2007, 08:22:01 PM
QuoteI'm assuming I don't need to go through this process if I'm bridging into Joomla
Yeah, this is usually only if you're using a plain SMF installation.

Quote1. It seems to change the color of the top area where you have your login I will need to alter an image file rather than using css. But which one?
Which section? Do you mean the bit at the top of the page, above the forum (with "Welcome, Guest. Please login or register.")? I believe this is changed via CSS.

Quote2. In the Apollo default, there's a bar below that same login area that says SMF Just Installed. How did you remove it?
That's the news. To edit it, go to Admin Panel → News and newsletters. To completely turn it off, look in the Current Theme section :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: aholland on February 25, 2007, 02:58:40 PM
I got a little problem I can't find include('header.php') or footer in my index.template.php. Not sure what I am doing wrong.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: foxed on February 25, 2007, 05:14:46 PM
Don't suppose you had a chance to look at my HTML nightmare Daniel? Help very much appreciated :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lebisol on February 25, 2007, 09:57:36 PM
Quote from: aholland on February 25, 2007, 02:58:40 PM
I got a little problem I can't find include('header.php') or footer in my index.template.php. Not sure what I am doing wrong.
This part is missing in tutorial...there is no include code generated/to be found on initial setup, you have to add it manually. See the index.template.php attached as it already has it entered.
All the best!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: foxed on February 27, 2007, 04:07:34 AM
Managed a work around - thank you anyway!
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: jiapei100 on February 27, 2007, 08:40:38 AM

This is fantastic... I love you man!!

Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Hafdís on February 27, 2007, 04:12:11 PM
ok, i been trying to do this, but i have no clue where to start, and what files to edit, can you please explain this, what files to edit  ???

need help with this
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on February 28, 2007, 12:07:24 AM
Quote from: lebisol on February 25, 2007, 09:57:36 PM
Quote from: aholland on February 25, 2007, 02:58:40 PM
I got a little problem I can't find include('header.php') or footer in my index.template.php. Not sure what I am doing wrong.
This part is missing in tutorial...there is no include code generated/to be found on initial setup, you have to add it manually. See the index.template.php attached as it already has it entered.
All the best!
Yeah, very sorry about this, I haven't had time to extend the tutorial...

Quote from: Hafdís on February 27, 2007, 04:12:11 PM
ok, i been trying to do this, but i have no clue where to start, and what files to edit, can you please explain this, what files to edit  ???

need help with this
Basically, you use the index.template.php file attached to the first post. The header.php and footer.php go in your forum's directory (where the index.php file, and the Sources and Themes directories are).

Follow the directions, and you should be right :). If you need help, please tell us which bit you got stuck on.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: fondled on February 28, 2007, 05:41:33 AM
Im trying to update my header.php and it seems to be getting stuck in cache or something, and its not updating??

Ive had it working for a week ? I cleared all cookies and temp internet files??

Is there anything else i should be doing?
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Hafdís on February 28, 2007, 03:23:55 PM
hi...again
i am just not getting this, first of all, my language is Icelandic, so i am trying to understand this, do i edit those files in admin panel of the board,  ??? if someone can guide me thru this in easy English  :D please
this is my page http://www.koddinn.com and my forum is located here http://www.koddinn.com/spjallid
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: TheBSG on March 01, 2007, 12:44:27 PM
wouldn't it be possible to use a PHP include in the website, and include the template html file?  Currently, my site can't be so easily split into headers and footers.

Also, is this going to carry the SMF headers and footers over?
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: davomex on March 06, 2007, 09:33:00 AM
my case is different all of these stuffs looks strange though i have a minimal understanding of html and am not tota;lly strange to the use but i have a forum domain on its own bought for smf hosting and installed with fantastico but need to change the feel and colour and them and logo an many things what do i do since am not interested in putting my forum on an exosting sitr but its a site on its own
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: sniderz on March 06, 2007, 03:19:23 PM
Okay so I am having issues trying this over at www.sniderz.com

As of right now I am using iframes which are sucking big time.

Will I be able to do this with my current wordpress site. Basically I would like to get rid of the sidebars and put the forums under the blue adsense bar and have the existing footer there also.

If anyone is willing to help me out, please PM me here , I am also on itzsniderwork on AIM

Thanks
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Hafdís on March 07, 2007, 03:12:32 PM
If someone can help me out with this, please pm me, or msn [email protected]
Title: Worked great but still having one little problem
Post by: onfulltilt on March 13, 2007, 03:45:39 AM
I just used this tutorial and it worked great, at least once I registered for this site and was able to see the attached file (until then I was banging my head against the table). 

There is one little thing that's bugging me.  For some reason there's a bit of a gap between the top of the page and my header on all the forum pages. 

I'm sure the fix is very easy to spot but for some reason I can't find what's behind this.  Maybe it's just late over here and my brain is working poorly.

Anyway, the my forum is located at:  http://www.svdogpark.org/community/ if anyone can take a look at it and let me know what's going on with the gap at the top.  If you go to any of the non-forum pages on the site you will be able to see what I'm talking about.

Thanks
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on March 13, 2007, 04:15:13 AM
Quote from: sniderz on March 06, 2007, 03:19:23 PM
Okay so I am having issues trying this over at www.sniderz.com

As of right now I am using iframes which are sucking big time.

Will I be able to do this with my current wordpress site. Basically I would like to get rid of the sidebars and put the forums under the blue adsense bar and have the existing footer there also.

If anyone is willing to help me out, please PM me here , I am also on itzsniderwork on AIM

Thanks
It looks like you've started to work on this... Do you need any further help?

Quote from: Hafdís on February 28, 2007, 03:23:55 PM
hi...again
i am just not getting this, first of all, my language is Icelandic, so i am trying to understand this, do i edit those files in admin panel of the board,  ??? if someone can guide me thru this in easy English  :D please
this is my page http://www.koddinn.com and my forum is located here http://www.koddinn.com/spjallid
You need to edit the files via FTP.
I tried to make it simple to understand, but I guess it's not all that simple... What sections are you having trouble with?

Quote from: onfulltilt on March 13, 2007, 03:45:39 AM
There is one little thing that's bugging me.  For some reason there's a bit of a gap between the top of the page and my header on all the forum pages. 
Your forum appears correctly for me, without a gap (Opera 9.10, Ubuntu Linux 6.10).
Are you using Internet Explorer 6? IE sometimes seems to add gaps, and I don't really know how to fix it (its box model is screwed up :P)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: onfulltilt on March 13, 2007, 04:36:38 AM
I'm actually using IE 7 and Firefox 1.5.  The gap is showing up in both browsers.  I guess this is something I can live with but was just hoping it was going to be a quick and simple fix.  Thanks for taking a look at this so quickly.
Alex
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Xaneth on March 18, 2007, 02:49:27 PM
Nice tutorial Daniel.  I remember reading the thread, and implementing, "how to integrate the forum into your website" some time back, but this tutorial is laid out well, and everything works off of your first post.  I did have some issues with an error "unable to load site_above" when executing the SQL script to add the field into my theme, but I was able to work around it by calling the header.php within index.template.php like so:

</head>
<body>';
// Put your header stuff here
   // The following line loads the header.php file"
   include('header.php');
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Xaneth on March 18, 2007, 02:53:11 PM
Quote from: onfulltilt on March 13, 2007, 04:36:38 AM
I'm actually using IE 7 and Firefox 1.5.  The gap is showing up in both browsers.  I guess this is something I can live with but was just hoping it was going to be a quick and simple fix.  Thanks for taking a look at this so quickly.
Alex

I also have the gap, seeing what I can do to fix it, and once I find out, I'll post.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Jungle-Cat on April 12, 2007, 06:21:51 AM
Im trying to use this layers concept to my advantage, all i want to use is the area you have labeled as "content"

How would i go about this? im studying the index.template.php atm, but i cant seem to work it out.

help wiuld be greatly appreciated
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: BluesDog on April 12, 2007, 04:31:09 PM
Hello,

My site has two side panels in addition to the header and footer:

(blah, blah, blah, therefore i have special circumstances which don't seem to be addressed here... pls accept apologies for stupid question... reference my next post, below.)

Regarding the gap at the top of the page:

QuoteI'm actually using IE 7 and Firefox 1.5.&nbsp; The gap is showing up in both browsers.&nbsp; I guess this is something I can live with but was just hoping it was going to be a quick and simple fix.&nbsp; Thanks for taking a look at this so quickly.
Alex
I tried everything i could think of including zeroing body margins and padding in the template. I have no idea where the gap comes from.

I set a -10px margin on my header:

<div id="header" style="margin-top:-10px;">

...inline to over-ride the 0px margin in my stylesheet. It's dirty but seems to work in IE and FF. OTOH i haven't looked at it in Opera yet to know if my header went off the page.&nbsp; :-\

Thanks,
-jb
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: dreamman on April 12, 2007, 07:13:04 PM
(https://www.simplemachines.org/community/Smileys/simple/smiley.gif)

thank
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: BluesDog on April 13, 2007, 04:31:16 PM
D'OH!

Quote from: daniel15 on January 27, 2007, 02:49:11 AM
Essentially, a layer is simply two sub-templates, one that goes above the content, and another that goes below the content.

OK, but the thing is that i'm not really stupid, even if i might ask a stupid question, and if i can get confused then so can anyone else.

So for future reference, i'll note that Daniel15 meant exactly what he said, so it doesn't matter (too much, usually, i think), where your content goes. If you want the forum to go where your content normally is, then:
Header.php is everything from immediately below your <body> tag, up to and including the opening tag of your main content. It doesn't matter, (too much, usually, i think), whether your content usually goes in a div or a table cell.
and,
Footer.php is everything from and including your closing content tag, down to immediately before the closing </body> tag.

Works like a charm for me, everywhere except... *sigh*... IE6.

Could someone PLEASE help me with one last thing?


#wrapper{
width:98%;
margin: 0px auto 0px auto;
}
#header{
margin: 0px auto 0px 155px;
}
#left{
width: 150px;
float: left;
margin-top: -80px;
}
#right{
width: 175px;
float: right;
margin: 10px 0px 0px 0px;
}
#content{
margin: 10px 190px 10px 155px;
}
#footer{
height: 66px;
clear: both;
}

AND:

<!-- HEADER.PHP -->
<div id="wrapper" style="margin-top:-10px;">
<div id="header">
<h1><img src="../img/img.png" /></h1>
</div>
<div id="navcontainer">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<!-- nav -->
</div>
<div id="left">
<h2>
<img src="../img/img.png" />
</h2>
</div>
<div id="right">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="../img/img.png" />
</div>
<div id="content">


<!-- FOOTER.PHP -->
</div>
<div id="footer">
<p id="footer">
&copy; 2007 Some Guy &trade; LLC
</p>
</div>
</div>


In IE6, tables start at the end of the left sidebar content, wherever that may be. IOW they absolutely refuse to sit at the top of my content area unless i clear the 100% widths.

--> Where the heck are the actual posts located? I've cleared the width values from every table in the theme template, but in the forum display the posts are in a <div id="bodyarea"> which i can't find anywhere.

Any less destructive suggestions are also welcome... i'm not sure this is the best way, and anyway some tables i want to stretch all the way across the content area.

Thanks again,
-jb

PS In regards my dirty fix for the gap at top of page...(style="margin-top:-10px")... i checked in IE5.5 and Opera 9.02, so i can safely say that it works fine in every browser i have.




Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: BluesDog on April 14, 2007, 11:13:23 PM
Once more in regards the "gap" at top of page:

The theme stylesheet has padding values on the <body> tag. So e.g. to disappear the gap at top, zero the 12px value.

-jb
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lanB on April 19, 2007, 12:53:49 PM
I have just had a go at your tutorial from the first posting and managed to get it all working, its exactly what I need.
All I have to do now is play with the layout and CSS (that's the easy bit!) :) There is only about 30 pages from my original site to edit... :(

I did notice in your index.template.php file a strange bit of code...
Quote// The main content should go here.
   echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';

what is ex? should it be px?

cheers
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: lanB on April 19, 2007, 01:10:51 PM
See previous post.
I have just found a problem.
I have set up the menu links at the top of the page.
When I log out of the forum they disappear, although they are still there on other pages.
So there is no way to navigate on the site from the forum
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: ItalicVisions on April 19, 2007, 03:08:32 PM
Hi there nice tutorial but im having trouble trying to comapre the version you used to the one im using. My index.template.php is  Version: 1.1 RC2 I thought they would be almost identical but that isn't the case here. Would it be possible to have you split this for me? I know thats probably asking allot but it would be appreciated.  :)

<?php
// Version: 1.1 RC2; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1 RC2';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="graphics, grafix, grafics, how to, free, tutorial, tutorials, fireworks, photoshop, paint.net, tips" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?rc2p"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?rc2" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

if (isset($context['ob_googlebot_stats']))
echo '
<br /><br /><span class="smalltext">'
$txt['ob_googlebot_stats_lastvisit'], timeformat($context['ob_googlebot_stats']['Googlebot']['lastvisit']), '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('links','staff','contact','search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [member map]
echo ($current_action == 'mm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mm">' $txt['mm_mm'] , '</a>
</td>' 
$current_action == 'mm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [links] button
if ($context['allow_view_smflinks'])
echo ($current_action == 'links' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'links' 'active_back' 'back' '">
<a href="'
$scripturl'?action=links">' $txt['smflinks_menu']  , '</a>
</td>' 
$current_action == 'links' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'staff' 'active_back' 'back' '">
<a href="'
$scripturl'?action=staff">' $txt['smfstaff_stafflist']  , '</a>
</td>' 
$current_action == 'staff' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// the [contact] button
if ($context['allow_view_contact'])
echo ($current_action == 'contact' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'contact' 'active_back' 'back' '">
<a href="'
$scripturl'?action=contact">' $txt['smfcontact_contact']  , '</a>
</td>' 
$current_action == 'contact' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on April 24, 2007, 11:40:05 PM
Quote from: BluesDog on April 13, 2007, 04:31:16 PM
D'OH!

Quote from: daniel15 on January 27, 2007, 02:49:11 AM
Essentially, a layer is simply two sub-templates, one that goes above the content, and another that goes below the content.

OK, but the thing is that i'm not really stupid, even if i might ask a stupid question, and if i can get confused then so can anyone else.

So for future reference, i'll note that Daniel15 meant exactly what he said, so it doesn't matter (too much, usually, i think), where your content goes. If you want the forum to go where your content normally is, then:
Header.php is everything from immediately below your <body> tag, up to and including the opening tag of your main content. It doesn't matter, (too much, usually, i think), whether your content usually goes in a div or a table cell.
and,
Footer.php is everything from and including your closing content tag, down to immediately before the closing </body> tag.

Works like a charm for me, everywhere except... *sigh*... IE6.

Could someone PLEASE help me with one last thing?


#wrapper{
width:98%;
margin: 0px auto 0px auto;
}
#header{
margin: 0px auto 0px 155px;
}
#left{
width: 150px;
float: left;
margin-top: -80px;
}
#right{
width: 175px;
float: right;
margin: 10px 0px 0px 0px;
}
#content{
margin: 10px 190px 10px 155px;
}
#footer{
height: 66px;
clear: both;
}

AND:

<!-- HEADER.PHP -->
<div id="wrapper" style="margin-top:-10px;">
<div id="header">
<h1><img src="../img/img.png" /></h1>
</div>
<div id="navcontainer">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<!-- nav -->
</div>
<div id="left">
<h2>
<img src="../img/img.png" />
</h2>
</div>
<div id="right">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="../img/img.png" />
</div>
<div id="content">


<!-- FOOTER.PHP -->
</div>
<div id="footer">
<p id="footer">
&copy; 2007 Some Guy &trade; LLC
</p>
</div>
</div>


In IE6, tables start at the end of the left sidebar content, wherever that may be. IOW they absolutely refuse to sit at the top of my content area unless i clear the 100% widths.

--> Where the heck are the actual posts located? I've cleared the width values from every table in the theme template, but in the forum display the posts are in a <div id="bodyarea"> which i can't find anywhere.

Any less destructive suggestions are also welcome... i'm not sure this is the best way, and anyway some tables i want to stretch all the way across the content area.

Thanks again,
-jb

PS In regards my dirty fix for the gap at top of page...(style="margin-top:-10px")... i checked in IE5.5 and Opera 9.02, so i can safely say that it works fine in every browser i have.






To fix your posts problem, try copying your display.php from the default template in to your custom template.  That fixed it for me :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on April 27, 2007, 09:01:33 AM
I like the concept presented here, but I have a question I have yet to see asked....  If I wanted to incorporate a few CMS type modules using the index.template.php file posted here, could I also copy over the SMF main index.php file?  In other words, is it possible to use the index.php file in the root directory, then place SMF in a subfolder, which also contains the same or original index.php file?

I am thinking if the default action was changed in this code at the bottom of the index.php file:      
// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';


...to something like modules.php for example, and if the CMS modules were modified to be a series of actions and subactions, then a CMS could possibly be incorporated into SMF.  Of course the main actions would be put in the "monstous array" and then subactions created within each CMS module.

Along those thoughts, the header.php could be a CMS template_menu for links to the modules, etc.  Admin of those modules could be included in a new category section on the SMF admin page.  Language files could be modified to the SMF style.

Would having 2 of the SMF index.php files cause problems?

hhhhhmmmmmmmmm......  More thoughts...............  Could the SMF index.php file be moved to the root directory and still drive the forum along with some converted/modified CMS modules?  From what I can see, the only change to the SMF index.php file would be changing this:
// Load the settings...
require_once(dirname(__FILE__) . '/Settings.php');


to this:
// Load the settings...
require_once(dirname(__FILE__) . '/Forums/Settings.php');


All the other calls are set to $sourcedir.

###########  --- just ignore the ramblings above   :P  ---  #################

hhhhmmmmmmmmmmmm.......  thinking even further  (better mark this day down on the calendar ;) )

Instead of moving the index.php and modifying the Settings.php location, maybe just modifying the BoardIndex.php default to say..... Modules.php, then adding a button in the template_menu function to go to "?action=BoardIndex" should have nearly the same end result. (would probably need to add BoardIndex.php to the "montrous array")  Then the CMS converted modules would be Mods for SMF.

sooooo, is what I just stated feasible and/or totally insane?

if(feasible)
result{numerous possibilities...}

....thanks in advance,
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on April 27, 2007, 07:39:27 PM
:(   no joy.........

I am wanting to have another template as the default template instead of the BoardIndex.template.php   

Is there a fairly easy way to do this?  or... what am I missing?
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on April 27, 2007, 09:33:06 PM
Quote from: lanB on April 19, 2007, 12:53:49 PM
I have just had a go at your tutorial from the first posting and managed to get it all working, its exactly what I need.
All I have to do now is play with the layout and CSS (that's the easy bit!) :) There is only about 30 pages from my original site to edit... :(

I did notice in your index.template.php file a strange bit of code...
Quote// The main content should go here.
   echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';

what is ex? should it be px?

cheers
Not sure about that, but I think that "ex" is a valid unit of measurement. Perhaps search in Google?

spottedhog, I think you're complexifying things :P. I'd suggest to leave all SMF's files where they are ;).
What exactly do you want to do? Do you want to add new pages (like a normal CMS), or add modules such as what TinyPortal has in the left and right columns? To add new pages (and use SMF as a content management system, like I do on www.daniel15.com), I'd suggest to make a new index.php file in your root, and put something like this in it:

<?php
error_reporting
(E_ALL);

$ssi_theme 12;
$ssi_layers = array('site');

$ssi_gzip true//Enable GZip
$ssi_ban true//Disable banned users from being able to access site

$context['page_title'] = 'Page title';

require(
'forum/SSI.php');

if (!isset(
$_GET['action']) || $_GET['action'] == 'home')
{
echo 'Home page stuff';
}
elseif (
$_GET['action'] == 'contact')
{
echo 'Contact page stuff';
}


Something like that?

Edit: Please remember to replace "$ssi_theme = 12;" with the correct theme ID :)
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on April 27, 2007, 10:27:33 PM
Thanks for your reply!!!!

As you were saying, I was making it too complex, but not in the way you were thinking.  I guess what I was trying to explain and ultimately do was to have SMF be the driving engine for a CMS, something different than tinyPortal.

I do well understand and experimented with creating a home page like you listed, actually using the exact code you have listed, even using theme ID 12.... lol.  But I could not figure out how to make the site be able to use multiple themes.  I kept getting session issues, blank pages, with the PHPSession, in the url in the browser address bar when I went to the profile and changed themes.

:)

I have just figured out what to do, and it was simpler than what I had thought of.....  and maybe that had something to do with too much code and not knowing/remembering what was what.  Made a clean install and actually got a test of what I wanted to work!  yeah!!!!

in index.php I replaced instances of BoardIndex with the name of the template, etc.  (2 instances of 2 times each). Then I placed a "forum" action in the monstrous array pointing to BoardIndex.  Then in the default theme, added a new button for forum, linking it to ?action=forum and OMG, it worked!

What is different with this approach is that the site can have multiple themes where users can choose, provided I put a navigation button for "?action=forum" to be on the home page, kept getting a "Cannot load 'main' template.  Found a post in a search that said to list the function template_main() in the offending template, and for whatever reason, it works without any errors.... at least for now.

EDIT:  It does work!  I had to put "forum" into the action array in function template_menu.  Otherwise, MAJOR problems!  ;)  I have put in various CMS modules, web pages, etc. and all is well, nothing in the Error Log.  And it works on all the themes where the "forum" button is added with the proper link code.

--I will write up specifics of how to do this if anyone is interested.....
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on May 03, 2007, 11:25:18 PM
I'd be interested in this.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on May 04, 2007, 09:58:22 AM
Firstly, I should explain that I was looking for a way to use all the themes in SMF and still have the front or start page be something other than the forum. By default, SMF opens the BoardIndex.template.php for the front/start/home page. Soooo, what I will describe is how I am able to start with another template for the home page.

To get SMF to display a different template as the front/home/start page, we need to slightly modify the index.php so by default it will first go to what we want on the home page.

In index.php find around line 195:
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', '.xml', 'verificationcode'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}
elseif (empty($_REQUEST['action']))
{
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}


Replace with:
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', '.xml', 'verificationcode'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}
elseif (empty($_REQUEST['action']))
{
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/FrontPageIndex.php');
return 'FrontPageIndex';
}


Around line 350 find:
// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir . '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}


Replace with:

// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir . '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir . '/FrontPageIndex.php');
return 'FrontPageIndex';
}


This replaces the default file SMF looks for from BoardIndex.php to FrontPageIndex.php

Now we need to create an action to call the forum.

Around line 250 in the index.php file add:
'forum' => array('BoardIndex.php', 'BoardIndex'),

By adding this you can now add a navigation button in your theme and use this to call the main forum: index.php?action=forum

Next we need to create the FrontPageIndex.php and FrontPageIndex.template.php. The method I will show here is not tremendous code writing, but it works.

Copy this to create the Sources/FrontPageIndex.php file:
<?php

if (!defined('SMF'))
die('Hacking attempt...');



function 
FrontPageIndex()
{
global $context$txt;
loadLanguage('index');
loadTemplate('FrontPageIndex');
$context['page_title'] = $txt[18];


}


?>

This file calls the FrontPageIndex.template.php file you will create below, and also shows your forum name in the browser titlebar.

Copy this code to create the Themes/default/FrontPageIndex.template.php file:
<?php

require_once('SSI.php');
function 
template_main()
{

All the content for your home page goes here.

}

?>


As you may notice, I put the require SSI here because I placed some SSI code snippets on the front page.

2 Important things to know:

1. You can create as many "actions" now as you wish, but each time you MUST create the action in the index.php file, just as was shown above for the forum navigation button.

2. The template for the action you are making MUST begin with:
function template_main()
{


}


...or you will get a SMF error saying something like "unable to load Main template".

For my purposes I created a header.php file and placed it in the root directory. I then added  include('header.php'); immediately after the template_menu() in the index.template.php file of the theme I use. For example:
template_menu();
include('header.php');


In that header file, I placed ad banners and then a navigation button bar for the new "actions" I created.

I also created a footer.php file and put it in the root directory. I put the include('footer.php'); just above where the SMF footer info is displayed in the same theme index.template.php file. In that footer.php file I have an ad banner and my own footer words.

If you are using the default theme, do the following:
--we need to add the action 'forum' to the current_action array for the navigation buttons in the default theme....

In Themes/default/index.template.php find:
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];

...which is in the function template_menu....
and replace with:
if (in_array($context['current_action'], array('forum', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];

...we just added 'forum', to the current_action array.

In the same file and function find:
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


..add after:
// How about the [forum] button?
if ($context['allow_search'])
echo ($current_action == 'forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">' , 'forum' , '</a>
</td>' , $current_action == 'forum' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


This will show the forum button in the navigation menu and when clicked, it will open the ?action=forum.  Remember earlier in the index.php file we created the action:  forum, and that action opens BoardIndex.php, which loads the main forum template.


This method works for me, and does not create any log errors.
Title: Re: [SMF 1.1.1] Integrating the forum into your site using SMF's layer system
Post by: Daniel15 on May 06, 2007, 01:51:36 AM
Good work, spottedhog :). I do mine a slightly different way (I have my main site in index.php, and my forum in a "forum" directory).

One day, I'll post a tutorial on how I do it...
I already have an updated (and significantly improved - works with any theme, not just the default) version of this tutorial, but I'm waiting for someone on the Documentation Team to look over it :).
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Alan S on May 26, 2007, 06:55:40 PM
Hey , Daniel

I'm having a bit of a problem , I'm using Bloc's Wiki theme and i want to intergrate it into my site , I have the header and footer.php made and the database modifications done , However i am unsure on what edits to make to Wiki's index.template.php?


Thanks for any help

- Alan S
Title: Unable to load the 'site_above' template.
Post by: kooza on May 28, 2007, 02:09:27 PM
I get this error after updating SQL

Unable to load the 'site_above' template.

Anyone know why?

Thanks,
Mike.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on May 28, 2007, 03:10:29 PM
Quote from: Alan S on May 26, 2007, 06:55:40 PM
Hey , Daniel

I'm having a bit of a problem , I'm using Bloc's Wiki theme and i want to intergrate it into my site , I have the header and footer.php made and the database modifications done , However i am unsure on what edits to make to Wiki's index.template.php?


Thanks for any help

- Alan S

I used the same method at www.berninaokc.com with the wikistyle theme.  Feel free to take a look :)

Quote from: kooza on May 28, 2007, 02:09:27 PM
I get this error after updating SQL

Unable to load the 'site_above' template.

Anyone know why?

Thanks,
Mike.

That would be because you don't have a template_site_above function declared in your index.template.php file.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kooza on May 28, 2007, 03:33:33 PM
Thanks, I downloaded the one from this thread and thought I had uploaded it but hadn't so I am a fool.

However my header.php and footer.php files aern't loading. This time I have uploaded them, to the same directory as the index.template.php

Am I being a fool again?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on May 28, 2007, 03:57:56 PM
Your header/footer files need to be in the main forums directory.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Alan S on May 28, 2007, 04:57:09 PM
Quote from: Wal-Mart Security on May 28, 2007, 03:10:29 PM
Quote from: Alan S on May 26, 2007, 06:55:40 PM
Hey , Daniel

I'm having a bit of a problem , I'm using Bloc's Wiki theme and i want to intergrate it into my site , I have the header and footer.php made and the database modifications done , However i am unsure on what edits to make to Wiki's index.template.php?


Thanks for any help

- Alan S

I used the same method at www.berninaokc.com with the wikistyle theme.  Feel free to take a look :)

Quote from: kooza on May 28, 2007, 02:09:27 PM
I get this error after updating SQL

Unable to load the 'site_above' template.

Anyone know why?

Thanks,
Mike.

That would be because you don't have a template_site_above function declared in your index.template.php file.

Cool , Thats a very well done site , By any chance would you be able to give the code i need to add to the index.template of the wiki and where it needs to go , I've been messing around with it for the last few days but i cant figure it out , It always screws up the layout , Eg. http://corkthings.com/tv
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on May 29, 2007, 09:49:48 AM
I was able to make my sites work by just putting the forum in to a <td> that had a specified width.  On the page that I put the forums on, if you noticed there is a difference between that page and the rest of the site.  The rest of the site just uses some div tags, but the forums page uses a complete table.  The top menu is in a <tr><td>, the column on the left is in a new <tr><td>, and the forums are in a <td>.  All with specified widths.  If you put your forums within a <td> you'll find that they aren't all that hard to contain, it's just that the styling is a ****** ;)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: soulessmirage on June 06, 2007, 05:31:27 PM
I was able to get it to work on the default theme.But my problem is splitting up a non-default index.template.php

I can't exactly find where to break it up.Then it is a TP theme so it also eliminates the comparative value between the two.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on June 16, 2007, 03:01:53 AM
URL?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: soulessmirage on June 18, 2007, 02:09:47 AM
http://www.v103.net/forums/
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on June 18, 2007, 02:35:43 AM
Looks like a regular SMF theme to me, I don't see where you could be having trouble with it.  Now that I think about it, this entire integration method isn't really suited for TP...TP is the integration.  It's a portal, which is designed to be the entire site.  My advice would be to use either TP or plain SMF.  It's really not too hard to get away from a portal, SMF has SSI.php, which you can use to do just about anything any portal can do.

www.berninaokc.com
www.acegamingsyndicate.com
www.the-tenth.com

All of those sites I made without any portals using only SSI and a site template.  All you are doing by attempting this is over-complicating things.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: zion on June 18, 2007, 10:20:25 AM
Hmm. Interesting integration, but not certain this would work for me.  But since Wal-Mart pointed me here, I'll post what I am looking to do, and maybe you guys can help:

I am in the process of giving my site an overhaul - www.swg-crimsonstar.com .

Now, I handle graphics more than I do php - in fact, I had this site made for me, and I pretty much don't know a lick about PhP.

Anyway, through trial and error, I managed to change all the layout features I needed to, and implemented some new graphics (with more to come later).

And as the last thing I did, I successfully was able to embed the index page of the forums in the main table, by sticking a basic php file in my includes folder, and telling it to include the path to the index.php of the boards (I tried for a bit to do it direct from my main .php file, but this was the only way I could get it to work).

Now on to my issue - I can embed the forums initial page just fine.  But every single link since then opens up the forums in the entire browser.  I want to keep it confined to that table I have it in.  Is there a setting I can change in the index.php file of the forums?  I am using the stock index.php; no mods to it at all.

Or is there another way to do this?

If you need any more info, let me know.  And yes, I know the layout for the table is too small right now - I want to hammer this out first before I resize the table and the left side graphic.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on June 19, 2007, 02:49:22 PM
If you use the procedure listed on this thread, you should be able to accompolish what you need much easier and without problems.  I have used it on several sites, including but not limited to:

www.berninaokc.com
www.the-tenth.com
newsite.acegamingsyndicate.com

The new window thing is probably something wrong with your main site's CSS, that's what it sounds like.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: soulessmirage on June 22, 2007, 03:38:16 AM
Ok that theme that i used, i switched to the nontp version and it coded weird.I even used a comparison program to help me.I get stuck because there is no
function template_main_above()

but in it's place is '; template_menu();

and the footer is at the bottom aswell.Plus there is an added header.I have tryed alot of different way to do it but with no luck.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: reynierpm on June 23, 2007, 12:33:00 PM
Hi:
I try to integrate the SMF into my site and this post is amazing but I have some problems. Im my application I have two files: header.php and footer.php. The header file contains all stuff goes in header. Where I need to place this two files? I can use from outside directory? I mean:

L assets
L templates
  L mytemplate
   L css
   L images
   L jscript
   header.php
   footer.php
L foro
L Themes
  L mynewtheme
  index.template.php

Understand? Also I run the query and I get this error:
QuoteUnable to load the 'header_above' template.
Can any help me?
Cheers
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: IchBin™ on June 23, 2007, 01:11:00 PM
From the original post:
QuoteThe index.template.php file assumes that header.php and footer.php are in your forum's directory.

Don't know about your error. It could be because you don't have the files in the right place.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: reynierpm on June 24, 2007, 02:36:46 PM
Quote from: lebisol on February 19, 2007, 07:24:35 PM
Quotei don't get where i have to put the header and footer
belive it or not I had better luck following the article from Unknown that loopbacks to this one :)
http://www.simplemachines.org/community/index.php?topic=19638.0

Hi:
I try both and nothing is showed to me. Besides I get this error:
Quoteinclude(footer.php) [function.include]: failed to open stream: No such file or directory

See the image attached
(//)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on June 24, 2007, 03:12:42 PM
If you have the file "header.php" in the same location as Settings.php or SSI.php, then you can have this in the index.template.php:

// Show the menu here, according to the menu sub template.
template_menu();

include('header.php');

// The main content should go here.


That would put your header.php file just under where the navigational buttons are.

If you wish to have the footer.php file to display just above the regular theme's footer location, use this:

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

include('footer.php');


Again, both of these assume header.php or footer.php are in the root directory of your forum files, same location as Settings.php or SSI.php
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: reynierpm on June 24, 2007, 04:23:54 PM
Hi and thanks for your reply:
I haven't the files in forum's root. See the image for further details:
[img=http://img530.imageshack.us/img530/7885/forosfe6.th.png] (http://img530.imageshack.us/my.php?image=forosfe6.png)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on June 24, 2007, 06:18:05 PM
Your "include" should look like this:

include('Themes/SIMPRO/footer.php');
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 20, 2007, 02:51:26 PM
Quote from: Daniel15 on January 27, 2007, 02:49:11 AM


The layer system - What is it?
SMF's templating system uses a thing called "layers". Essentially, a layer is simply two sub-templates, one that goes above the content, and another that goes below the content. For example, the default layer is called "main", which means that "main_above" is above the content, and "main_below" is below the content:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.daniel15.com%2Fstuff%2Fsmf%2Flayers.jpg&hash=c28ee0c4602b7bfefdb27e0d31c5b96026006f01)
Since you're integrating the forum into your site, we'll add a new layer called "site". This layer will be before the "main" layer, so the order will be site_above --> main_above --> Content --> main_below --> site_below

Very first steps - Website template
The first thing you need is get the contents for the new layer. I assume that you have a HTML template for your current site, so we'll use that. For the purposes of this tutorial, I'll be using this template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</head>

<body>
<h1 align="center">My really cool website</h1>
<div align="center"><a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a></div>
<hr />

This would be the actual content!<br />
bla bla bla

<hr />
&copy;2007 Your site
</body>
</html>

You will need to split this into two files, one for the header and one for the footer. For the header, copy all text after the <body> tag until the point where the page content begins, and save this into a file called header.php. For the purpose of this tutorial, this code would be used:

<h1 align="center">My really cool website</h1>
<div align="center"><a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a></div>
<hr />

You also need to do a similar thing for the footer. Copy all the text from the end of the content until the </body> tag, and save it into a file called footer.php. Again, for the purpose of this tutorial, this code will be used:

<hr />
&copy;2007 Your site



Hm, i don't understand, how i can determine which content from <hr> to </body> should i copy in new file when there isn't certain <hr> tag in index.template.php file for smf default theme?  :o
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 20, 2007, 03:08:51 PM
Your code with the footer.php file could look something like this (from the index.template.php file):

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

include('footer.php');
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 20, 2007, 04:33:31 PM
ok, but how we can alone split index.template.php? and is there some smf color compatibile template for index page of site[ not forum] ?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 20, 2007, 05:37:17 PM
Do the steps within this thread, and also look at this thread:

http://www.simplemachines.org/community/index.php?topic=19638.0 (http://www.simplemachines.org/community/index.php?topic=19638.0)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 20, 2007, 08:44:57 PM
No, i read it alrady and you aren't helping me.
i want the reverse process.
to use smf header and footer to another custom pages and i just need what and how i sholud delete the boards list and make it clear to put another content on their place?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 21, 2007, 06:25:25 AM
OK, I will take the information I got from the 1st page of the above link and give you an example...

Try this:

<?php
require('./smf/SSI.php');
template_main_above();

//Site content goes here
include "../includes/content.php";

template_main_below();
?>


Or another way could be this:

REPLACE INTO yourprefix_themes
   (ID_THEME, variable, value)
VALUES (that number, 'theme_layers', 'site,main');

(where "yourprefix_" is your prefix, often 'smf_' and "that number" is the theme id you wish to use)

<?php

error_reporting
(E_ALL);

$ssi_theme 1//or whatever ID_THEME you are using
$ssi_layers = array('site');

// If you want SSI.php to start gzipping for you ;).
$ssi_gzip true;

require(
'path/to/your/SSI.php');

echo 
'Your page stuff go here';

ssi_shutdown();

?>


...and yes, I was helping you.  What I listed here I took from the link above.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 21, 2007, 08:54:47 PM
ok , tell me how i can incorporate smf hedaer and foote for this custom html page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Razmena banera</title>
</head>
<body>
<body><table width="100%"  border="0"><tr><td width="45%"></td><td bgcolor="#E9F0F6" align="right">
    <font size="2" color="#FFFFFF" face="Verdana">
    <a href="http://www.farmaceuti.com/forum">Forum&nbsp; </a> |
    <a href="http://www.farmaceuti.com/chat/chat">Chat&nbsp; </a> |
    <a href="http://www.farmaceuti.com/tekstovi">Tekstovi&nbsp</a> |
    <a href="http://www.farmaceuti.com/marketing.html">Marketing</a> |
    <a href="http://www.farmaceuti.com/forum/links">Linkovi</a> |
    &nbsp;
    </font></td><td width="10%"></td></tr></table><p></p>
<table width="100%"  border="0" cellpadding="1" cellspacing="0" bgcolor="#666666">
  <tr>
    <td><table border="0" width="100%" cellspacing="5" cellpadding="5" bgcolor="#FFFFFF" bordercolor="#666666">
  <tr>
    <td>
      <p align="center"><font size="6" face="Georgia">Forum farmaceuta ::
      </font><font face="Georgia" size="6" color="#336699">Saradnja</font><font size="6" face="Georgia"><br>
      </font><font size="4" face="Georgia">Razmena banera/linkova
      </font><font size="4" face="Georgia">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#F4F4F4" valign="top" align="center">
     <table width="80%"  border="0" align="center" cellpadding="14" cellspacing="35" bgcolor="#F4F4F4">
  <tr><td>
    <font face="Georgia,Helvetica,Times New Roman, Arial" color="#003148" size="4">Razmenu banera Farmacija forum ce obavljati sa sajtovima koji ispunjavaju sledece uslove:
<p><li> Imaju Page Rank minimum 3. <a href="http://www.prchecker.info">Proveriti PR ovde</a></li></p>
<p><li> Alexa rating bar u prvih 500000 sajtova [ uz svu nepouzdanost Alexa servisa za komparaciju sajtova, to nam je jedini nacin da dodjemo do neke priblizne informacije o posecenosti sajta sa kojim treba da razmenimo baner/link]</li>
    <p><li> Ako ste prijavljeni na topsajt.com top listu potrebno je da imate bar 300 posetilaca dnevno</li></p>
<p> Vas baner/link ce biti postavljen na pocetnu stranu foruma ili u odgovarajuci forum u zavisnosti od dogovora, reciprocitet je pozeljan.</p>
<p>Banere cemo razmenjivati samo sa sajtovima/forumima koji ispunjavaju odredjene kriterijume</p>
<p> Banere za razmenu saljite na mail: marketingforuma[et]gmail.com sa naznakom "razmena banera"<p>&nbsp;</p>


</font></td>
  </tr>
  <tr><td><script language="JavaScript">
<!--
  // Hit counter code for Webstat.net
  var data = '&r=' + escape(document.referrer)
+ '&n=' + escape(navigator.userAgent)
+ '&p=' + escape(navigator.userAgent)
+ '&g=' + escape(document.location.href);
  if (navigator.userAgent.substring(0,1)>'3')
    data = data + '&sd=' + screen.colorDepth
+ '&sw=' + escape(screen.width+'x'+screen.height);
  document.write('<img alt="Free Counter and Web Stats" width="0" height="0" border="0" hspace="0" '+'vspace="0" src="http://www.webstat.net/basic/counter.php?i=19290' + data + '">');
// -->
</script></td></tr>
</table></table></table>
    <table width="100%" bgcolor="white"><tr><td>

<script type="text/javascript"
src="http://widgets.alexa.com/traffic/javascript/graph.js"></script>

<script type="text/javascript">/*
<![CDATA[*/

   // USER-EDITABLE VARIABLES
   // enter up to 3 domains, separated by a space
   var sites      = ['www.farmaceuti.com  '];
   var opts = {
      width:      80,  // width in pixels (max 400)
      height:     30,  // height in pixels (max 300)
      type:       'r',  // "r" Reach, "n" Rank, "p" Page Views
      range:      '6m', // "7d", "1m", "3m", "6m", "1y", "3y", "5y", "max"
      bgcolor:    'e6f3fc' // hex value without "#" char (usually "e6f3fc")
   };
   // END USER-EDITABLE VARIABLES
   AGraphManager.add( new AGraph(sites, opts) );

//]]></script>

</td><td align="center"> <img src="http://www.farmaceuti.com/BANERI/Mainkonacno.gif" alt="Postpaid internet" height="60" width="468" ></div>
    </td></tr>
    </font><script language="JavaScript">
<!--
  // Hit counter code for Webstat.net
  var data = '&r=' + escape(document.referrer)
+ '&n=' + escape(navigator.userAgent)
+ '&p=' + escape(navigator.userAgent)
+ '&g=' + escape(document.location.href);
  if (navigator.userAgent.substring(0,1)>'3')
    data = data + '&sd=' + screen.colorDepth
+ '&sw=' + escape(screen.width+'x'+screen.height);
  document.write('<img alt="Free Counter and Web Stats" width="0" height="0" border="0" hspace="0" '+'vspace="0" src="http://www.webstat.net/basic/counter.php?i=19290' + data + '">');
// -->
</script>
    </td>
  </tr>

</table>
</form>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
      <p align="center"><b><font size="2" face="Georgia"><span style="color: #006595">Copyright FF-Sva prava zadrzana! </span></a></font></b></td>
  </tr></table></td></tr></table></td>
</tr></table>
</body>
</html>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 22, 2007, 07:39:43 AM
Something similar to this may work....

That custom html page, name it content.html  Remove <body> and everything before it.  Remove </body></html> from the bottom of the file.

Then for your custom page for the SMF headers and footers, use this:

<?php
require('./path/to/SSI.php');
template_main_above();

//Site content goes here
include "./content.html";

template_main_below();
?>


By the way....  That custom html page is no where close to being XHTML compliant....
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 22, 2007, 07:40:09 PM
nope
QuoteWarning: main(./path/to/SSI.php): failed to open stream: No such file or directory in c:\program files\easyphp1-7\www\forum\smf_1-1-1_install\razmenabanera1.php on line 2

Fatal error: main(): Failed opening required './path/to/SSI.php' (include_path='.;C:\Program Files\EasyPHP1-7\php\pear\') in c:\program files\easyphp1-7\www\forum\smf_1-1-1_install\razmenabanera1.php on line 2
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 22, 2007, 07:46:58 PM
require('./path/to/SSI.php');  <--- replace "/path/to" with the actual path to your SSI.php file.

Sorry about not explaining that part.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 22, 2007, 09:36:57 PM
no,no it's ok, i figure it on my own :)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 25, 2007, 08:55:04 AM
Here is some code to use to create your own start page or another page.  I tried to leave comments within the code to make things clear.

<?php

$ssi_gzip 
true;  //true--means gzip is turned on.
$ssi_ban true;  //true--means a banned forum user will be banned also in the SSI page.
//$ssi_theme = 2;  //uses the theme [images, buttons, colors] with ID=2, which usually is classic theme.  Specifiy theme ID to use.
//Leave as is to use the default theme or the member's theme.
ob_start();  //is needed not to get errors.

require($_SERVER['DOCUMENT_ROOT'].'/SSI.php'); 

$context['page_title'] = 'test page'//needs to go above template_main_above(); to display Page Title

template_main_above();

//include('header.php'); //Contents of a custom header.php file.  Displayed immediately under the template_menu();  Uncomment to display.


//Page content goes here


//include('footer.php'): //Contents of a custom footer.php file.  Displayed above SMF copyright line.  You could put your own footer info here.  Uncomment to display.
template_main_below();

?>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 25, 2007, 04:52:29 PM
<?php

$ssi_gzip 
true;  //true--means gzip is turned on.
$ssi_ban true;  //true--means a banned forum user will be banned also in the SSI page.
//$ssi_theme = 2;  //uses the theme [images, buttons, colors] with ID=2, which usually is classic theme.  Specifiy theme ID to use.
//Leave as is to use the default theme or the member's theme.
ob_start();  //is needed not to get errors.

require('C:/Program Files/EasyPHP1-7/www/forum/smf_1-1-1_install/SSI.php'); //replace path/to  with actual path.

$context['page_title'] = 'test page'//needs to go above template_main_above(); to display Page Title

template_main_above();

//include('header.php'); //Contents of a custom header.php file.  Displayed immediately under the template_menu();  Uncomment to display.


//Page content goes here
hkhkgjhjlhlkhl test test test 

//include('footer.php'): //Contents of a custom footer.php file.  Displayed above SMF copyright line.  You could put your own footer info here.  Uncomment to display.
template_main_below();
?>



QuoteParse error: parse error, unexpected T_STRING in c:\program files\easyphp1-7\www\forum\untitled1.php on line 22
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 25, 2007, 05:18:31 PM
try this:

echo 'hkhkgjhjlhlkhl test test test ';

...this is basic php.... maybe you should look over some PHP Coding tutorials.  I think there may be some here somewhere.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Farmacija on July 25, 2007, 05:41:06 PM
no, i just want to show you that something is wrong in code which you post here ...
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 25, 2007, 06:06:47 PM
...sigh   ::)

There was nothing wrong with the code I posted.  What you placed in there was not a proper way to output content.  With a php file, you must output using either:

echo 'content here';

or

print_r();

...sigh
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on July 25, 2007, 06:55:29 PM
Here is something that may help those who are having "require SSI.php" problems.  (which I just had....  :-[ ) 

Use this:

require_once ($_SERVER['DOCUMENT_ROOT'].'/SSI.php');

At least it is working well for me.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: DobleB on August 29, 2007, 12:12:40 AM
I have a problem, the links in my forum gets a a color that shouldn't... I want to know if somebody can help me to figure it out... my header looks like this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>.:MUSINETWORK SCHOOL OF MUSIC:. | &iexcl;BIENVENIDO!</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
background-color: #000000;
background-image: url(fondo.jpg);
background-repeat: repeat-y;
background-position:center;
}
.style1 { color: #FFCC00;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style3 { font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF6600;
}
.style4 { font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
a:link {
color: #FFCC00;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFCC00;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
}
.tex {
font-size: 12px;
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
}
.style5 {color: #FF9900}
.Estilo1 {
color: #FF6600;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
}
-->
</style></head>

<body>
<table width="900" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="900">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="145">
              <param name="movie" value="../../../MENU.swf" />
              <param name="quality" value="high" />
              <embed src="../../../MENU.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="145"></embed>
            </object>
          <table width="900" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="900" height="30">
                    <img src="../../../FLOGIN.jpg" width="900" height="30" border="0" usemap="#Map" />
                      <map name="Map" id="Map">
                        <area shape="rect" coords="2,8,205,25" href="../CREDITOS.html" target="_self" />
                        <area shape="rect" coords="752,8,799,23" href="http://www.musinetwork.com/foros/index.php?action=login" target="_self" />
                        <area shape="rect" coords="810,9,877,22" href="http://www.musinetwork.com/foros/index.php?PHPSESSID=3527419bba89d8b2a68c6bbca13474d8&amp;action=register" target="_self" />
                        </map>
</td>
  </tr>
          </table>
<table class="tex" width="900" height="265" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
            <tr align="center" valign="top">
              <td height="19" colspan="2">
      <div class="style4" align="justify" style="background-color:#FFFFFF; padding:5px">


and the footer looks like this:

</div>
</td>
  </tr>
  </table>
  </td>
</tr>
</table>
</body>
</html>


can somebody please tell me why the links get that awuful color and what should I do tho correct that??? sorry if I'm pushy, but I'm new using the smf, and I tried every solution I could... Thank you very much for your help...
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on August 29, 2007, 12:25:45 AM
You can change the color of the links in the CSS file(style.css).  What you're looking for is a:link a:active a:hover a:visited or any other a: types of things.  Usually I just delete that part of the CSS file in the custom theme, that way there are no conflicts with the CSS file I use for the rest of the site.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: DobleB on August 29, 2007, 12:53:29 AM
well, in fact I want the new theme to keep the original appearance of the default theme, and all the text in the new theme is exactly the same except for the links... I even removed the a:'s from the header and even then the links still changing... What can I do?  :'(
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: IchBin™ on August 29, 2007, 01:39:50 AM
If you look in the index.template.php file of the default theme you'll notice how the style.css file is linked in the top. Just link it the same way and it will use the styles from the css file.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: sponty on September 02, 2007, 01:42:32 PM
Hey there,

I'm running an SMF Forum (v 1.1.3) and I thought I followed the steps correctly, but there's a problem.

When I try to go to the forum, all that displays is "Unable to load the 'site_above' template." I'm unsure as to why I'm getting this 'error', so if anyone could let me know how I might fix this, please let me know.

http://www.totalplaystudios.com/forum (http://www.totalplaystudios.com/forum)

Header:
<div class="main">

<div class="main_left">

<a href="http://www.totalplaystudios.com/" target="_top">
<div class="header">
</div>
</a>

<div class="link_menu" align="left">
<a href="http://www.totalplaystudios.com/radio" accesskey="1" target="_top">Radio</a>
<a href="http://www.totalplaystudios.com/tv" accesskey="2" target="_top">TV</a>
<a href="http://www.totalplaystudios.com/modcast" accesskey="3" target="_top">Modcast</a>
<a href="http://www.totalplaystudios.com/audio" accesskey="4" target="_top">Audio</a>
<a href="http://www.totalplaystudios.com/forum" accesskey="5" target="_top">Forum</a>
<a href="http://www.totalplaystudios.com/staff" accesskey="6" target="_top">Staff</a>
</div>

<div class="content" align="left">


Footer:
</div>

</div>

<div class="main_right">

<div class="link_episodes">

<div class="lbl">content</div>

<div class="clearer"><span></span></div>

</div>

</div>

<div class="footer">

<div class="left">
All content and images &copy; <a href="http://www.totalplaystudios.com">Total Play Studios</a> 2007.
</div>

</div>

</div>


Thanks very much.  :)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 02, 2007, 02:02:31 PM
What is in the template_site_above and template_site_below functions?  If you could please attach your index.template.php I could take a look at that and see what's going on.  Another thing that could cause it is if you didn't do the phpmyadmin query, or if you did it to the wrong theme ID.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 05, 2007, 04:17:47 PM
Ok, I want to make sure what I am trying to do is possible before I figure out what is going wrong with my site.  Basically, I want the forum inside the part that has EW at http://www.ksgrafix.com/EternalWisdom/index.html.  Is this even possible.  My last attempt went bad (http://www.ksgrafix.com/EternalWisdom/smf/index.php) Then again, it looks like i need some extra info in the top (which I added into the top of index.template.php).  Any help would be appreciated.  Basically, I'm trying to do something like the way another site a friend of mine did (with vbulletin however) at http://www.revolutiong.com.  The style manager in that allows for editing completely of how it looks with header/footer in the editor, but its similar to what this guide says (except its all through admin control instead of code)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: jimjam on September 05, 2007, 05:14:19 PM
Ok guys I have followed this tutorial using the layers etc and when I view my site (which has a sidebar on the left) some sections of the forum overflow way beyond the actual site container.

Any ideas the site should fit into around 1000px wide.

Any help appreciated.
James
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 06, 2007, 08:04:58 PM
Quote from: jimjam on September 05, 2007, 05:14:19 PM
Ok guys I have followed this tutorial using the layers etc and when I view my site (which has a sidebar on the left) some sections of the forum overflow way beyond the actual site container.

Any ideas the site should fit into around 1000px wide.

Any help appreciated.
James

Can you please post a link to your site?

Quote from: kaeus on September 05, 2007, 04:17:47 PM
Ok, I want to make sure what I am trying to do is possible before I figure out what is going wrong with my site.  Basically, I want the forum inside the part that has EW at http://www.ksgrafix.com/EternalWisdom/index.html.  Is this even possible.  My last attempt went bad (http://www.ksgrafix.com/EternalWisdom/smf/index.php) Then again, it looks like i need some extra info in the top (which I added into the top of index.template.php).  Any help would be appreciated.  Basically, I'm trying to do something like the way another site a friend of mine did (with vbulletin however) at http://www.revolutiong.com.  The style manager in that allows for editing completely of how it looks with header/footer in the editor, but its similar to what this guide says (except its all through admin control instead of code)

It looks like the header/footer was not included correctly in the forum.  Can you please post your header.php, footer.php, and index.template.php?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: jimjam on September 06, 2007, 10:20:28 PM
If you login with the username test and a pasword of testing and take a look at this link you will see the profile box shoot off over the actual boundries in the page template.

http://www.maltonandoldmaltoncc.com/forum/index.php?action=profile;u=2;sa=forumProfile

Thanks
James
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 07, 2007, 09:55:45 PM
mmm

I've experienced this on my forums before as well, you can edit this in profile.template.php
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: jimjam on September 08, 2007, 03:25:23 AM
Ok will give it a go. Thanks it helps when someone points you to the correct file to alter.

Thanks
James
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: jimjam on September 08, 2007, 03:45:29 PM
Ok have had a look into this and it seems to be related to the size of the fields etc such as the upload own picture box with the button next to it. I have made achange and things are improving.

Thanks for pointing me in the right direction.

James
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 08, 2007, 07:44:24 PM
You're welcome :)

kaeus are you still alive?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 10, 2007, 12:06:38 AM
Sorry, I've been having a lot of college work lately, but here are the files.

Header.php:

<div align="center">
<table id="Table_01" width="1024" height="325" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="../images/index_01.gif" width="37" height="140" alt=""></td>
<td colspan="12">
<img src="../images/index_02.gif" width="963" height="140" alt=""></td>
<td>
<img src="../images/index_03.gif" width="24" height="140" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/index_04.gif" width="37" height="9" alt=""></td>
<td colspan="12">
<img src="../images/index_05.gif" width="963" height="9" alt=""></td>
<td>
<img src="../images/index_06.gif" width="24" height="9" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/index_07.gif" width="37" height="32" alt=""></td>
<td>
<img src="../images/index_08.gif" width="318" height="32" alt=""></td>
<td>
<img src="../images/index_09.gif" width="8" height="32" alt=""></td>
<td colspan="2">
<a href="#"
onmouseover="change../images('index_10', '../images/index_10-over.gif'); return true;"
onmouseout="change../images('index_10', '../images/index_10.gif'); return true;"
onmousedown="change../images('index_10', '../images/index_10-over.gif'); return true;"
onmouseup="change../images('index_10', '../images/index_10-over.gif'); return true;">
<img name="index_10" src="../images/index_10.gif" width="125" height="32" border="0" alt=""></a></td>
<td>
<a href="#"
onmouseover="change../images('index_11', '../images/index_11-over.gif'); return true;"
onmouseout="change../images('index_11', '../images/index_11.gif'); return true;"
onmousedown="change../images('index_11', '../images/index_11-over.gif'); return true;"
onmouseup="change../images('index_11', '../images/index_11-over.gif'); return true;">
<img name="index_11" src="../images/index_11.gif" width="126" height="32" border="0" alt=""></a></td>
<td>
<a href="#"
onmouseover="change../images('index_12', '../images/index_12-over.gif'); return true;"
onmouseout="change../images('index_12', '../images/index_12.gif'); return true;"
onmousedown="change../images('index_12', '../images/index_12-over.gif'); return true;"
onmouseup="change../images('index_12', '../images/index_12-over.gif'); return true;">
<img name="index_12" src="../images/index_12.gif" width="127" height="32" border="0" alt=""></a></td>
<td>
<a href="#"
onmouseover="change../images('index_13', '../images/index_13-over.gif'); return true;"
onmouseout="change../images('index_13', '../images/index_13.gif'); return true;"
onmousedown="change../images('index_13', '../images/index_13-over.gif'); return true;"
onmouseup="change../images('index_13', '../images/index_13-over.gif'); return true;">
<img name="index_13" src="../images/index_13.gif" width="127" height="32" border="0" alt=""></a></td>
<td colspan="3">
<a href="#"
onmouseover="change../images('index_14', '../images/index_14-over.gif'); return true;"
onmouseout="change../images('index_14', '../images/index_14.gif'); return true;"
onmousedown="change../images('index_14', '../images/index_14-over.gif'); return true;"
onmouseup="change../images('index_14', '../images/index_14-over.gif'); return true;">
<img name="index_14" src="../images/index_14.gif" width="127" height="32" border="0" alt=""></a></td>
<td colspan="2">
<img src="../images/index_15.gif" width="5" height="32" alt=""></td>
<td>
<img src="../images/index_16.gif" width="24" height="32" alt=""></td>
</tr>
<tr>
<td rowspan="3" background="../images/index_17.gif">&nbsp;</td>
<td rowspan="3" class="leftimg">The fear of the Lord teaches a man wisdom, and humility comes before honor. <br>
    Prov 15:33</td>
<td colspan="2">
<img src="../images/index_19.gif" width="11" height="39" alt=""></td>
<td colspan="6">
<img src="../images/index_20.gif" width="626" height="39" alt=""></td>
<td colspan="3">
<img src="../images/index_21.gif" width="8" height="39" alt=""></td>
<td>
<img src="../images/index_22.gif" width="24" height="39" alt=""></td>
</tr>
<tr>
<td colspan="2" background="../images/index_23.gif">&nbsp;</td>
<td colspan="6" valign="top" bgcolor="#000000" class="contentholder"><p>


Footer.php
</p>
    <p>&nbsp;</p></td>
<td colspan="3" background="../images/index_25.gif">&nbsp;</td>
<td background="../images/index_26.gif">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<img src="../images/index_27.gif" width="11" height="61" alt=""></td>
<td colspan="6">
<img src="../images/index_28.gif" width="626" height="61" alt=""></td>
<td colspan="3">
<img src="../images/index_29.gif" width="8" height="61" alt=""></td>
<td>
<img src="../images/index_30.gif" width="24" height="61" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/index_31.gif" width="37" height="24" alt=""></td>
<td>
<img src="../images/index_32.gif" width="318" height="24" alt=""></td>
<td colspan="2">
<img src="../images/index_33.gif" width="11" height="24" alt=""></td>
<td colspan="5">
<img src="../images/index_34.gif" width="625" height="24" alt=""></td>
<td colspan="3">
<img src="../images/index_35.gif" width="7" height="24" alt=""></td>
<td colspan="2">
<img src="../images/index_36.gif" width="26" height="24" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/spacer.gif" width="37" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="318" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="8" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="122" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="126" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="127" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="127" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="123" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="2" height="1" alt=""></td>
<td>
<img src="../images/spacer.gif" width="24" height="1" alt=""></td>
</tr>
</table>
</div>


Index.template.php:

<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
// --></script>
<title>'
$context['page_title'], '</title>
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc1" />
<!-- ImageReady Preload Script (ew.psd) -->
<script type="text/javascript">
<!--

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
index_10_over = newImage("../images/index_10-over.gif");
index_11_over = newImage("../images/index_11-over.gif");
index_12_over = newImage("../images/index_12-over.gif");
index_13_over = newImage("../images/index_13-over.gif");
index_14_over = newImage("../images/index_14-over.gif");
preloadFlag = true;
}
}

// -->
</script>
<!-- End Preload Script -->
<style type="text/css">
<!--
.leftimg {
background-image: url(../images/index_18.gif);
background-repeat: no-repeat;
background-position: top;
font-family: "Monotype Corsiva", "Courier New";
font-size: 20px;
color: #FFFFFF;
padding-right: 10px;
padding-left: 10px;
background-color: #000000;
}
.contentholder {
padding-right: 5px;
padding-left: 5px;
}
.newscontent {
background-image: url(../images/watermark.gif);
background-repeat: no-repeat;
background-position: center center;
}
.newstitle {
background-image: url(../images/gradient.gif);
background-repeat: repeat-x;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #FFFFFF;
}
body {
background-color: #91916C;
}
-->
</style>
'
;

if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />
'
$context['html_headers'], '

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages();">'
;

include(
'header.php');

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '';

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
include('footer.php');
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 10, 2007, 03:00:47 AM
I took a glance at your index.template file, and you have the include in the wrong place.  It needs to be a separate function in the file, if you follow the tutorial the functions will look like this:


function template_site_above()
{
include("header.php");
}

function template_site_below()
{
include("footer.php");
}


Copy paste this in to your index.template.php file, and remove the other includes.  I also noticed that you included some <style> tags in to the index.template.php file--this is unnecessary, as is the way the headers are made.  In your header.php, there was not a doctype or anything like that.

Header.php is made by copying from the very first line(usually the <!DOCTYPE tag) all the way to the beginning of your actual content and pasting that in to the header.php file.  Footer.php is made from the end of the content to the end of the site's template.

Header = Beginning of doc => Beginning of content
Footer = End of content => End of doc

Since you are using a stylesheet and/or images, in the header and footer files you'll want to add a few ../ to make all the images or any other links work.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Dragooon on September 10, 2007, 06:23:04 AM
Nice one Daniel :D.
Helped me understand how SMF's template system works and how does this site works :P
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 10, 2007, 01:16:43 PM
Ok, so everything is setup, and the includes are fine.  Now my issue is fitting the forms into and not causing my template to flow out.  Any easy way to restrict it so it doesn't overflow and mess up the look.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 10, 2007, 05:00:46 PM
Are you referring to the profile section?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 10, 2007, 05:11:21 PM
No, just in general.  http://www.ksgrafix.com/EternalWisdom/smf/index.php
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 10, 2007, 05:26:36 PM
ooo I see.

Well, in looking at how your site is arranged right off the bat, I see way too many <img> tags and not enough CSS.  Whatever program you used--one of those tags said ImageReady--does not know how to slice things very well because it should be using CSS and background-image instead.  It might take some time to do, but it'll definitely pay off to convert all that stuff to CSS and using background-image.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 10, 2007, 06:02:46 PM
What do you mean by css to use background image, at that rate, ill have an individual css tag for so many images.  The site is basically built off a picture sliced up.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 10, 2007, 07:15:38 PM
Yeah, I noticed.  Most of those images could be combined using PS or even Paint, and reconstructed more efficiently.  But that's going all out over something pretty small--I'll look at your site some more and see if I can find something that would do the trick.

Can you post an updated version of index.template.php and your header/footer files?  I'm seeing things here that normally shouldn't be here =\
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 10, 2007, 08:07:00 PM
Ok.

Index

<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
// --></script>
<title>'
$context['page_title'], '</title>
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc1" />
'
;

if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />
'
$context['html_headers'], '

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages();">'
;


echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width:100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '';

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="90%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 90%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

function 
template_site_above()
{
include(
"header.php");
}

function 
template_site_below()
{
include(
"footer.php");
}

?>


Header

<script type="text/javascript">
<!--

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
index_10_over = newImage("../images/index_10-over.gif");
index_11_over = newImage("../images/index_11-over.gif");
index_12_over = newImage("../images/index_12-over.gif");
index_13_over = newImage("../images/index_13-over.gif");
index_14_over = newImage("../images/index_14-over.gif");
preloadFlag = true;
}
}

// -->
</script>
<!-- End Preload Script -->
<style type="text/css">
<!--
.leftimg {
background-image: url(../images/index_18.gif);
background-repeat: no-repeat;
background-position: top;
font-family: "Monotype Corsiva", "Courier New";
font-size: 20px;
color: #FFFFFF;
padding-right: 10px;
padding-left: 10px;
background-color: #000000;
}
.contentholder {
padding-right: 5px;
padding-left: 5px;
}
.newscontent {
background-image: url(../images/watermark.gif);
background-repeat: no-repeat;
background-position: center center;
}
.newstitle {
background-image: url(../images/gradient.gif);
background-repeat: repeat-x;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #FFFFFF;
}
body {
background-color: #91916C;
}
-->
</style>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages();">
<!-- ImageReady Slices (ew.psd) -->
<div align="center">
<table id="Table_01" width="1024" height="325" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="37">
<img src="../images/index_01.gif" width="37" height="140" alt=""></td>
  <td colspan="12">
<img src="../images/index_02.gif" width="963" height="140" alt=""></td>
<td width="24">
<img src="../images/index_03.gif" width="24" height="140" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/index_04.gif" width="37" height="9" alt=""></td>
<td colspan="12">
<img src="../images/index_05.gif" width="963" height="9" alt=""></td>
<td>
<img src="../images/index_06.gif" width="24" height="9" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/index_07.gif" width="37" height="32" alt=""></td>
<td width="318">
<img src="../images/index_08.gif" width="318" height="32" alt=""></td>
  <td width="8">
<img src="../images/index_09.gif" width="8" height="32" alt=""></td>
  <td colspan="2" width="125">
<a href="#"
onmouseover="changeImages('index_10', '../images/index_10-over.gif'); return true;"
onmouseout="changeImages('index_10', '../images/index_10.gif'); return true;"
onmousedown="changeImages('index_10', '../images/index_10-over.gif'); return true;"
onmouseup="changeImages('index_10', '../images/index_10-over.gif'); return true;">
<img name="index_10" src="../images/index_10.gif" width="125" height="32" border="0" alt=""></a></td>
<td width="126">
<a href="#"
onmouseover="changeImages('index_11', '../images/index_11-over.gif'); return true;"
onmouseout="changeImages('index_11', '../images/index_11.gif'); return true;"
onmousedown="changeImages('index_11', '../images/index_11-over.gif'); return true;"
onmouseup="changeImages('index_11', '../images/index_11-over.gif'); return true;">
<img name="index_11" src="../images/index_11.gif" width="126" height="32" border="0" alt=""></a></td>
  <td width="127">
<a href="#"
onmouseover="changeImages('index_12', '../images/index_12-over.gif'); return true;"
onmouseout="changeImages('index_12', '../images/index_12.gif'); return true;"
onmousedown="changeImages('index_12', '../images/index_12-over.gif'); return true;"
onmouseup="changeImages('index_12', '../images/index_12-over.gif'); return true;">
<img name="index_12" src="../images/index_12.gif" width="127" height="32" border="0" alt=""></a></td>
  <td width="127">
<a href="#"
onmouseover="changeImages('index_13', '../images/index_13-over.gif'); return true;"
onmouseout="changeImages('index_13', '../images/index_13.gif'); return true;"
onmousedown="changeImages('index_13', '../images/index_13-over.gif'); return true;"
onmouseup="changeImages('index_13', '../images/index_13-over.gif'); return true;">
<img name="index_13" src="../images/index_13.gif" width="127" height="32" border="0" alt=""></a></td>
  <td colspan="3">
<a href="#"
onmouseover="changeImages('index_14', '../images/index_14-over.gif'); return true;"
onmouseout="changeImages('index_14', '../images/index_14.gif'); return true;"
onmousedown="changeImages('index_14', '../images/index_14-over.gif'); return true;"
onmouseup="changeImages('index_14', '../images/index_14-over.gif'); return true;">
<img name="index_14" src="../images/index_14.gif" width="127" height="32" border="0" alt=""></a></td>
<td colspan="2">
<img src="../images/index_15.gif" width="5" height="32" alt=""></td>
<td>
<img src="../images/index_16.gif" width="24" height="32" alt=""></td>
</tr>
<tr>
<td rowspan="3" background="../images/index_17.gif">&nbsp;</td>
<td rowspan="3" class="leftimg">The fear of the Lord teaches a man wisdom, and humility comes before honor. <br>
    Prov 15:33</td>
<td colspan="2">
<img src="../images/index_19.gif" width="11" height="39" alt=""></td>
<td colspan="6">
<img src="../images/index_20.gif" width="626" height="39" alt=""></td>
<td colspan="3">
<img src="../images/index_21.gif" width="8" height="39" alt=""></td>
<td>
<img src="../images/index_22.gif" width="24" height="39" alt=""></td>
</tr>
<tr>
<td colspan="2" background="../images/index_23.gif">&nbsp;</td>
<td colspan="6" valign="top" bgcolor="#000000" class="contentholder"><table width="615" border="1" cellpadding="0" cellspacing="0" bordercolor="#CAC9B8">
          <tr>
            <td><p>


Footer

</p></td>
          </tr>
         
        </table>
    </td>
<td colspan="3" background="../images/index_25.gif">&nbsp;</td>
<td background="../images/index_26.gif">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<img src="../images/index_27.gif" width="11" height="61" alt=""></td>
<td colspan="6">
<img src="../images/index_28.gif" width="626" height="61" alt=""></td>
<td colspan="3">
<img src="../images/index_29.gif" width="8" height="61" alt=""></td>
<td>
<img src="../images/index_30.gif" width="24" height="61" alt=""></td>
</tr>
<tr>
  <td>
  <img src="../images/index_31.gif" width="37" height="24" alt=""></td>
<td>
  <img src="../images/index_32.gif" width="318" height="24" alt=""></td>
<td colspan="2">
  <img src="../images/index_33.gif" width="11" height="24" alt=""></td>
<td colspan="5">
  <img src="../images/index_34.gif" width="625" height="24" alt=""></td>
<td colspan="3">
  <img src="../images/index_35.gif" width="7" height="24" alt=""></td>
<td colspan="2">
  <img src="../images/index_36.gif" width="26" height="24" alt=""></td>
</tr>
<tr>
  <td>
  <img src="../images/spacer.gif" width="37" height="1" alt=""></td>
<td>
  <img src="../images/spacer.gif" width="318" height="1" alt=""></td>
<td>
  <img src="../images/spacer.gif" width="8" height="1" alt=""></td>
<td width="3">
  <img src="../images/spacer.gif" width="3" height="1" alt=""></td>
  <td width="122">
<img src="../images/spacer.gif" width="122" height="1" alt=""></td>
  <td>
<img src="../images/spacer.gif" width="126" height="1" alt=""></td>
<td>
  <img src="../images/spacer.gif" width="127" height="1" alt=""></td>
<td>
  <img src="../images/spacer.gif" width="127" height="1" alt=""></td>
<td width="123">
  <img src="../images/spacer.gif" width="123" height="1" alt=""></td>
  <td width="1">
<img src="../images/spacer.gif" width="1" height="1" alt=""></td>
  <td width="3">
<img src="../images/spacer.gif" width="3" height="1" alt=""></td>
  <td width="3">
<img src="../images/spacer.gif" width="3" height="1" alt=""></td>
  <td width="2">
<img src="../images/spacer.gif" width="2" height="1" alt=""></td>
  <td>
<img src="../images/spacer.gif" width="24" height="1" alt=""></td>
</tr>
</table>
</div>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 11, 2007, 12:22:16 AM
I've just spent a long time playing around with what you posted and some saved copies of your site, and I could never get it to display correctly no matter what I did.  In fact, I've never had this much trouble trying to get something to display right.  Unless it's something right under my nose, it's out of my league =\  The few tags I found that didn't make sense didn't help anything when I took them out.

Anybody else want to take a crack at it?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: kaeus on September 11, 2007, 12:31:07 AM
Its a problem with the smf forms really.  Its the width its making, and I'm not sure whats causing it.  Normally, forms are configured to be scaled, and my site isint really.  So that could be one issue, but then again, it should just scale inside the content box.  Ive got a test php that just loads the includes  (http://www.ksgrafix.com/EternalWisdom/smf/test.php) that shows it correctly.  So I'm assuming I need to find whats causing either the top or the actual form width to flow out so much.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Le Pong on September 12, 2007, 02:52:08 PM
Hi. So I made the header and footer, I uploaded the attached index.template, added the line to mysql in myphp, and this is what I'm getting.

www.site.com/forum (http://"http://www.dominofxstudios.com/index.JPG")

www.site.com/forum/test.php (http://"http://www.dominofxstudios.com/test.JPG")

I am also using smf 1.1.3. Not sure if that would make a difference.
And would I be able to use the same attached index.template, for any other template that I want to use?

Thanks.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Wal-Mart Security on September 12, 2007, 08:44:59 PM
Those images aren't very specific, to help you we'd need some more information such as the following:


Still waiting on some backup for kaeus btw ;)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Le Pong on September 13, 2007, 01:00:07 AM
I had a forum freshly installed. I copied the default theme.
Made a header and footer and uploaded them to the server. Also uploaded the index.template that Daniel attached. Then I added the lines to the mysql database. Then I made the test.php, and uploaded that.
And when I go to the forum index, I see the picture I linked in above post. And when I go to the test.php I see the other screenshot.
Here are the codes I'm using.

header.php
<h1 align="center">My really cool website</h1>
<div align="center"><a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a></div>
<hr />


footer.php
<hr />
&copy;2007 Your site


test.php
<?php
error_reporting
(E_ALL);

// Theme we're going to use
$ssi_theme 6;
// Layers we're going to use
$ssi_layers = array('site');
// Enable GZip compression (saves bandwidth)
$ssi_gzip true;

require(
'SSI.php');

echo 
'See? SMF is cool :)';

ssi_shutdown();
?>


index.template.php
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// Site layer - above template. Shown at the very top of the page, above the forum itself.
// See bottom of this function for an example of using your own, custom header at the top of the page.
function template_site_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;
// Put your header stuff here
// The following line loads the header.php file"
include('header.php');
}

// Site layer - below template. Shown at the very bottom of the page, below the forum
function template_site_below()
{
global $context$txt;

// Put your footer stuff here
// The following line loads the footer.php file:
include('footer.php');

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// The top of the forum
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

// The bottom of the forum
function template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


Hope that's all that's needed.

Thanks for any help.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Le Pong on September 19, 2007, 12:27:30 AM
Anyone else available to help me out? :( I'm dying here....
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: T.Linden on September 24, 2007, 11:40:58 AM
Le Pong, looks like you edited with Microsoft Word or something.

You need to work in pure text, Notepad, or something similar.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Le Pong on September 25, 2007, 04:03:58 PM
I did it in wordpad. Should I do it over in Notepad?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Rabain on September 30, 2007, 06:35:17 AM
What I want to be able to do is include the top part of the forum on every page of the site.  On the Default theme from the top of the forum down to (and including) the Home, Help, Search, Admin etc buttons.

As I understand it I should put this code in the Header?

Also I want to include the InfoCenter section at the bottom of every page.  I should include this code in the Footer?

If anyone can point me to the specific code elements I need to copy (from-to) I would be grateful!  Using the Default theme as reference.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Rabain on October 01, 2007, 09:02:13 AM
**bump**

So essentially something like THIS (http://forums.borderkingdoms.net/index.php?action=dlattach;topic=11.0;attach=1).

Is this possible?  I can usually work out things myself if I know where to start!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: yave20b on October 09, 2007, 02:39:56 PM
This article by Daniel15 was excellent.  I had no problem wrapping SMF into my webpages.  I did my header and footer, altered the index.template.php file, and fixed the CSS style sheet.  Everything works like a charm. 

But I have a multilanguage website and I wanted to be able to change the header and footer to Chinese versions as well.  My website is in Chinese and English.

I did the following:

1. For the Chinese version I just made a duplicate of my English version theme and put in my smf folder.

2. Created a Chinese version of my header and footer php files.

3. Changed the Chinese theme "index.template.php" to load the Chinese header and footer php files instead of the English header and footer php files.

4. Copied the "../smf/index.php" file, renamed it "index_cn.php" and installed it in the "../smf" folder so now I have an "index.php" and "index_cn.php" in my smf folder.

5. On the new "index_cn.php" file under "function smf_main()" changed "loadTheme()" to "loadTheme(5)";
theme=5 is my new Chinese version theme.

So now when someone clicks on the forums navigation link of my English webpages, it goes the "/smf/index.php" and loads my default English header and footer.  When they click on the forums navigation link of my Chinese webpages it goes to "/smf/index_cn.php" and loads the Chinese header and footer.

Seems to be working well. If anyone thinks it might cause a problem with the forum's function somewhere please let me know.  Haven't seen any problems pop up yet.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: 96lude on November 14, 2007, 05:07:01 PM
Hello, i am new to using this forum engine and have a situation here... I have a main website and a forum (smf) and have it to where it looks the same... *****But i am using a different subdomain for the forums, ex. forums.mysite.com and the main site is  www.mysite.com...(this is not actually my site, just an example)*****   so how am i able to share login, avatar, and cookies from site to site???

ive read through this tutorial, but i doesnt make it clear for me..  :(    can anyone please help point me in the right direction?

Thanks a million in advance!!!!!

Adam
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on November 15, 2007, 04:35:52 PM
You will need to:

require_once("pathtoSSI/SSI.php");

...at the top of the pages you are wanting to use the SMF "info".  Replace "pathtoSSI" with your actual path.

Then put:

global $context;

...above where you wish to insert the login, etc.

For example, if you are wanting to show the username, you would put this:

$context['user']['username']

...as the variable.

To see what variables are available to you on a given page, place this code on your page:

global $context;

print_r($context);


...Make sure you have "required"  SSI.php at the top of the page.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: 96lude on November 21, 2007, 09:30:29 PM
Thanks greatly,  i was having problems finding out the full path to the SSI.php file...  since its on a different subdomain i just had to call it with my header.php file  as  require_once('../SSI.php');   lol  and there is a setting everyone forgot to mention that makes all that work...  in the admin panel...Server Settings, and then Feature settings, the Use subdomain independent cookies
(turn off local cookies first!) setting must be checked for it to work...    but i finally figured it out...

Thanks again!!!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: fangweile on December 07, 2007, 12:50:37 AM
Could it be possible to include user information and avatar there?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on December 07, 2007, 03:16:27 PM
You can include many things there.  Put this code where you wish to show some extra things:

global $context;
print_r($context);


...and you will see the info available.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Miles Marshall on January 08, 2008, 01:13:28 PM
I followed this tutorial- and got this ending result of
http://www.simplemachines.org/community/index.php?topic=145838.0
http://support.geekinc.info/index.php can't figure out what I did wrong all I want is a freaking home page lol

I have the files, footer.php header.php and index.template that is from the attached and then i have a file called test.php can someone tell me what I did wrong
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Cynra on January 10, 2008, 04:22:58 PM
This post was very helpful in skinning the forums to match my site, however I seem to have run into an error.  It looked wonderful skinned, but every time I attempted to post a reply to any existing threads I received the following error:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/theregi/public_html/forums/Sources/Load.php(1726) : eval()'d code on line 807

I looked through the code and tried to figure out what could have caused the error, but I'm mostly a self-taught web designer (I make things look pretty?) and only casually deal with back-end things when they crop up.

For reference, I've upgraded to 1.1.4, but this error was apparant before the upgrade (when I noticed belatedly that I was running the older 1.1.2 version!).  All Add Ons were removed from the forums prior to changing anything in order to ensure that they wouldn't intefere with my efforts.  I used the original index.template.php provided in this thread and successfully changed my MySQL tables.  Any insight that people can provide would be very appreciated.  I'll be working on my own to figure it out, but I'm afraid that I may miss something due to my lack of experience.  Thank you for your time and patience!

Site: http://www.the-regiment.net/
Forums: http://www.the-regiment.net/forums/

The forums currently show the old silly skin I downloaded because I was too lazy to skin the site myself, however, I can throw up the error-prone one if needed (though the error only shows when you attempt to post things).
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: twe4ked on February 03, 2008, 06:20:46 AM
how can i undo the mysql change?

error: "Unable to load the 'site_above' template."

thanks
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: twe4ked on February 03, 2008, 05:56:30 PM
Quote from: twe4ked on February 03, 2008, 06:20:46 AM
how can i undo the mysql change?

error: "Unable to load the 'site_above' template."

thanks

I worked it out, thanks.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: uncleflip on February 15, 2008, 02:05:11 PM
Almost there.....

Daniel: if you're still out there, thanks very much for eliminating 90% of my headaches.  The tutorial rocks.

I've got layout working for the most part.  It just appears the board's CSS is over-riding my main site CSS.  Call me stoopid if this question reveals that I am, but is there an easy way to have the main site's CSS work outside the forum, but the forum's CSS work inside?  For the record, I;m using the blackandwhite theme.)

(I admit...right this red hot second I'm too tired and my brain too fried to go searching for the answer.  Besides, I have to be at work in an hour, and I'm not dressed yet, and still have to go to the post office.... )

Thanks for any assistance you may be able to provide!

Be well
-UF

callto://uncleflip
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on February 15, 2008, 02:46:58 PM
uncleflip,

Of course I do not know or can see you files folder layout, but I imagine your "outside the main site CSS" is not being properly called from the header.  I have got a feeling it is pointing to your SMF theme style.css file and not to the css file you are wanting.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: uncleflip on February 16, 2008, 07:09:00 PM
Quote from: spottedhog on February 15, 2008, 02:46:58 PM
uncleflip,
Of course I do not know or can see you files folder layout, but I imagine your "outside the main site CSS" is not being properly called from the header.  I have got a feeling it is pointing to your SMF theme style.css file and not to the css file you are wanting.

Err...I never said 'outside the main site'.  I did, however, mention the main site (outside the forum).

Now that it's clarified, I'm using two chief php files with the CSS:  header.php (in the main forum directory, as instructed), and the index.template.php (in the theme's folder, as instructed).  The header is calling my global site CSS file (pax.css), and the index.template is calling the theme's CSS file (style.css).   I suppose it's possible the CSS on the main site layer could be over-ridden by the CSS on the template layer, but ti doesn't seem that should be so.

I'm going to comb over the details again and see if I missed osmthing...but the CSS calls appear to be correct.

Be well
-UF

callto://uncleflip
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Jiveturkey on February 20, 2008, 12:26:06 PM
Has anyone done this using Joomla?  I tired following all of the steps but it gave me an error that said

Unable to load template
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: spottedhog on February 20, 2008, 03:13:47 PM
uncleflip....  Maybe one is overriding the other.  If a given page is getting style info from 2 sources, when there are 2 codes for the same thing, then the last one called will be what is used.

For example, let's say both have a CSS for the body tag.  Which ever is the last CSS file to be called should be the one that is displayed for the tag.

...or at least that is what I think my past experience has been... lol

To test it, try changing the names of the style elements in your pax.css file and of course make the corresponding changes in the header.php file.

T
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: violetamnesia on February 22, 2008, 05:39:02 AM
fixed
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: HHS2008 on February 25, 2008, 04:09:04 PM
im stuck .... im at the part where i have the header and footer.php files .... to point the files in the index.template.php file where should i upload the php files to the root forum directory or to the theme directory

also the db thing isnt working ...... when i got through .... this is what i got ....

Warning: template_site_above(http://myajrotc.com/forum/header.php) [function.template-site-above]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /homepages/20/d224410168/htdocs/HHSROTC/forum/Sources/Load.php(1773) : eval()'d code on line 176

Warning: template_site_above() [function.include]: Failed opening 'http://myajrotc.com/forum/header.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/20/d224410168/htdocs/HHSROTC/forum/Sources/Load.php(1773) : eval()'d code on line 176
See? SMF is cool :)
Copyright ©2008 MYAJROTC.com

Warning: template_site_below(http://myajrotc.com/forum/footer.php) [function.template-site-below]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /homepages/20/d224410168/htdocs/HHSROTC/forum/Sources/Load.php(1773) : eval()'d code on line 186

Warning: template_site_below() [function.include]: Failed opening 'http://myajrotc.com/forum/footer.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/20/d224410168/htdocs/HHSROTC/forum/Sources/Load.php(1773) : eval()'d code on line 186



or go to http://myajrotc.com/forum/test.php
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Xaneth on February 28, 2008, 09:50:49 PM
I've been using a theme I created that works great, and is mostly transparent, so any website I put behind it integrates well.  My header.php file uses an include statement to call a menu.php file that contains all the header info, that other pages in my site also include, so I can make changes in one place.  On all other pages, my nav bar image rollovers work fine, but not in the forum.  Any ideas why the rollover image doesn't work?  I've also added the code that is in my menu.php file, directly into header.php, and get the same effect, no rollover!

You can see what I'm talking about over at www.edgeoffate.com.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Xaneth on February 29, 2008, 01:19:26 AM
Just wanted to thank Simple Machines as well for building such a wonderful thing!  I look at the topic of this thread "Integrating the forum into our site..." and I just want to say that my band name just recently changed, and everything underwent massive reconstruction, it's even better now.  In my case, I redesigned the entire website and "Integrated my site into my forum..." more or less.  I wanted to maintain the same user base, same SSI I use throughout my site, etc.  Band is better, site is better, SMF is still rockin!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: HHS2008 on February 29, 2008, 08:26:09 AM
i solved the problem thanks!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: Xaneth on March 03, 2008, 01:38:23 AM
Solved mine too, just some bad coding on my part, got it cleaned up and all is well.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: EagleTrades on March 04, 2008, 11:45:47 PM
Hello,

Just a quick note about integration.  NOT FOR THE FAINT OF HEART!!  However, once you have done it, without giving yourself a stroke, and corrected your mistakes, it is definately worth the effort.  Although not actually finished yet, it gave me a pretty good feeling when I clicked on the URL for the forum and it actually showed up! 8)

So, back to finish the tweaks and twiddles.  I am sure I will need some more assistance as I go along.  But that all the frustration has been a learning experience the last couple of days.

I am sure that I am not only one who felt this good after integrating smf into a website.  However, I finally accomplished something my wife knows nothing about!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF's layer system
Post by: haktanir2 on March 26, 2008, 09:09:04 AM
I'm having a bit of difficulty with this.

I am using Joomla and I want to have the SMF forum look like it's part of it. So I would simply keep the top menu area and such. In this case I would have to make my SMF template look like my Joomla template.

If anyone has been successful in doing this, could you please let me know if I have to follow the same procedure as in the first post or if there is another way to do this?

Thanks a lot.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: JoeJoomla on April 27, 2008, 05:56:17 PM
Hello everyone, I've been trying to sort my way through the instructions from the first page on this thread. I'm starting with a Joomla! 1.5.3 install and modified Joomla! theme.

So far I haven't been successful, my header and footer are not showing up but I am not getting any errors either. On an earlier try I did get an error. So I want to go back to the beginning and try this again.

There are four potential areas where I could have a problem:

• My Joomla! header.php and footer.php files (and their location)

• The modified index.template.php file

• The SQL database addition

• The SMF Themes administration

I am certain that the location of my header and footer.php are good - they are in the root folder of the forum.

I know I have some problems with the header.php and footer.php file, but even when I simply use a 'This is the header' test file, I am not seeing it in the forum.

I am most suspicious of my work in the modified index.template.php

I am fairly sure that the database addition for the extra layers and the SMF themes administration to choose the new theme are OK.

So does it make sense to start by simply getting that 'This is the header' test working?

Was my starting with a modified 1.1.4 index.template.php a bad idea?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: GM08 on June 10, 2008, 08:53:02 PM
Hello Everyone!

Thanks for this tutorial. I'm currently trying to apply this to my forum.

I have a header with links on it that glow when you roll over them. I'm using a rollover script for this which is located in the head section of the html. Where would I put this function? (Since I'm only supposed to be copying parts of the <body> according to the tutorial)

Thanks!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: brycematthews on June 12, 2008, 05:28:07 PM
How can I get the updated index.template.php file? I don't see it anywhere for download. Does anyone have it?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on June 12, 2008, 07:05:08 PM
There is no update needed. Its a 1.1 file, which will work across all the 1.1.x versions.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: paziowiec on June 22, 2008, 06:44:21 AM
I've made an example site from this tutorial but there seems to be some problem.
http://09mm.pl/jez/forum/index.php
In IE this site works fine, as is should but in newest Opera 9.5 it seem it lost all table borders in the middle site section (the subforum list, info center, browsing post list, replying to post, etc)

I'd be glad if someone could come up with solution :)

ps. oh, and I don't know why but in opera the exterior (from footer/header) table border is black while it should be teal like in IE
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: danibee2k on June 23, 2008, 11:04:56 AM
Hi all, thanks so much for this tutorial plus everyone who's posted on this board as have managed to fix most of the problems I've had by reading through all the posts.  Not sure where to go to fix the problem I have at the moment though.

Please see http://www.greengymcompany.co.uk/forum (http://www.greengymcompany.co.uk/forum)

I'd like my Nav bar to sit within the SMF header bit (although personalised if poss).  Can't work out why it's put itself to the right of my header.  :o

Any suggestions would be greatly appreciated.  Let me know if you need me to paste any code.

Thanks
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: EliTe_ThuT on July 02, 2008, 11:25:56 AM
Would doing this cause problems when updating ?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Dragooon on July 02, 2008, 11:38:59 AM
Shouldn't unless you're using functions specific to that SMF version or major changes have happened(For example Most probably 1.1.x SSI layer's script won't work with SMF 2.0.x but thats just a guess).
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Crusufix on July 23, 2008, 07:48:05 AM
I'm having a strange problem when attempting to incorporate my SMF forum into my website. The index.template.php file doesn't seem to be pulling the includes...

My forum is here:
http://thelegendgrows.org/forums/

The code for the includes is:

                // ]]></script>

  <link rel="stylesheet" type="text/css" href="/style/style.css" />

  <link rel="stylesheet" type="text/css" href="/style/colour.css" />

  <link rel="icon" type="image/ico" href="/favicon.ico" />

</head>
</body>';
        // Put your header stuff here
        // The following line loads the header.php file
        include('header.php');

}


my header file is in the same directory as the index.template.php file and contains the following:

<?php

include '/includes/logo.inc';
include 
'/includes/topmenu.inc';

?>


    <div class="sidebar">

<?php

include '/includes/leftsidebar1.inc';
include 
'/includes/leftsidebar2.inc';
include 
'/includes/leftsidebar3.inc';

?>

    </div>

    <div id="content">

These includes only contain straight HTML for loading the Logo, top menu and the left side panel.

When I view the source code for the forum all I see is:

// ]]></script>

  <link rel="stylesheet" type="text/css" href="/style/style.css" />

  <link rel="stylesheet" type="text/css" href="/style/colour.css" />

  <link rel="icon" type="image/ico" href="/favicon.ico" />

</head>
</body>
<div class="tborder" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">


I've tried putting the individual includes into the index.template.php file in place of the 'include('header.php')', but it's made no difference.
If I place the direct HTML into the index.template.php file in place of the 'include('header.php') everything works, but this is not what I want.

It just seems that the index.template.php file is completely ignoring the include call.

<edit>
I changed the 'include' into a 'require' and apparently it's not finding header.php, despite it being right there.
If I change it from 'header.php' to '/home/<snipped>/www/forums/Themes/tlg/header.php' it then loads the header file.. though now it's got issues with finind the includes inside the header.php file... *sigh*

For some reason it won't take a relative path ....

Anyone have any suggestions?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Goldeagle on July 23, 2008, 02:26:16 PM
Hmm,

Im using smf version 1.1.5

Am I right in assuming that using the attached edited index.template.php file would not cause any problems ?

Or would I need to edit the index.template.php file of version 1.1.5 to accomplish this layers effect ?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Goldeagle on July 23, 2008, 04:09:21 PM
Well,

I certainly found out lol. Looking good I reckon. My Forum with a layer (http://www.hsnetwork.co.uk/community).

What do you reckon?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Owdy on July 24, 2008, 07:31:39 AM
Quote from: Goldeagle on July 23, 2008, 04:09:21 PM
Well,

I certainly found out lol. Looking good I reckon. My Forum with a layer (http://"http://www.hsnetwork.co.uk/community").

What do you reckon?
Your link is invalid. Please correct it.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Goldeagle on July 29, 2008, 07:09:30 PM
Quote from: Owdy on July 24, 2008, 07:31:39 AM
Your link is invalid. Please correct it.

My bad,

Link is now fixed.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Adan Enrique on August 02, 2008, 05:43:58 PM
How i can integrate a SMF forum with a Wordpress template easily?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: writerrobert680 on August 02, 2008, 09:53:51 PM
Quote from: Adan Enrique on August 02, 2008, 05:43:58 PM
How i can integrate a SMF forum with a Wordpress template easily?

Go to www.simplemachines.org and click on the customize link. Go to themes, and search for 'blog', and try to locate a 'blogger' type theme. That's very accurate.



I was able to succeed in converting my website template:

www.v3.robertcity.com

into the forum template:

www.robertcity.com/support

and into my blog:

www.robertcity.com/blog

WITHOUT the use of the header.php and footer.php, which didn't work. I had the .css command work, but I ended up editing the index.php file and style.css file.

BUT it took all afternoon to convert BOTH, whereas it would probably take about 10-15 minutes with the turorial, not saying that this tutorial was terrible, it was WONDERFUL!, but I wanted to point out the problem and the solution that I was able to create.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jackbrew on August 14, 2008, 09:15:02 PM
Thanks Daniel!

It took a couple of hours and some close reading (and re-reading), but I've got it up just the way I had imagined it.  See it at http://www.babyoopsbaby.com/forum/

thanks again!

rmg
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Wal-Mart Security on August 15, 2008, 09:23:06 PM
Can we sticky this topic?  I don't remember if it's been asked before, but this would definitely be a great one to stick.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: rodrico101 on September 15, 2008, 11:55:23 AM
QuoteSplit up index.template.php
Since we've created the new theme, the next step is to edit the index.template.php file. I've attached a base index.template.php file which you may use (save it into Themes/[your theme name]). This is SMF 1.1.1's index.template.php, except it has been split into two layers (site and main). The site_above sub-template contains everything from the very start of the page to the <body> tag. The site_below sub-template contains everything directly under the body. The main_above and main_below sub-templates contain the top (info box, menu, etc.) and bottom (copyright) of the actual forum.

OK...apparently almost everyone else can find this attached file , but me. 
I am running 1.1.6
Is there a tutorial of how to actually split up the index.template.php file?  I am not sure how to do that so I get the sub layers.  I have no problems with the other parts of the tutorial..the header/footer ad database steps.

Can anyone help?

Thanks,Rod
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: j3cubcapt on September 15, 2008, 11:41:36 PM

Daniel15, Do you do any work like this for pay? I would like to hire you to do this for me..

Will
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: rodrico101 on September 21, 2008, 10:36:46 AM
Anyone ???

Trying to modify the template, but do not see where it can be downloaded.  Anyone know how to divide it up?

Rod
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: j3cubcapt on September 29, 2008, 09:03:20 AM
Thanks to Daniel15 and everyone else for the great info here. I do have one question before I try this though.

Does the MySQL query only update the DB for the new created theme? I would like to know if I can switch between the current themes I have installed even after running this query. Sorry for such a stupid question, but I'm really not knowedgable of this...

-------------------------------------------------------------------------------------------------------------

"Database Modifications
There's one very vital thing we need to do now. We've added a new layer, but SMF doesn't yet know about this. So, if you go to your forum, it would look really bad (no header or footer). To tell SMF about the layers, we need to run a MySQL query in phpMyAdmin (if you don't know what phpMyAdmin is, take a look at the What is phpMyAdmin? topic). Open phpMyAdmin, go to the SQL tab, and enter this in:
Code: [Select]
REPLACE INTO smf_themes
   (ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'site,main');
This tells SMF that you want to use two layers: site, and then main. Replace smf_ with your database prefix (smf_ by default), and 4 with the theme's ID number (you found this when adding the theme - If you don't remember it, go to the admin panel, go to Themes and Layout --> Themes and Settings, click on the name of the theme, and look for the th= in the URL [eg. th=4]. This is the ID)."
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Lo0kBeHiNdU on September 29, 2008, 11:14:21 AM
Quote from: j3cubcapt on September 29, 2008, 09:03:20 AM
and look for the th= in the URL [eg. th=4]. This is the ID).

Each theme has it own ID. so if the theme you want to place the layer has and ID of "5" then place "5" in the query.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: j3cubcapt on September 29, 2008, 11:24:26 AM
Lo0kBeHiNdU, thanks for the reply!

OK, so I understand that this MySQL query only effects the theme that we are going to change correct? I just want to make sure that the query will not effect the other unmodified themes.

Thanks
Will
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: mattschwarz on September 29, 2008, 02:59:35 PM
Hey guys,

Maybe someone can tell me what I'm doing wrong. I got it working pretty well. If you look at my page in Firefox you can see the top of the forum is inside the page style just fine, but the rest is outside the content area (at least in Firefox, it works in IE). However in IE, where it is all inside the container, it's width is messed up, and the image bar is offset.

Here's the site: growinggreenfarm.com/forums

This is what my header.php look like:
<table cellpadding="0" cellspacing="0" id="main_table" align="center">
  <tr>
    <td id="main_bg_t">
<div id="main_bg_b">
<table cellspacing="0" cellpadding="0">
  <tr>
    <td id="header_top">
<div class="td column">
<div><a href="http://growinggreenfarm.com/index.html"><img src="http://growinggreenfarm.com/images/logo.jpg" alt=""></a></div>
</div>
<div class="td_1 column">
<div><img src="http://growinggreenfarm.com/images/home.gif" alt=""><a href="http://growinggreenfarm.com/index.html">Home</a><a href="http://growinggreenfarm.com/blog">Blog</a></div>
</div>
</td>
  </tr>
  <tr>
    <td id="header"><img src="http://growinggreenfarm.com/images/bg_head.jpg" width="691" height="284" border="0" usemap="#Map"></td>
  </tr>
  <tr>
    <td id="content">
     <table cellpadding="0" cellspacing="0" class="table_bg">
       <tr>
          <td class="tdd"><p></p>


And here's my footer.php:
     </td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td id="footer">Growing Green Farm &copy; 2008,  <a href="http://growinggreenfarm.com/index-7.html">Search</a></td>
  </tr>
</table>
     </div>
</td>
  </tr>
</table>

<map name="Map"><area shape="rect" coords="23,247,140,281" href="/index-1.html">
<area shape="rect" coords="141,248,232,280" href="/index-2.html">
<area shape="rect" coords="233,247,335,281" href="/index-3.html">
<area shape="rect" coords="335,247,451,280" href="/index-4.html">
<area shape="rect" coords="451,248,550,280" href="/index-5.html">
<area shape="rect" coords="550,248,666,280" href="/index-6.html">
</map>


Thanks!
matt
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: mattschwarz on October 01, 2008, 09:43:03 AM
bump

anything guys? this is for a client, I don't know where else to get better answers then you guys! :D
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Xaneth on October 12, 2008, 06:36:46 PM
I've used this guide to integrate my forum into my site successfully, but I've since upgraded from 1.1.x to 2.x, and I'm having trouble even starting from scratch.  The header.php and footer.php are not displaying.  Is there a newer guide for 2.x?  Or a way to update my 1.1.x theme to a 2.x theme?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Xaneth on October 13, 2008, 02:15:04 AM
Actually, now that I recall, I didn't use layers, I used the method found here:

http://www.simplemachines.org/community/index.php?topic=19638.0

I know that I've read that 2.x uses a different layer system than 'main', rather, 'html,body', but I'm not seeing any kind of documentation, or finding any threads on how to accomplish site integration with 2.x?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Xaneth on October 13, 2008, 01:02:05 PM
Not sure why I was having trouble, but got it sorted out using the method at:

http://www.simplemachines.org/community/index.php?topic=19638.0

Works great for fully integrating the forum into your website.  Pretty sure it was because I was using Firefox at home without the web developer tools, which disable cached settings like I have on my other computer :)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: happyfeet on November 08, 2008, 11:57:14 AM
First off, I found this tutorial to be very informational as I am just learning how to hack up SMF :)

This is probably the closest thread I have found for what I want to do, but I would like to achieve the opposite. I have SMF 1.1.7 + TP 0.98 and EQDKP for a Lotro kinship website. As stated in this tutorial, I would like to take the main_above and main_below areas for header and footer, and use them for my EQDKP board. So, the end goal would be to "nest" the EQDKP board into SMF.

I currently use an <iframe> tag to do this today, but I have found that the url links navigate outside of the <iframe>. For example, if I go to the TP article where the <iframe> is listed, the page displays fine. However, if I dive deeper into EQDKP, the pages display correctly, but any navigation urls take the user out of the <iframe> and back to the parent EQDKP site.

My goal was to use the header and footer of SMF and then when the url navigation to the home page of EQDKP are selected, the page still displays as nested in SMF.

Any ideas on how to accomplish this? Is there a better way?

Thanks in advance.
Title: SMF Layers and Joomla
Post by: drumsage on November 30, 2008, 01:09:20 PM
How do you use SMF Layers with Joomla?

A lot of people are asking for assistance with this, as am I, but to date I've found no one actually answering the question.

The question is how to slice up the Joomla code to place it in the header and footer files, as well as pulling over the CSS from Joomla.

I'm running Joomla and SMF on separate databases. I don't want to wrap the site using the Joomla wrapper (ie. <iframe>), and I'm not wanting to bridge Joomla and SMF, which I've done in the past. I want to keep the users in SMF and Joomla separate ... so using layers would be the best solution ... if I can get it to work.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Lo0kBeHiNdU on December 04, 2008, 04:06:47 AM
It works perfectly...

Except one thing...The header and footer don't show when  a user is guest..

Is this because guests don't have theme options?
And if yes i want the header  & footer to show to them.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: SNAFU0185 on December 07, 2008, 09:09:02 PM
has someone got and updated version of this for SMF 2.0 Beta or know where to find one ?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: SilentMoon on December 21, 2008, 04:43:53 PM
I have done this with a new board (1.1.7) , with the split  index.template.php provided at the beginning of this thread. I am setting up the board on a friends site so she can add articles without needing me to make new pages for each of them. I am new to php and smf.

Can someone tell me what the differences are between the 1.1.1 template and the 1.1.5 that is in the default theme? I couldn't find a change log that listed visual changes or options in the newer version of index.template.php or are there none visible? Has anyone split 1.1.5 as in this thread?

Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Audiobreeze on January 18, 2009, 01:33:57 PM
Great Job with this tutorial Daniel. I followed this guide with little knowledge on much of this seamlessly. I had a great deal of trouble displaying my website's header and footer properly, but this was a user error on my part. If anyone else is having a problem displaying the header/footer and is receiving an error such as: Fatal error: Call to undefined function bloginfo() in /home/press/public_html/forum/header.php on line 4, take a look at my thread where I solved my issue. http://www.simplemachines.org/community/index.php?topic=286616.0

Thanks for the guide. Btw, I followed the 'Cooler Way guide'.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: caio0800 on March 04, 2009, 01:18:12 PM
    
I could not do with the social engine
I could edit the tabs ect but I can not insert the header or footer for any help
I attach the mod to the forum edited
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: fangweile on March 20, 2009, 10:33:27 PM
How do i include the users avatar and this text

Hello user

Show unread posts since last visit.
Show new replies to your posts.
March 20, 2009, 10:29:53 PM

next to the menu.

Any idea

Thanks in advance
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on July 29, 2009, 08:45:24 PM
im on step one  website template. here is my code for my free site where do you think i start to separate  for header and footer?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<!--
/*
* Copyright 2009 ClanTemplates.com
* protek is a free template by Agressions and Wex at ClanTemplates.com
* No part of this file may be redistributed without written permission
* Design by Agressions - http://agressions.com
* Coded by Wex - http://esportsaid.com
*/
-->

<head>
   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
   <meta name="author" content="ClanTemplates" />
   <meta name="keywords" content="Clan" />
   <meta name="description" content="Enter a description about your clan here" />
   <meta name="robots" content="all" />
   <title>Protek e-sports- A ClanTemplates.com free default template</title>

   <style type="text/css" title="currentStyle" media="screen">
       @import "style/stylesheet.css";
   </style>
   <script type="text/javascript"><!--//--><![CDATA[//><!--
   /* sfHover Function */
      hover = function() {
         var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
         for (var i=0; i<sfEls.length; i++) {
            sfEls.onmouseover=function() {
               this.className+=" hover";
            }
            sfEls.onmouseout=function() {
               this.className=this.className.replace(new RegExp(" hover\\b"), "");
            }
         }
      }
      if (window.attachEvent) window.attachEvent("onload", hover);
   //--><!]]></script>
   <!--link rel="Shortcut Icon" type="image/x-icon" href="images/favicon.ico" /-->   
</head>
<body>

<div id="container">

   <div id="page-header">
      <div class="headerbar">
         <form method="post" action="">
            <fieldset id="forumlogin">
               <legend><span>Forum Login</span></legend>
               <label for="login">Login</label>
                  <input type="text" name="login" id="login" class="loginbox" value="username" />
               <label for="password">Password</label>
                  <input type="password" name="password" id="password" class="loginbox" value="password" />
               <input type="submit" value="Login" id="submit-login" title="login"/>
               <a href="#" class="register" title="Register">Register</a>
               <a href="#" class="help" title="Help">Help</a>
            </fieldset>
         </form>
      </div>
   </div>
   
   <div id="wrapper">
      <div id="banner">
         <span class="corners-top"><span></span></span>
         <h1 id="logo"><a href="#" title="Protek e-sports">Protek</a></h1>
         <span class="corners-bottom"><span></span></span>
      </div>
      <ul id="navigation">
         <li class="btn-homepage"><a href="#" title="Homepage">Homepage</a></li>
         <li class="btn-clannavigation">
            <a href="#" title="Clan Navigation">Clan Navigation</a>
            <ul class="dropdown">
               <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
               <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
               <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
               <li><a href="#" title="Developer Site">Developer Site</a></li>
            </ul>            
         </li>
         <li class="btn-communitynavigation">
            <a href="#" title="Community Navigation">Community Navigation</a>
            <ul class="dropdown">
               <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
               <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
               <li>
                  <a href="#" title="Crysis Downloads">Crysis Downloads</a>
                  <ul class="horizontal-dropdown">
                     <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
                     <li>
                        <a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a>
                        <ul class="horizontal-dropdown">
                           <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
                           <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
                           <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
                           <li><a href="#" title="Developer Site">Developer Site</a></li>
                        </ul>
                     </li>
                     <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
                     <li><a href="#" title="Developer Site">Developer Site</a></li>
                  </ul>
               </li>
               <li><a href="#" title="Developer Site">Developer Site</a></li>
            </ul>
         </li>
         <li class="btn-community"><a href="#" title="Community">Community</a></li>
         <li class="btn-infotainment"><a href="#" title="Infotainment">Infotainment</a></li>
         <li class="btn-sponsors"><a href="#" title="Sponsors">Sponsors</a></li>
         <li class="btn-contact"><a href="#" title="Contact">Contact</a></li>
      </ul>
      <div id="main">
         <div id="content">
         <div class="article">
               <h4 class="headline"><a href="blank/tutorial/index.html" title="Tutorial Included for Blank Images">Tutorial Included for Blank Images</a></h4>
               <span class="author">posted by <a href="http://forums.clantemplates.com/member.php?u=233310" title="View User Profile">Wex</a></span>
               <span class="postdate" title="May 28, 2009">May <em>28</em></span>
               <img src="blank/tutorial/images/step1.gif" class="story-image" alt="Call of Duty 2" />         
               <div class="story">
                  <p>If you would like to change the navigation, the sidebar block titles, the banner, or the logo, you can now find out how by going into the <strong>Blank</strong> folder provided, and then opening the <em>index.html</em> file in the inner <strong>Tutorial</strong> folder.</p>
                  <p><a href="blank/tutorial/index.html" title="Read the Tutorial">Click here to read the tutorial.</p>
               </div>
               <ul class="more">
                  <li class="first"><a href="blank/tutorial/index.html" title="Read the full article">read full article</a></li>
               </ul>
            </div>
            <div class="article">
               <h4 class="headline"><a href="http://www.clantemplates.com/" title="Introduction">Introduction</a></h4>
               <span class="author">posted by <a href="http://www.clantemplates.com/" title="Visit ClanTemplates">ClanTemplates</a></span>
               <span class="postdate" title="May 1, 2009">May <em>1</em></span>
               <img src="images/articles/story_image.jpg" class="story-image" alt="Call of Duty 2" />         
               <div class="story">
                  <p>Thank you for downloading this free template release from <a href="http://www.clantemplates.com/" title="Free Clan Gaming Templates">ClanTemplates</a> if you have any questions, these paragraphs should address them or point you to where they can be addressed.</p>
                  
                  <p>There are a few terms-of-use rules you need to follow if you want to use this or any ClanTemplates template but they are simple to follow. The first is that you <strong>must</strong> keep a link back to ClanTemplates either using a Lead Sponsor image or an affiliate link (depending on your template). This must be a hyperlink and must include the ClanTemplates 'C' logo. The second is that you <strong>must</strong> include any copyright footer in the template that tells you who designed and coded the template. This image (and/or text) should also link to ClanTemplates and must not be edited.</p>
                  
                  <p>If you wish to add your own sponsors you are permitted to remove the designer and coder sponsors.</p>
                  
                  <h2>Editing your template</h2>
                  
                  <p>All templates released at Clantemplates are coded in <acronym title="HyperText Markup Language">html</acronym>/<acronym title="eXtensible HyperText Markup Language">xhtml</acronym> &amp; <acronym title="Cascading StyleSheets">css</acronym> so that even the most inexperienced individual can understand and edit the template. If you have either Frontpage or Dreamweaver at your disposal these would be recommended for you to easily edit and manage the code of your new website template. Below are 3 video tutorials that explain different aspects of how to use a template downloaded from Clantemplates.
                  
                  <ul>
                     <li><a href="http://www.clantemplates.com/video/How_to_DL_and_Edit/How_to_DL_and_Edit.html" title="Video tutorial on editing your template">How to Download &amp; Edit Your Template</a></li>
                     <li><a href="http://www.clantemplates.com/video/CT_How_to_Make_a_New_Page/CT_How_to_Make_a_New_Page.html" title="Video tutorial on editing your template">How to make a new page for the template</a></li>
                     <li><a href="http://www.clantemplates.com/video/CT_How_to_Upload/CT_How_to_Upload.html" title="Video tutorial on editing your template">How to upload your template to a server</a></li>
                  </ul>
                  
                  <p>All templates released at Clantemplates should include blank banner images for you to add your own clan's name to in order to personalize the template. Such images are generally included in the images folder which was in the zip file you downloaded and are normally denoted by the word <kbd>blank</kbd> in the filename. They may also be in a seperate folder called <kbd>blank</kbd>. Other blank images for various parts of a template, may be included in the folder, depending on the template you've downloaded. If there are no suitable blank images please ask in the <a href="http://forums.clantemplates.com/forumdisplay.php?f=9" title="Help Booth">Help Booth</a>.</p>
                  
                  
                  <h2>Troubleshooting</h2>
                  
                  <p>Here are some common errors taken when uploading your template:</p>
                  
                  <h3>It's all messed up - no images or colours are shown!</h3>
                  <p>Make sure you upload EVERYTHING in your download folder. This includes the images and any .css or .js files.</p>
                  
                  <h3>None of the images are shown!</h3>
                  <p>Have you uploaded all your images in the "images" folder they were in? Don't rename the folder, and make sure all images are in that folder exactly as they are on your PC.</p>
                  
                  
                  <h2>Getting Help</h2>
                  
                  <p>Any questions that the video tutorials just didn't cover? Well the best place to get the kind of answers you need is to use that template you've downloaded is to submit your question for the Support Staff in the Clantemplates <a href="http://forums.clantemplates.com/forumdisplay.php?f=9" title="Help Booth">Help Booth</a>. Make sure you include the <em>name</em> of the template you downloaded and the <em>category (game)</em> it was in. If things aren't displaying correctly include the <em>name of the web browser</em> you're using (e.g. Internet Explorer 8, Firefox 3). Any question you may have regarding a template they will be able to answer for you.</p>
                  

               </div>
               <ul class="more">
                  <li class="first"><a href="#" title="Read the full article">read full article</a></li>
                  <li><a href="#" title="View comments">comments (<strong>1337</strong>)</a></li>
                  <li><a href="#" title="Add a comment">write comment</a></li>
               </ul>
            </div>
            <div class="article">
               <h4 class="headline"><a href="http://www.clantemplates.com/" title="Protek Template Released!">Protek Template Released!</a></h4>
               <span class="author">posted by <a href="http://www.clantemplates.com/" title="Visit ClanTemplates">ClanTemplates</a></span>
               <span class="postdate" title="May 1, 2009">May <em>1</em></span>
               <img src="images/articles/story_image.jpg" class="story-image" alt="Call of Duty 2" />         
               <div class="story">
                  <p>Protek, a <a href="http://www.clantemplates.com/free_templates/1/21" title="View other default gaming templates">default gaming template</a>, was released today at <a href="http://www.clantemplates.com/" title="Visit ClanTemplates">ClanTemplates</a>. The template, designed by <a href="http://forums.clantemplates.com/member.php?u=16196" title="View Agressions profile">Agressions</a> and coded by <a href="http://forums.clantemplates.com/member.php?u=233310" title="View Wexy's profile">Wexy</a>, is rumered to become the most popular template on ClanTemplates. This free template is coded to the highest web standards, and includes many features for its users, including:</p>
                  <ul>
                     <li><strong>W3C Valid XHTML 1.0 Strict Table-less CSS markup under SEO Semantic Coding</strong>
                        <ul>
                           <li>Commented code is easy to edit and modify, or to integrate into a CMS</li>
                           <li>Loads quickly</li>
                           <li>Small page size</li>
                           <li>Cross Browser compatibility for all major browsers (IE6+, Firefox, Opera and Safari)</li>
                        </ul>
                     </li>
                     <li><strong>CSS and Javascript rollovers</strong>
                        <ul>
                           <li>Customizable roster</li>
                           <li>Dropdown Menus with up to three levels</li>
                        </ul>
                     </li>
                  </ul>
                  <p class="center"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a></p>
               </div>
               <ul class="more">
                  <li class="first"><a href="#" title="Read the full article">read full article</a></li>
                  <li><a href="#" title="View comments">comments (<strong>1337</strong>)</a></li>
                  <li><a href="#" title="Add a comment">write comment</a></li>
               </ul>
            </div>
            <div class="article">
               <h4 class="headline"><a href="#" title="Call of Duty 2 team reincarnated">Call of Duty 2 team reincarnated</a></h4>
               <span class="author">posted by <a href="#" title="View User Profile">Agressions!</a></span>
               <span class="postdate" title="April 1, 2009">April <em>01</em></span>
               <img src="images/articles/story_image.jpg" class="story-image" alt="Call of Duty 2" />         
               <div class="story">
                  <p><strong>Lorem</strong> ipsum dolor sit amet, consectetuer adipiscing elit. Etiam suscipit metus sit amet mauris. Aenean diam augue, volutpat et, tempus ac, ultrices non, quam. Vestibulum nec urna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec neque lectus, blandit eu, molestie eget, sollicitudin et, velit. <a href="#" title="This is a link">Proin posuere orci eu libero.</a> Suspendisse accumsan, est ut venenatis posuere, magna sapien mollis arcu, sodales tristique lorem diam id purus. Etiam sollicitudin diam vitae nisi. Cras nisl erat, egestas nec, ultricies non, luctus et, nulla. <em>&ldquo;Morbi lectus justo, porttitor non, tempus a, vulputate at, quam. Duis ac lectus. Duis suscipit imperdiet ante&rdquo;</em>.</p>
                  <p>Sed lobortis, diam vehicula gravida cursus, turpis erat commodo purus, vitae luctus nisi urna quis velit. Quisque faucibus. Aenean hendrerit mi facilisis orci. Etiam augue pede, viverra sed, mollis ut, porta non, eros. Ut leo lorem, consectetuer non, lobortis eget, nonummy at, dolor. Vestibulum enim massa, ultrices consequat, fermentum cursus, gravida sed, purus. In hac habitasse platea dictumst. Curabitur sit amet sapien in sapien varius lobortis. Integer sit amet lorem. Integer vitae erat commodo felis laoreet feugiat.</p>
               </div>
               <ul class="more">
                  <li class="first"><a href="#" title="Read the full article">read full article</a></li>
                  <li><a href="#" title="View comments">comments (<strong>1337</strong>)</a></li>
                  <li><a href="#" title="Add a comment">write comment</a></li>
               </ul>
            </div>
            <div class="article">
               <h4 class="headline"><a href="#" title="Call of Duty 2 team reincarnated">Call of Duty 2 team reincarnated</a></h4>
               <span class="author">posted by <a href="#" title="View User Profile">Agressions!</a></span>
               <span class="postdate" title="April 1, 2009">April <em>01</em></span>
               <img src="images/articles/story_image.jpg" class="story-image" alt="Call of Duty 2" />         
               <div class="story">
                  <p><strong>Lorem</strong> ipsum dolor sit amet, consectetuer adipiscing elit. Etiam suscipit metus sit amet mauris. Aenean diam augue, volutpat et, tempus ac, ultrices non, quam. Vestibulum nec urna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec neque lectus, blandit eu, molestie eget, sollicitudin et, velit. <a href="#" title="This is a link">Proin posuere orci eu libero.</a> Suspendisse accumsan, est ut venenatis posuere, magna sapien mollis arcu, sodales tristique lorem diam id purus. Etiam sollicitudin diam vitae nisi. Cras nisl erat, egestas nec, ultricies non, luctus et, nulla. <em>&ldquo;Morbi lectus justo, porttitor non, tempus a, vulputate at, quam. Duis ac lectus. Duis suscipit imperdiet ante&rdquo;</em>.</p>
                  <p>Sed lobortis, diam vehicula gravida cursus, turpis erat commodo purus, vitae luctus nisi urna quis velit. Quisque faucibus. Aenean hendrerit mi facilisis orci. Etiam augue pede, viverra sed, mollis ut, porta non, eros. Ut leo lorem, consectetuer non, lobortis eget, nonummy at, dolor. Vestibulum enim massa, ultrices consequat, fermentum cursus, gravida sed, purus. In hac habitasse platea dictumst. Curabitur sit amet sapien in sapien varius lobortis. Integer sit amet lorem. Integer vitae erat commodo felis laoreet feugiat.</p>
               </div>
               <ul class="more">
                  <li class="first"><a href="#" title="Read the full article">read full article</a></li>
                  <li><a href="#" title="View comments">comments (<strong>1337</strong>)</a></li>
                  <li><a href="#" title="Add a comment">write comment</a></li>
               </ul>
            </div>
         </div>
         <div id="left-sidebar">
            <div class="block clan-roster">
               <h3 class="block-title"><span>Clan Roster</span></h3>
               <ul class="roster">
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
                  <li><a href="#" title="Username" onmouseover="ctRoster('protek', 'Agressions');" onmouseout="ctRosterClean();"><img src="images/users/user.jpg" alt="Username" /></a></li>
               </ul>
               <div id="user-name"><span id="namebox">Hover over a member</span></div>
            </div>
            <div class="block recent-threads">
               <h3 class="block-title"><span>Recent Forum Threads</span></h3>
               <ul class="list-threads">
                  <li><a href="#" title="View Latest Post"><strong>New template by Agressions</strong><em>Category: Website news</em></a></li>
                  <li><a href="#" title="View Latest Post"><strong>New template by Agressions</strong><em>Category: Website news</em></a></li>
                  <li><a href="#" title="View Latest Post"><strong>New template by Agressions</strong><em>Category: Website news</em></a></li>
                  <li><a href="#" title="View Latest Post"><strong>New template by Agressions</strong><em>Category: Website news</em></a></li>
                  <li><a href="#" title="View Latest Post"><strong>New template by Agressions</strong><em>Category: Website news</em></a></li>
               </ul>
               <div class="showallnews"><a href="#" title="View all news">Show me all news</a></div>
            </div>
            <div class="block recent-matches">
               <h3 class="block-title"><span>Recent Matches</span></h3>
               <ul class="list-matches">
                  <li class="loss game-cod2"><a href="#" class="game-thumb" title="View this match"><span><strong>~protek. vs 'Immortal.</strong> <dfn>Loss</dfn> <em>09-31 (Dawnville/Burgundy)</em></span></a></li>
                  <li class="win game-cod4"><a href="#" class="game-thumb" title="View this match"><span><strong>~protek. vs dignitas</strong> <dfn>Win</dfn> <em>22-18 (Crash/Crossfire)</em></span></a></li>
                  <li class="loss game-cod2"><a href="#" class="game-thumb" title="View this match"><span><strong>~protek. vs pandemic</strong> <dfn>Loss</dfn> <em>17-23 (Toujane/Burgundy)</em></span></a></li>
                  <li class="loss game-crysis"><a href="#" class="game-thumb" title="View this match"><span><strong>~protek. vs 'Immortal.</strong> <dfn>Loss</dfn> <em>09-31 (Outpost/Coast) T.I.A.</em></span></a></li>
                  <li class="win game-cod4"><a href="#" class="game-thumb" title="View this match"><span><strong>~protek. vs complexity</strong> <dfn>Win</dfn> <em>30-10 (Crash/Backlot)</em></span></a></li>
               </ul>
               <div class="showallmatches"><a href="#" title="View all matches">Show me all matches</a></div>
            </div>
         </div>
         <div id="right-sidebar">
            <div class="block head-sponsor">
               <h3 class="block-title"><span>Head Sponsor</span></h3>
               <div class="sponsor-image"><a href="#" title="ClanTemplates.com"><img src="images/sponsors/clantemplates.png" alt="ClanTemplates.com" /></a></div>
            </div>
            <div class="block main-sponsors">
               <h3 class="block-title"><span>Main Sponsors</span></h3>
               <div class="sponsor-image"><a href="http://www.agressions.com/" title="Lets Browse"><img src="images/sponsors/letsbrowse.png" alt="Lets Browse" /></a></div>
               <div class="sponsor-image"><a href="http://www.esportsaid.com/" title="eSportsAid"><img src="images/sponsors/esportsaid.png" alt="eSportsAid" /></a></div>
               <div class="sponsor-image"><a href="#" title="Monster"><img src="images/sponsors/monster.png" alt="Monster" /></a></div>
               <div class="sponsor-image"><a href="#" title="X-Fire"><img src="images/sponsors/xfire.png" alt="X-Fire" /></a></div>
            </div>
            <div class="block weekly-poll">
               <h3 class="block-title"><span>Weekly Poll</span></h3>
               <div class="poll">
                  <p>What do you think about the new site?</p>
                  <form method="post" action="">
                     <fieldset class="poll-options">
                        <dl>
                           <dt><label for="vote_1">I absolutely love it!</label></dt>
                           <dd><input type="radio" name="vote_id[]" id="vote_1" value="1" /></dd>
                        </dl>
                        <dl>
                           <dt><label for="vote_2">Looks good!</label></dt>
                           <dd><input type="radio" name="vote_id[]" id="vote_2" value="2" /></dd>
                        </dl>
                        <dl>
                           <dt><label for="vote_3">Meh, not the best...</label></dt>
                           <dd><input type="radio" name="vote_id[]" id="vote_3" value="3" /></dd>
                        </dl>
                        <dl>
                           <dt><label for="vote_4">You could do a lot better.</label></dt>
                           <dd><input type="radio" name="vote_id[]" id="vote_4" value="4" /></dd>
                        </dl>
                        <dl>
                           <dt><label for="vote_5">No way, this is horrible!</label></dt>
                           <dd><input type="radio" name="vote_id[]" id="vote_5" value="5" /></dd>
                        </dl>
                     </fieldset>
                     <fieldset class="submit-buttons">
                        <input type="submit" class="entervote" value="Enter Vote" title="Enter Vote" /> <a href="#" class="viewresults" title="View Results">View Results</a>
                     </fieldset>
                  </form>
               </div>
            </div>
         </div>
         <div id="footer">
            <div class="copyright">
               <a href="http://www.agressions.com/" class="copyright-designed" title="Design by Agressions">Design by Agressions</a>
               <a href="http://www.esportsaid.com/" class="copyright-coding"  title="Coding by eSportsAid">Coding by eSportsAid</a>
               <a href="http://www.clantemplates.com/" class="copyright-ct"  title="ClanTemplates.com - Providing you free Clan Gaming Templates">ClanTemplates.com</a>
               <p>Copyright 2009 protek.gaming!</p>
               <p>&copy; All Rights Reserved</p>
            </div>
         </div>
      </div>
   </div>
   
</div>

<script type="text/javascript" src="scripts/iepngfix_tilebg.js"></script>
<script type="text/javascript" src="scripts/roster.js"></script>

</body>
</html>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on July 31, 2009, 06:42:39 PM
Any one please help!!!! ;) O:)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on August 12, 2009, 08:58:49 PM
is there any one out there ............... helllooooooo >:( >:( >:( >:( >:( >:( >:( >:( >:(
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on August 19, 2009, 08:51:46 PM
I got every thing separated here is my header:


<div id="container">

   <div id="page-header">
      <div class="headerbar">
         <form method="post" action="">
            <fieldset id="forumlogin">
               <legend><span>Forum Login</span></legend>
               <label for="login">Login</label>
                  <input type="text" name="login" id="login" class="loginbox" value="username" />
               <label for="password">Password</label>
                  <input type="password" name="password" id="password" class="loginbox" value="password" />
               <input type="submit" value="Login" id="submit-login" title="login"/>
               <a href="#" class="register" title="Register">Register</a>
               <a href="#" class="help" title="Help">Help</a>
            </fieldset>
         </form>
      </div>
   </div>
   
   <div id="wrapper">
      <div id="banner">
         <span class="corners-top"><span></span></span>
         <h1 id="logo"><a href="#" title="Protek e-sports">Protek</a></h1>
         <span class="corners-bottom"><span></span></span>
      </div>
      <ul id="navigation">
         <li class="btn-homepage"><a href="#" title="Homepage">Homepage</a></li>
         <li class="btn-clannavigation">
            <a href="#" title="Clan Navigation">Clan Navigation</a>
            <ul class="dropdown">
               <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
               <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
               <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
               <li><a href="#" title="Developer Site">Developer Site</a></li>
            </ul>            
         </li>
         <li class="btn-communitynavigation">
            <a href="#" title="Community Navigation">Community Navigation</a>
            <ul class="dropdown">
               <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
               <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
               <li>
                  <a href="#" title="Crysis Downloads">Crysis Downloads</a>
                  <ul class="horizontal-dropdown">
                     <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
                     <li>
                        <a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a>
                        <ul class="horizontal-dropdown">
                           <li class="first"><a href="#" title="Call of Duty 2 Downloads">Call of Duty 2 Downloads</a></li>
                           <li><a href="#" title="Call of Duty 4 Downloads">Call of Duty 4 Downloads</a></li>
                           <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
                           <li><a href="#" title="Developer Site">Developer Site</a></li>
                        </ul>
                     </li>
                     <li><a href="#" title="Crysis Downloads">Crysis Downloads</a></li>
                     <li><a href="#" title="Developer Site">Developer Site</a></li>
                  </ul>
               </li>
               <li><a href="#" title="Developer Site">Developer Site</a></li>
            </ul>
         </li>
         <li class="btn-community"><a href="#" title="Community">Community</a></li>
         <li class="btn-infotainment"><a href="#" title="Infotainment">Infotainment</a></li>
         <li class="btn-sponsors"><a href="#" title="Sponsors">Sponsors</a></li>
         <li class="btn-contact"><a href="#" title="Contact">Contact</a></li>
      </ul>


here is my footer:

<div id="footer">
            <div class="copyright">
               <a href="http://www.agressions.com/" class="copyright-designed" title="Design by Agressions">Design by Agressions</a>
               <a href="http://www.esportsaid.com/" class="copyright-coding"  title="Coding by eSportsAid">Coding by eSportsAid</a>
               <a href="http://www.clantemplates.com/" class="copyright-ct"  title="ClanTemplates.com - Providing you free Clan Gaming Templates">ClanTemplates.com</a>
               <p>Copyright 2009 protek.gaming!</p>
               <p>&copy; All Rights Reserved</p>
            </div>
         </div>
      </div>
   </div>
   
</div>

<script type="text/javascript" src="scripts/iepngfix_tilebg.js"></script>
<script type="text/javascript" src="scripts/roster.js"></script>


what i need is a Split up index.template.php just like in the tut. the one on the tut is for 1.1 i need one for 2.0rc1 can anyone help please??????? O:) O:) O:) :'( :'( :'(
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on August 27, 2009, 06:55:52 PM
i guess this forum post is out of date and no one gets on it so it should be deleted.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 28, 2009, 11:21:02 AM
Why should it be deleted if it still works with SMF 1.1.x ? SMF 2 is a totally different animal. It would need a different topic for this. You should open your own topic in the 2.0 boards and see if anyone can help.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: TheDragon on September 22, 2009, 07:31:56 AM
suggestion = can someone edit (check) the original post here
so we do not have to read (cipher) 200 replies looking for errors/corrections/updates etc
for new installs of SMF
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: legna on September 25, 2009, 12:05:20 PM
attachedsinglemommy.com/forum/index.php

I have NO idea what I am doing wrong. I want the whole board where the header is showing.....
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: ShinyRayquaza on October 11, 2009, 02:49:52 PM
Could someone tell me how i can split up other index.template.php files from other themes?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Garou on October 11, 2009, 11:07:11 PM
legna, if your saying you don't want the header to display you might want to use or take a look at the remove forum header (http://custom.simplemachines.org/mods/index.php?mod=1716) mod to see how its done. that will at least tell you what code to look for and remove.

ShinyRayquaza, its pretty much done the same way described in the first post here. Almost every theme uses the same code between main_above and main_below as its needed to make the forum work as expected. All customization is in main_above and main_below as well as various css files, most of which is done in the style.css. That's the file that alters most of the color scheme though occasionally changes to other css files are needed, main_above and main_below just handles how the header and footers look as well as the occasional built in side bar. Unless your looking to take a specific feature from someone's theme, ripping theirs apart isn't going to help you very much.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: jokesa157 on October 15, 2009, 11:24:17 PM
im using 1.1.10 now so how can i do it?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on October 16, 2009, 11:19:56 AM
It's exactly the same throughout the SMF 1.1.x versions.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Daniel15 on October 20, 2009, 08:25:03 AM
Quote from: SNAFU0185 on December 07, 2008, 09:09:02 PM
has someone got and updated version of this for SMF 2.0 Beta or know where to find one ?
I had a draft posted in the SMF Team boards, but since I'm not a team member any more I'm unable to access it :P
Perhaps someone could grab my draft from there, I'll have to see what I can do.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: franklos on November 16, 2009, 09:12:45 AM
Hi,

Where s that index.template.php attachement?

Thanks, Frank.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on November 16, 2009, 09:37:34 AM
In the first post of the topic.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Xylar2 on November 18, 2009, 11:03:34 AM
Quote from: Daniel15 on October 20, 2009, 08:25:03 AM
Quote from: SNAFU0185 on December 07, 2008, 09:09:02 PM
has someone got and updated version of this for SMF 2.0 Beta or know where to find one ?
I had a draft posted in the SMF Team boards, but since I'm not a team member any more I'm unable to access it :P
Perhaps someone could grab my draft from there, I'll have to see what I can do.
This is a good Idea.

Edit: I managed to get it to work on my SMF 2.0 RC2! I will add a new post with the index.template.php and the new MySQL query.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Xylar2 on November 19, 2009, 11:35:04 AM
This is for the default "Curve" theme, NOT core theme.

Pretty much follow the same tutorial on the first post, just use the attached index.template.php and the following MySQL query instead of the tutorial's.
REPLACE INTO smf_themes
(ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'html,site,body');

Make sure you edit the theme id!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: uksurvivalshop on December 06, 2009, 09:09:00 AM
Firstly, thanks very much Daniel15, after spending loads of time searching the forum this guide got me up and running very quickly.

My forum is at hxxp://www.uksurvivalshop.co.uk/shopforum/index.php and I've managed to get the forum to display inside my site's header and footer. Now I'd like the forum to match the width of the sites header and footer with the same black background. I've tried searching the forum and used many of the suggestions for width control but it seems they don't work as I expected now I've done the mods required in this post. Can anyone please point me in the right direction? Thanks in advance

Header
<div id="wrapper">
<div id="menu">
<ul>
<li><a href="../index.php">Home</a></li>
<li><a href="#">Hints & Tips</a></li>
<li><a href="#">Reviews</a></li>
<li><a href="https://uksurvivalshop.co.uk/shop.html">Shop</a></li>
<li><a href="/shopforum/index.php">Forum</a></li>
<li><a href="../about.html">About</a></li>
<li><a href="../contact.html">Contact</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">
<div id="logo">
<h1><a href="#">Uk Survival Shop   </a></h1>

</div>
</div>
</div>


Footer


<div id="footer">
<p>Copyright (c) 2009 uksurvivalshop.co.uk All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>



index.template.php
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// Site layer - above template. Shown at the very top of the page, above the forum itself.
// See bottom of this function for an example of using your own, custom header at the top of the page.
function template_site_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<link href="http://www.uksurvivalshop.co.uk/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>'
;
// Put your header stuff here
// The following line loads the header.php file"
include('header.php');
}

// Site layer - below template. Shown at the very bottom of the page, below the forum
function template_site_below()
{
global $context$txt;

// Put your footer stuff here
// The following line loads the footer.php file:
include('footer.php');

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div></div>
</body></html>'
;
}

// The top of the forum
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

// The bottom of the forum
function template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: cowboytns on July 02, 2010, 11:51:04 AM
From the begining I will admit I have taught myself everything I know about PHP, SMF, HTML, CSS, etc. so please try to be patient with my ignorance.

As I understand it, the procedures listed here will allow a person to take their home page, divide out the header and footer, then glue it into their forum so that the webpage and the forum will have the same top and bottom.  I want to go the other way.  I would like to take my forum theme and integrate that into my home page.  I have seen others ask this question in the past but I couldn't follow what the posters were talking about. So let's see if I can convey what I am looking to do and if anyone can help me accomplish this.

I am using SMF 2.0 RC 2 and I am using a slightly modified version of the Luxembourges theme.  I have changed the background image, added a couple of buttons on the menu, and adjusted the file path listing so that it lists my webpage first then the forum index and then goes on from there.

On my webpage I want it to look exactly like the forum index except that the content area would be different.  I will write my own html coding in that area to convey the information.  In other words I want everything from the top of the page all the way down to the file path.  Then at the bottom everything from the Forum Index info center to the bottom of the page.

So as I understand what is presented in this forum I should do the following:

1.  my header.php will be everything from under <body/> to just above "//the main contnet goes here"
2.  my footer.php will be everything from under :
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}


to just before </body>

3.  (now this is where I think I need the most help) I then go into my index.template.php and rip out everything in the body section except // The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}


and right after <body/> I put in this code:
<body>';
// Put your header stuff here
// The following line loads the header.php file"
include('header.php');
}

// Site layer - below template. Shown at the very bottom of the page, below the forum
function template_site_below()
{
global $context, $txt;

// Put your footer stuff here
// The following line loads the footer.php file:
include('footer.php');

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}


4.  Since I am using SMF 2 I modify the database as Xylar2 explained earlier:
REPLACE INTO smf_themes
(ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'html,site,body');



5.  Then to make my website index I do this in a file called index1.php (from the original post):
<?phperror_reporting(E_ALL);
// Theme we're going to use
$ssi_theme 4;
// Layers we're going to use
$ssi_layers = array('site');
// Enable GZip compression (saves bandwidth)
$ssi_gzip true;require('SSI.php');

echo 
'See? SMF is cool :)';

ssi_shutdown();?>


I would change the theme number to match the Luxembuourges theme in my forum and my content would go in place of 'See? SMF is cool:)';

6.  Now, can I put index1.php in my websites main folder or does it have to go into the forum folder?

Okay there you have it...rip it apart as you wish and I thank you for your help in advance.  If you need me to post any files I will.  If you are curious the website is brainmush.net.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: mforsberg on July 06, 2010, 04:22:34 PM
Sorry, sometimes I dont grasp stuff right away my question is when I do this if i wanted a index file. that is not the forums, but has form SSI functions do I do this I want to entegrate the site into the forums also but I want sort of a static homepage with smf functions
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: DarkHarlequin on November 24, 2010, 07:17:10 AM
Ok, wasn't sure if I should start a new topic or renew this one, but seeing as though my question is relevant to this topic I thought it best here.

I have got this tutrial followed through and working but I had a question really about having it so that I can use custom header and footers that apply to the relevant theme the user has chosen in SMF.

Basically as the tutorial type thing says I have the header.php and footer.php in the forum directory aswell as a main page that calls all the smf content to the page inbetween the two.

What I want to know is how can I adapt the header and footer so that the background of the header/footer changes depending on the forum skin the user chosen in SMF, I want the standard header/footer but want the background/images on the header to change to match the users chosen SMF theme, what variables/attributes do I need so I can say like background=(users stored/chosen theme)/images/background.jpg in a header that sits in main directory not forum themes directory?

Thanks.


Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: mulder1094 on December 30, 2010, 05:24:55 PM
I have now made the changes needed for this to work with SMF 2.0, search for:

[SMF 2.0xx] Integrating the forum into your site using SMF's layer system

for the topic and instructions
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Rappadappa77 on March 01, 2011, 03:08:17 PM
Hello Guys,

Can i use this to modify SMF 1.1.13?

Howard
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on March 01, 2011, 03:30:07 PM
That would be why it says 1.1.x in the title. It'll work with any version of SMF 1.1.x (x being any number).
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Rappadappa77 on March 01, 2011, 03:44:05 PM
Thanks, that was kinda a dumb question  :).
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Rappadappa77 on March 02, 2011, 10:15:21 AM
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
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on March 02, 2011, 10:53:31 AM
Well if you're following the instructions properly, you'll notice that it says you create 2 php files for the header and footer.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: thechronic2001 on March 02, 2011, 07:53:52 PM
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  ;)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on March 03, 2011, 02:09:13 PM
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. :)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: thechronic2001 on March 03, 2011, 03:23:54 PM
fair play mate, thanks for your reply ;)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: lukef44 on March 10, 2011, 06:42:37 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on March 10, 2011, 09:29:13 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Biology Forums 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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: 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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Biology Forums on May 21, 2011, 12:34:28 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on May 21, 2011, 03:03:23 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Biology Forums on May 21, 2011, 05:10:52 PM
Makes sense, thanks, so I guess I would adjust the ssi.php address to fit my websites' pathway.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: Biology Forums on May 22, 2011, 01:41:25 AM
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?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 01:01:47 PM
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!!

:)
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 01:08:26 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 01:31:46 PM
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?
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 01:38:42 PM
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.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 01:43:06 PM
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!
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 01:48:58 PM
REPLACE INTO smf_themes
   (ID_THEME, variable, value)
VALUES (4, 'theme_layers', 'main');
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 02:01:10 PM
Wow I must have really screwed it up I did that now I get Unable to load the 'main_above' template.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 02:32:23 PM
Are you using SMF2?

Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 02:36:15 PM
Yes the newest version, downloaded it yesterday and uploaded it then.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 02:52:17 PM
Then you shouldn't be following this tutorial which in the title shows you that it was written for SMF1.1.x ...

Go to your database and remove that row that you inserted.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: grankpeq on August 18, 2011, 03:03:36 PM
Ya before I checked I thought I was running SMF ver 1x that was a huge mistake not paying attention. I think I will have to reinstall due to the fact that I cannot see what I last entered in phpmyadmin under SQL  I dont see any of those rows.
Title: Re: [SMF 1.1.x] Integrating the forum into your site using SMF\'s layer system
Post by: IchBin™ on August 18, 2011, 04:20:29 PM
After you click on the database, then click the database for smf_themes in the left column, you should have a browse button at the top to browse the rows of the table. Go to the end of the last page of that table and you should see it there.