Ok, this is my first attempt at a mod for my classifieds, so im needing some help.
In the instructions for the Seller Store, it says it add the following to my layout.tpl.php file:
PHP Code:
{if $smarty.session.level==6 || $smarty.session.level==1}
<a href="modules.php?mod=seller_store">My Store</a>
{/if}
Ok, so I understand that, but if I place that in below file, my site gets a MySQL error (do ask, lol). So, where exactly do I put the code in the below file?
PHP Code:
{* $Id: layout.tpl.php,v 1.1 2006/03/14 16:08:30 Eric Exp $ *}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>{$title}</title>
<meta name="Keywords" content="{$sitekeywords}" />
<meta name="Description" content="{$sitedescription}" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<base href="{$smarty.const.URL}/" />
<link rel="stylesheet" href="templates/{$smarty.const.MAIN_TEMPLATE}/style.css" type="text/css" />
<script type="text/JavaScript">
{literal}
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
{/literal}
</script>
</head>
<body>
<div id="wrapper">
<!-- // Header // -->
<div id="header"><a href="index.php"><img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" /></a></div>
<!-- // Header // -->
<!-- // Top Bar // -->
<div class="topbar">
<div id="menu"><strong>
</strong></div>
</div>
<!-- // Top Bar // -->
<table width="100%" class="tableWhite">
<tr>
<td width="200" valign="top">
<!-- // Navigation // -->
<table border="0" cellpadding="0" cellspacing="0" class="navigation">
<tr>
<td class="navTitle">{$smarty.const.LANG_TPL_NAVIGATION}</td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/index.php">{$smarty.const.LANG_TPL_HOME}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/search.php">{$smarty.const.LANG_TPL_SEARCH}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/category.php">{$smarty.const.LANG_TPL_BROWSE}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/toplistings.php?pg=featured">{$smarty.const.LANG_TPL_FEATURED}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/toplistings.php?pg=new">{$smarty.const.LANG_TPL_NEW}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/toplistings.php?pg=top">{$smarty.const.LANG_TPL_TOP}</a></td>
</tr>
{foreach from=$templatepages item="entry"}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/pages.php?page={$entry.pageID}">{$entry.pPageTitle}</a></td>
</tr>
{/foreach}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URL}/contactus.php">{$smarty.const.LANG_TPL_CONTACT}</a></td>
</tr>
<tr>
<td class="navTitle">{$smarty.const.LANG_TPL_MEMBER_OPTIONS}</td>
</tr>
{* This if statement checks for username and if it isnt found then displays the else *}
{if $smarty.session.username<>'' || $smarty.cookies.username<>""}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/useraccountmodify.php">{$smarty.const.LANG_TPL_MODIFY_ACCOUNT}</a></td>
</tr>
{if $canSaveFavorites=="Y"}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/userfavorites.php">{$smarty.const.LANG_TPL_VIEW_FAVORITES}</a></td>
</tr>
{/if}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/usercheckout.php">{$smarty.const.LANG_TPL_PLACE_AD}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/usermemberships.php">{$smarty.const.LANG_TPL_PURCHASE_MEMBERSHIP}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/userbrowselistings.php">{$smarty.const.LANG_TPL_MODIFY_AD}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="logout.php">{$smarty.const.LANG_TPL_LOGOUT}</a></td>
</tr>
{else}
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/userjoin.php">{$smarty.const.LANG_TPL_REGISTER}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/userlogin.php">{$smarty.const.LANG_TPL_LOGIN}</a></td>
</tr>
<tr>
<td class="navlist"><img src="images/bullet.gif" alt="" /><a href="{$smarty.const.URLS}/usercheckout.php">{$smarty.const.LANG_TPL_PLACE_AD}</a></td>
</tr>
{/if}
</table>
<!-- // Navigation // -->
</td>
<td valign="top" class="padding">
<!-- // Content // -->
{* This includes the content portion *}
{include file=$body}
<!-- // End Content // -->
</td>
</tr>
</table>
</div>
<div class="copy">� 2005 <a href="http://www.68classifieds.com">68 Classifieds Software</a>.
- All Rights Reserved</div>
</body>
</html>
I know, newbie question.