News:

Wondering if this will always be free?  See why free is better.

Main Menu

Integrating the forum into your site...

Started by [Unknown], November 09, 2004, 11:18:05 PM

Previous topic - Next topic

meadwench

Thanks for looking at it! No error in the log. I am getting chat errors like this:
8: Undefined index: chatAlt
File: /hsphere/local/home/meadwenc/gotmead.com/smf/Themes/yabbsetheme/Errors.template.php (eval?)
Line: 244

from the current theme (which is the yabbse conversion, hence my reason for trying to get a real SMF theme working)

I took the php stuff out of my header and footer. Uploaded them, cleared the error log and tried to view. No error showing up,  and the source of the blank page is:
<!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="http://www.gotmead.com/smf/Themes/default/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "http://www.gotmead.com/smf/Themes/gotmead";
var smf_images_url = "http://www.gotmead.com/smf/Themes/default/images";
// --></script>
<title>Choose a theme...</title>
<link rel="stylesheet" type="text/css" href="http://www.gotmead.com/smf/Themes/gotmead/style.css?rc1" />


Any ideas?

Vicky Rowe
Health and Weight Loss Coach
http://www.hcgloss.com
SMF 2.0 RC3, Joomla 1.5.8

meadwench

Here's the code I'm using for the template:
// 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 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.

// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div id="headerarea" style="padding: 12px 30px 4px 30px;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">';

// The logo and the three info boxes
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="position: relative;">
<tr>
<td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">';

// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';

echo '
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/userinfo.gif" style="position: absolute; left: ', $context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' : '-1px', '; top: -16px; clear: both;" alt="" />
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';

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

echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>', $txt[616], '</b>';

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

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />', $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'];
}

echo '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
', $context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '<br />
', $context['current_time'], '<br />

<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<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 />
', $txt['smf52'], '
</form>';
}

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

<form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 7px;">
<b>', $txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex;" />&nbsp;
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />';

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

echo '
</form>

</td>
<td width="262" style="padding-left: 5px;" valign="top">';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';

// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ',  $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>
</div>';

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

';

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

echo '
</div>';

// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}

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

echo '</td>
<td width="130">

<!-- START AdPeeps.com Code -->
<p align="center">
<SCRIPT type="text/javascript" SRC="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=showad&uid=100000&bmode=off&bstyle=default&btotal=1&bzone=rightside-tower&bsize=120x600&btype=3&bpos=default&ver=2.0&btarget=_blank&bborder=0">
</SCRIPT>
<NOSCRIPT>
<a href="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=clickad&uid=100000&bmode=off&bzone=rightside-tower&bsize=120x600&btype=1&bpos=default&ver=2.0" target="_blank">
<img src="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=showad&uid=100000&bmode=off&bzone=rightside-tower&bsize=120x600&btype=1&bpos=default&ver=2.0" width="120" height="600" alt="Click Here!" border=0></a>
</NOSCRIPT>
</p>
<!-- END AdPeeps.com Code --></td>
</tr></table>';

// 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"><!--
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="right">
<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;" border="0" 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;" border="0" 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="left">
<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;" border="0" 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;" border="0" 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>';

echo '
</div>';

// 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"><!--';

// 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].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 = 0; i < codeFix.length; 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].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}';
}

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

}

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

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}

// 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 $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '<br />';
}

echo '</span>';
}

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

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];


// Integrated Chat Mod Icon
if (!$context['user']['is_guest'])
echo '
<a href="', $scripturl, '?action=chat" target="_blank">', ($settings['use_image_buttons'] ? ' <img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="' . $txt['chatAlt'] . '" target="_blank" style="margin: 2px 0;" border="0" />' : $txt['chatAlt']), '</a>', $context['menu_separator'];


// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}
function template_site_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

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>';

include('header.php');
}

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

include('footer.php');

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


I'm sure its something simple like a missing or extra character, but I'll be durned if I can find it......any suggestions?

Thanks!

Vicky Rowe
Health and Weight Loss Coach
http://www.hcgloss.com
SMF 2.0 RC3, Joomla 1.5.8

FS.Ed

#82
Help Please.......
I have been trying for days to intergrate SMF into my website. I have been meticulously following the 'Simple' method described on page one of this section and read every posting here three times or more and still just can not get it to work.

I have installed SMF and the Theme Techhead and it all works perfectly on its own. But when I try the 'Simple' method to intergrate it to my forum style it all fails!

I modify the index.template.php in the Techhead folder as described but am unable to find the code:
<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'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />

When I create the header.php do I have to strip out all the <html> & <head> tag information and just start after the <body> tag or should this be just left alone as a normal html page up to the point where I want the forum to appear?

Error codes that appear at the top of my page say:
Warning: template_main_above(/themes/techhead/header.php): failed to open stream: No such file or directory in /homepages/27/d73024444/htdocs/forum/Sources/Load.php(1040) : eval()'d code on line 68

Warning: template_main_above(): Failed opening '/themes/techhead/header.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/27/d73024444/htdocs/forum/Sources/Load.php(1040) : eval()'d code on line 68


(Line 68 is where the header.php line is inserted)

A similar meassage appears where the footer shoud be displayed:
Warning: template_main_below(/themes/techhead/footer.php): failed to open stream: No such file or directory in /homepages/27/d73024444/htdocs/forum/Sources/Load.php(1040) : eval()'d code on line 309

Warning: template_main_below(): Failed opening '/themes/techhead/footer.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/27/d73024444/htdocs/forum/Sources/Load.php(1040) : eval()'d code on line 309


My new forum is at: hxxp:www.flyingsites.co.uk/forum [nonactive]
Header.php is at: hxxp:www.flyingsites.co.uk/forum/themes/techhead/header.php [nonactive]
Footer.php  is at:hxxp:www.flyingsites.co.uk/forum/themes/techhead/footer.php [nonactive]

If you need to look at the code for the index.template.php it can be found here in text form:
hxxp:www.flyingsites.co.uk/forum/themes/techhead/index.template.txt [nonactive]

I'm completly new to PHP but am reasonably competent with html.

My current forum is running on Yabb at: hxxp:www.flyingsites.co.uk/cgi-bin/forum/YaBB.pl [nonactive]
This is the way I wish the SMF forum to appear on my site, but unless I can get it to intergrate I'm stuffed!

I hope someone can help as I'm now at a loss as to what to do.

Thanks in advance, and if anyone needs more info I will supply it.

Thanks
Peter

FS.Ed

Eureka!
I've managed to solve it!

Where I was going wrong was that I was putting the header & footers in the themes/techhead folders.

They have to be in the top level directory! In my case hxxp:www.flyingsites.co.uk/forum [nonactive] directory.

Now, I'm just tweaking the Techhead style to suit the colour scheme of my site, but that easly adjusted in the css style sheet!

Next move after this is to convert my Yabb forum over to SMF, lets hope that is a little easier for me!

Cheers
Peter
hxxp:www.flyingsites.co.uk/forum [nonactive]

jrstark

OK, I'm using the non-cool version but didn't delete anything besides the logo.  Finally got the table to flow correctly.  However, part of my header is a left-hand column of beige-colored links.  I have added these definitions to the theme stylesheet.  Headersmf.php and footersmf.php are in my home directory.

The links are not showing the correct color, they are showing the default link color.  Do I need to move headersmf.php into the theme folder for the stylesheet to take effect on these links?

xrisos

all this topic did was confuse me....

how can i link/include a php script in my main page ie index.php (or another page ie forum.html for example) that will show my simple machines forum on that page???........

jrstark

Quote from: xrisos on October 23, 2005, 10:33:12 PM
all this topic did was confuse me....

how can i link/include a php script in my main page ie index.php (or another page ie forum.html for example) that will show my simple machines forum on that page???........

Do you want your forum to be your main page?  Then install it in root (public html) and put your logo and anything else specific to your site in header.php and footer.php and go from there.

But even so, it's probably better to put it in a subdirectory and just have a link to forums on your main page.  Because otherwise everything on your main page will be on every page of your forum.

If you want your forum to BE on forum.html you will need to do a one-frame frameset.

ecopilot

Dear,
Thanks very much for your answer to my question. May be I'm confused in my querry. At the end of your message I couldn't even understand my question anymore... Certainly helpful but unfocused!
So I recap.
Go to  hxxp:www.ecopilot.be [nonactive] and see how I have integrated the very nice look of the smf into my pages.
Than click the button forum in the welcome page hxxp:www.sudepervier.be/forum/index.php [nonactive]
How come I back to my home page and other buttons I prepared? using the back arrows on the browser?
My question is SIMPLY
1- How do I integrate MY buttons so they APPEAR IN ADDITION TO THOSE already in the NAvigation bar  (HOME- HELP - SEARCH _ PROFILE - CALENDAR - LOGOUT as here
2- How are LINKS added to these buttons
To make short  how can I COMPLETE the SMF Navigation bar so all links from my welcome page are included. Where to put .gif and wjhat command in what folder...
Thanks for your help and your lecture that I will start to study

Yours
Eric Laitat
hxxp:www.ecopilot.be [nonactive]

osh.com.au

Hi I have used the simple way of doing this and my results can be found at hxxp:osh.com.au/forum/index.php [nonactive]

There is a slight problem my link bar as it is not sitting where it should be. If you go to hxxp:www.osh.com.au [nonactive] you can see where it sits. Does anyone have any suggestions? I have fiddled with it a little (I am a bit of a noob  :-\) and have had no luck. I don't want to exactly change my link bar as It generally works well for everything else.

I only added the header as I didn't need a footer added. The code I am using is below.... Is there anyway to edit it so the link bar will fit?


<html><!-- InstanceBegin template="../../Unnamed%20Site%201/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
</head>

<body background="/images/lgrey104.jpeg" link="#FF6600" vlink="#0000CC" alink="#FF9900" style="margin:0;">
<table width=994 height="100%" border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width="1004" height="17" background="/images/topbg.gif">&nbsp; </td>
</tr>
<td height="100" background="/images/mainpic4.jpg" style="padding-left:70px; ">&nbsp;</td>
</tr>
    <td height="78" background="/images/navbg.gif"><script language="JavaScript" src="/structure.js"></script>
        &nbsp;</div></td>
</tr>
<tr>
<!-- Start of StatCounter Code --><script type="text/javascript" language="javascript">
var sc_project=1026961;
var sc_invisible=1;
var sc_partition=9;
var sc_security="cf97aced";
    </script><script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript>
<a href="http://www.statcounter.com/" target="_blank"><img  src="http://c10.statcounter.com/counter.php?sc_project=1026961&amp;java=0&amp;security=cf97aced&amp;invisible=1" alt="free hit counter" border="0"></a></noscript><!-- End of StatCounter Code --><script language="JavaScript" src="/settings.js"></script></body><!-- InstanceEnd --></html>


Thanks in advance for your help!  :D

motumbo

I've read throught this thread a number of times.  I understand none of it.  I see so many people had problems that I don't want to go near this.

Is there anyone out there that has the complete code to put in a menubar on the left-hand side in a template so I can just substitute your template for mine and be done with this?  Is there anyone who's got their navbar in a separate file and just including it in?  Either way, I just want the code.

I've spent so many hours just researching this--too many hours.  I just want a navbar on the left-hand side.  That's all I want.  I just want to be done with this part.

Thank you.


meadwench

Bump.

I'm still unable to determine why my template won't display at all. I get no errors on the screen or in my log, just a blank page. I have to admit that I'm frustrated. Anyone have any ideas?

My template looks like this:

<?php
// Version: 1.0 RC2; index


// 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 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.

// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div id="headerarea" style="padding: 12px 30px 4px 30px;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">';

// The logo and the three info boxes
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="position: relative;">
<tr>
<td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">'
;

// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<img src="'
$settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">'
$context['forum_name'], '</span>';

echo '
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="'
$settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url('
$settings['images_url'], '/box_bg.gif);">
<img src="'
$settings['images_url'], '/'$context['user']['language'], '/userinfo.gif" style="position: absolute; left: '$context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' '-1px''; top: -16px; clear: both;" alt="" />
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>'
;

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

echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
'
$txt['hello_member'], ' <b>'$context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', '$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
$txt[616], '</b>';

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

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />'
$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'];
}

echo '<br />
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />
'
$context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
'
$txt['welcome_guest'], '<br />
'
$context['current_time'], '<br />

<form action="'
$scripturl'?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<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 />
'
$txt['smf52'], '
</form>'
;
}

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

<form action="'
$scripturl'?action=search2" method="post" style="margin: 0; margin-top: 7px;">
<b>'
$txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 8ex;" />&nbsp;
<a href="'
$scripturl'?action=search;advanced">'$txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />'
;

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

echo '
</form>

</td>
<td width="262" style="padding-left: 5px;" valign="top">'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div class="headertitles" style="width: 260px;"><img src="'
$settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url('
$settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="'
$settings['images_url'], '/'$context['user']['language'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">'
$context['random_news_line'], '</div>
</div>'
;

// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="'
$settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url('
$settings['images_url'], '/box_bg.gif);">
<img src="'
$settings['images_url'], '/'$context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>'
$modSettings['totalMessages'], '</b> '$txt[95], ' '$txt['smf88'], ' <b>'$modSettings['totalTopics'], '</b> '$txt[64], ' '$txt[525], ' <b>'$modSettings['memberCount'], '</b> ',  $txt[19], '<br />
'
$txt[656], ': <b> <a href="'$scripturl'?action=profile;u='$modSettings['latestMember'], '">'$modSettings['latestRealName'], '</a></b>
</div>
</div>'
;

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

'
;

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

echo '
</div>'
;

// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">'
;
}

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

echo '</td>
<td width="130">

<!-- START AdPeeps.com Code -->
<p align="center">
<SCRIPT type="text/javascript" SRC="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=showad&uid=100000&bmode=off&bstyle=default&btotal=1&bzone=rightside-tower&bsize=120x600&btype=3&bpos=default&ver=2.0&btarget=_blank&bborder=0">
</SCRIPT>
<NOSCRIPT>
<a href="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=clickad&uid=100000&bmode=off&bzone=rightside-tower&bsize=120x600&btype=1&bpos=default&ver=2.0" target="_blank">
<img src="http://www.gotmead.com/adpeeps/adpeeps.php?bfunction=showad&uid=100000&bmode=off&bzone=rightside-tower&bsize=120x600&btype=1&bpos=default&ver=2.0" width="120" height="600" alt="Click Here!" border=0></a>
</NOSCRIPT>
</p>
<!-- END AdPeeps.com Code --></td>
</tr></table>'
;

// 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"><!--
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="right">
<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;" border="0" 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;" border="0" 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="left">
<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;" border="0" 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;" border="0" 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>';

echo '
</div>'
;

// 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"><!--'
;

// 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].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 = 0; i < codeFix.length; 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].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}'
;
}

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

}

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

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"'$settings['linktree_inline'] ? ' style="font-size: smaller;"' '''>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num 0)
echo str_repeat('<img src="' $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />'$link_num 1), '<img src="' $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}

// 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 $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' '<br />';
}

echo '</span>';
}

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

// Show the [home] and [help] buttons.
echo '
<a href="'
$scripturl'">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/home.gif" alt="' $txt[103] . '" style="margin: 2px 0;" border="0" />' $txt[103]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/help.gif" alt="' $txt[119] . '" style="margin: 2px 0;" border="0" />' $txt[119]), '</a>'$context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="'
$scripturl'?action=search">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/search.gif" alt="' $txt[182] . '" style="margin: 2px 0;" border="0" />' $txt[182]), '</a>'$context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="'
$scripturl'?action=admin">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin.gif" alt="' $txt[2] . '" style="margin: 2px 0;" border="0" />' $txt[2]), '</a>'$context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="'
$scripturl'?action=profile">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/profile.gif" alt="' $txt[79] . '" style="margin: 2px 0;" border="0" />' $txt[467]), '</a>'$context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];


// Integrated Chat Mod Icon
if (!$context['user']['is_guest'])
echo '
<a href="'
$scripturl'?action=chat" target="_blank">', ($settings['use_image_buttons'] ? ' <img src="' $settings['images_url'] . '/' $context['user']['language'] . '/chat.gif" alt="' $txt['chatAlt'] . '" target="_blank" style="margin: 2px 0;" border="0" />' $txt['chatAlt']), '</a>'$context['menu_separator'];


// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="'
$scripturl'?action=login">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/login.gif" alt="' $txt[34] . '" style="margin: 2px 0;" border="0" />' $txt[34]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=register">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/register.gif" alt="' $txt[97] . '" style="margin: 2px 0;" border="0" />' $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/logout.gif" alt="' $txt[108] . '" style="margin: 2px 0;" border="0" />' $txt[108]), '</a>';
}
function 
template_site_above()
{
global $context$settings$options$scripturl$txt$modSettings;

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>'
;

include('header.php');
}

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

include('footer.php');

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


Quote from: meadwench on September 16, 2005, 02:23:18 PM
Thanks for looking at it! No error in the log. I am getting chat errors like this:
8: Undefined index: chatAlt
File: /hsphere/local/home/meadwenc/gotmead.com/smf/Themes/yabbsetheme/Errors.template.php (eval?)
Line: 244

from the current theme (which is the yabbse conversion, hence my reason for trying to get a real SMF theme working)

I took the php stuff out of my header and footer. Uploaded them, cleared the error log and tried to view. No error showing up,  and the source of the blank page is:
<!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="http://www.gotmead.com/smf/Themes/default/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "http://www.gotmead.com/smf/Themes/gotmead";
var smf_images_url = "http://www.gotmead.com/smf/Themes/default/images";
// --></script>
<title>Choose a theme...</title>
<link rel="stylesheet" type="text/css" href="http://www.gotmead.com/smf/Themes/gotmead/style.css?rc1" />


Any ideas?



Thanks!

Vicky
Vicky Rowe
Health and Weight Loss Coach
http://www.hcgloss.com
SMF 2.0 RC3, Joomla 1.5.8

Confused Too

Is this thread SMF 1.1 RC1 compliant?  I ask because when I look at some of the code it is not like the code I have on my forum.
I have tried to play around and all I did was break it and had to delete the folder and revert back to SMF Default Theme.
I am a complete PHP virgin so need an idiots guide to try and intigrate the forum into the site.
Making the working lives of the disadvantaged a little easier.

Confused Too

I spoke too soon the forum is now broken...... :'(
How irritating.  All I was doing was working on a template and not the default template.  I have used the back button to go to a cached version and changed to forum to SMF default and to Classic Abba but nothing shows on screen at all?  ???
Making the working lives of the disadvantaged a little easier.

xenovanis

Upload all files from the upgradepackage of the smfversion you are using again.
"Insanity: doing the same thing over and over again and expecting different results."

Confused Too

Quote from: xenovanis on November 26, 2005, 08:50:36 AM
Upload all files from the upgradepackage of the smfversion you are using again.
Thanks xenovanis working on it now.
Making the working lives of the disadvantaged a little easier.

Confused Too

Thanks xenovanis I have re-installed the whole of SMF again to start with a fresh install and just changed the Database Tables Prefix: from smf_ to new_ and when into the admin changed the prefix back to smf_. Kicked me out and asked me to log in again and all is back.
Making the working lives of the disadvantaged a little easier.

Karrit

I can probably figure out the intrgration, but what all will I need to include in my header and footer.php? Is there an example I can look at?

becca

#97
Hi, I integrated my site.. but its not lined up right. How do I made it line up so that the header is truely at the top and so the color I pick for the header stays as it should (it should be a green background on the top and bottom. Oh and I used the cool way of doing it hehe... I am still not to sure how to order it.. what is the acual code for ordering the top, content, bottom, site bottom and left hand? I saw where you said use a table, but where would I add the code for the table?

Thanks!

hxxp:ourussvoyager.com/galaxies/index.php [nonactive]

motumbo

#98
Quote from: becca on November 28, 2005, 06:28:21 PM
Hi, I integrated my site.. but its not lined up right. How do I made it line up so that the header is truely at the top and so the color I pick for the header stays as it should (it should be a green background on the top and bottom. Oh and I used the cool way of doing it hehe... I am still not to sure how to order it.. what is the acual code for ordering the top, content, bottom, site bottom and left hand? I saw where you said use a table, but where would I add the code for the table?

Thanks!

http://ourussvoyager.com/galaxies/index.php

First off, you should not be using absolute positioning on your header DIV.  That breaks the normal flow of the layout.  Here is the code from the HTML file your site generated:

"<div id="Layer1" style="position:absolute; width:301px; height:43px; z-index:1">"

I read Unknown's instructions on in this thread about 25 times and I still don't understand it.  So I tried another method.

In index.template.php:

Immediate after the body tag add a DIV and put the CSS info in style.css.  Optional if you want a left panel for navigation links and stuff,

<body>';
//Add the following two lines for your header and logo:
echo '
        <div class="myheaderdiv"></div>';  //This is the header
//Add this for a navigation bar at left:
echo '
<table class="wrappertable">
        <td class="leftnav">
        <div><a href="http://www.google.com/>Link 1</a></div>
        <div><a href="http://www.yahoo.com/>Link 2</a></div>
        </td>
        <td>';  //This <td> is to wrap the forum in a table cell because DIVs won't work.
//Resume regular code


You could also put an include function in there instead of embedding the code in the php file.  Also, be sure to add entries for these in your CSS so you can handle the formating in one place. 

In the same PHP file in the function template_main_below() add the following code immediately above the closing </body> tag to close the td and table from above:


</td>
</table>
</body>
</html>';
//The </body> and </html> tags are already there.  Just add the </td> and </table> tags.


You'll optionally want to remove this code to get rid of the SMF logo and forum name that was originally there:
echo '
<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';





Col

Hi,

I set up a header and footer some months ago, using the simple method, and works without any problems. However, when I tried setting the forum to search engine friendly URLs, my logo in the header, and an image in my footer failed. They still work on my index page, but when I enter boards, and threads, I get the red 'X's.

Is it that I must include the header/footer hacks with the other templates; is that I have to use the more complex header/footer method; or is there something else that I must do?

Thanks.

Advertisement: