Здравствуйте! Поставил шаблончик, переделанный шаблон focus, в нём реализованны по другому блоки.
Решил поставить тег ads рекламки, но проблема в том, что после установки тега, он корректно отображается только для незарегистрированных посетителей.
Вот сам код, жирным выделил тег вызова ads рекламы.
Мне нужно, что бы реклама отображалась для залогиненых, под этим левым блоком, ниже юзер-меню:
Код:
{* $Id: header.tpl 8 2009-01-11 06:02:53Z john $ *}
{* INCLUDE HEADER CODE *}
{include file="header_global.tpl"}
{if $smarty.const.SE_DEBUG && $admin->admin_exists}{include file="header_debug.tpl"}{/if}
<div id="smoothbox_container"></div>
{* BEGIN CENTERING TABLE *}
<table cellpadding='0' cellspacing='0' class='body' align='center'>
<tr>
<td>
{* START TOPBAR *}
<div style="width:100%; background-image:url(./images/header_bg.gif); border-bottom:1px solid #fff;">
<table cellpadding='0' cellspacing='0' style='width:950px; padding-top:5px;' align='center'>
<tr>
<td width="66" rowspan="2" align='left' valign='top'>
<a href='./'><img src='./images/logo.gif' border='0'></a> </td>
<td align='left' valign='bottom' style="padding-left:25px; padding-top:5px;">
<div class='top_menu_link_container'><div class='top_menu_link' style="border:none;"><a href='./' class='top_menu_item'>{lang_print id=645}</a></div></div>
<div class='top_menu_link_container'><div class='top_menu_link'><a href='invite.php' class='top_menu_item'>{lang_print id=647}</a></div></div>
{* SHOW ANY PLUGIN MENU ITEMS *}
{foreach from=$global_plugins key=plugin_k item=plugin_v}
{if $plugin_v.menu_main != ''}
<div class='top_menu_link_container'><div class='top_menu_link'><a href='{$plugin_v.menu_main.file}' class='top_menu_item'>{lang_print id=$plugin_v.menu_main.title}</a></div></div>
{/if}
{/foreach}
<td width="250" rowspan="2" align="center" valign="top" style="padding-top:15px;">
{* IF USER IS LOGGED IN, SHOW APPROPRIATE TOP MENU ITEMS *}
{if $user->user_exists != 0}
<div class='top_menu_link_loggedin' style='padding-right: 10px;'>
{* SHOW MY NOTIFICATIONS POPUP *}
{if $notifys[1] != 0}
<div class='newupdates' id='newupdates' style='display: none;'>
<div class='newupdates_content'>
<a href='javascript:void(0);' class='newupdates' onClick="TB_show('{lang_print id=1198}', '#TB_inline?height=150&width=300&inlineId=newupdates_popup', '', './images/trans.gif');">{assign var="notify_total" value=$notifys[0]|@count}{lang_sprintf id=1019 1="<span id='notify_total'>`$notify_total`</span>"}</a></b>
<a href='javascript:void(0);' class='newupdates' onClick="hideNewupdates();">X</a>
</div>
</div>
{/if}
<a href='user_home.php' class='top_menu_item'>{$user->user_displayname_short}</a> |
<a href='user_logout.php' class='top_menu_item'>{lang_print id=26}</a>
</div>
{* IF USER IS NOT LOGGED IN, SHOW APPROPRIATE TOP MENU ITEMS *}
{else}
{/if}
</td>
</tr>
<tr>
<td width="730" align='left' valign='top' style="padding-left:25px; vertical-align:text-top; padding-bottom:10px; padding-top:3px;">
<form action='search.php' method='post' style="margin:0px; padding:0px;">
<input type='text' name='search_text' class='header_text' border="0">
<input type='submit' class='header_button' value='Go'>
<input type='hidden' name='task' value='dosearch'>
<input type='hidden' name='t' value='0'>
</form>
</td>
</tr>
<tr>
<td colspan="3" align='left' valign='bottom'>
<div style="height:22px;">
</div>
</td>
</tr>
</table>
</div>
{* END TOP BAR *}
{* HIDDEN POPUP BOX IF USER HAS NEW UPDATES *}
{if $notifys[1] != 0}
<div style='display: none;' id='newupdates_popup'>
<div style='margin-top: 10px;'>
{assign var="notifyscount" value=$notifys[0]|@count}
{lang_sprintf id=1199 1="<span id='notifyscount'>`$notifyscount`</span>"}
</div>
{section name=notify_loop loop=$notifys[0]}
<div style='font-weight: bold; padding-top: 5px;' id='notify_{$notifys[0][notify_loop].notifytype_id}_{$notifys[0][notify_loop].notify_grouped}'>
<a href='javascript:void(0);' onClick="parent.deleteNotify('{$notifys[0][notify_loop].notifytype_id}', '{$notifys[0][notify_loop].notify_grouped}');">X</a> <img src='./images/icons/{$notifys[0][notify_loop].notify_icon}' border='0' style='border: none; margin: 0px 5px 0px 5px; display: inline; vertical-align: middle;' class='icon'><a href="{$notifys[0][notify_loop].notify_url}">{lang_sprintf id=$notifys[0][notify_loop].notify_desc 1=$notifys[0][notify_loop].notify_total 2=$notifys[0][notify_loop].notify_text[0]}</a></div>
{/section}
</div>
</div>
{/if}
{literal}
<script type='text/javascript'>
<!--
var se_show_newupdates = new Hash.Cookie('se_show_newupdates', {duration: 3600});
{/literal}{if $notifys[1] != 0}{literal}
window.addEvent('domready', function() {
if(se_show_newupdates.get('total') < {/literal}{$notifys[1]}{literal}) {
se_show_newupdates.set('total', '0');
$('newupdates').style.display='block';
}
});
{/literal}{/if}{literal}
var notify_count = {/literal}{$notifys[1]}{literal};
function deleteNotify(notifytype_id, notify_grouped) {
$('ajaxframe').src = 'misc_js.php?task=notify_delete¬ifytype_id='+notifytype_id+'¬ify_grouped='+notify_grouped;
}
function deleteNotifyConfirm(notifytype_id, notify_grouped) {
$("TB_window").getElements('div[id=notify_'+notifytype_id+'_'+notify_grouped+']').each(function(el) { if(el.id == 'notify_'+notifytype_id+'_'+notify_grouped) { el.style.display = 'none'; notify_count--; }});
$('newupdates_popup').getElements('div[id=notify_'+notifytype_id+'_'+notify_grouped+']').each(function(el) { if(el.id == 'notify_'+notifytype_id+'_'+notify_grouped) { el.style.display = 'none'; }});
$('notify_total').innerHTML = notify_count;
$("TB_window").getElements('span[id=notifyscount]').each(function(el) { if(el.id == 'notifyscount') { el.innerHTML = notify_count; }});
if(notify_count == 0) {
TB_remove();
$('newupdates').style.display = 'none';
}
}
function hideNewupdates() {
$('newupdates').fade('out');
se_show_newupdates.set('total', '{/literal}{$notifys[1]}{literal}');
}
function SwapOut(id1) {
$(id1).src = Rollarrow1.src;
return true;
}
function SwapBack(id1) {
$(id1).src = Rollarrow0.src;
return true;
}
//-->
</script>
{/literal}
<table cellpadding='0' cellspacing='0' style='margin-left:auto; margin-right:auto; margin-top:15px; width:950px;'>
<tr>
{* START USER MENU *}
<td valign='top' width="25%" style="width:25%;">
<div style="float:left; width:200px; background-image:url(./images/left_menu_top.gif); background-repeat:no-repeat; height:10px; clear:both; font-size:0px;"></div>
<div style="float:left; width:200px; background-image:url(./images/left_menu_bg.gif); background-repeat:repeat-y; text-align:left;">
{if $user->user_exists != 0}
<div style="width:200px;">
<div style="margin:0px 10px; float:left;">
<a href='{$url->url_create('profile',$user->user_info.user_username)}'>
<img class="photo" src='{$user->user_photo("./images/nophoto.gif")}'
width='35' height='35'
alt="{lang_sprintf id=509 1=$user->user_info.user_username}"
border='0'></a></div>
<div style="float:left; padding-top:2px;"><font style="font-family:arial; font-size:10pt; color:#333333; font-weight:bold;">{$user->user_displayname_short}</font><p><a href='{$url->url_create('profile',$user->user_info.user_username)}'><font size="2">View my profile</font></a></div>
</div>
<div style='clear: both; background: none; height:0px;'></div>
<div class="hrm"></div>
<a href='user_home.php' class='menu_item'><div class="left_menu_div"><img src='./images/icons/menu_home.gif' border='0' class='left_menu'>{lang_print id=1161}</div></a>
<a href='network.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1162}</div></a>
<a href='{$url->url_create('profile', $user->user_info.user_username)}' class='menu_item'><div class="left_menu_div"><img src='./images/icons/profile16.gif' border='0' class='left_menu'>Profile</div></a>
<a href='user_editprofile.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1163}</div></a>
<a href='user_editprofile_photo.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1164}</div></a>
{if $user->level_info.level_profile_style != 0 || $user->level_info.level_profile_style_sample != 0}
<a href='user_editprofile_style.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1165}</div></a>
{/if}
{if $user->level_info.level_message_allow != 0}
<a href='user_messages.php' class='menu_item'><div class="left_menu_div"><img src='./images/icons/message_inbox16.gif' border='0' class='left_menu'>Messages</div></a>
<a href="javascript:TB_show('Compose New Message', 'user_messages_new.php?TB_iframe=true&height=400&width=450', '', './images/trans.gif');" class='menu_item'><div class="left_menu_div_sub">{lang_print id=1167}</div></a>
<a href='user_messages_outbox.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1169}</div></a>
{/if}
{if $setting.setting_connection_allow != 0}
<a href='user_friends.php' class='menu_item'><div class="left_menu_div"><img src='./images/icons/friends16.gif' border='0' class='left_menu'>{lang_print id=653}</div></a>
{/if}
<a href='user_account.php' class='menu_item'><div class="left_menu_div"><img src='./images/icons/settings16.gif' border='0' class='left_menu'>{lang_print id=655}</div></a>
<a href='user_account_privacy.php' class='menu_item'><div class="left_menu_div_sub">{lang_print id=1174}</div></a>
{if $global_plugins.plugin_controls.show_menu_user}
<a class='menu_item'><div class="left_menu_div"><img src='./images/icons/settings16.gif' border='0' class='left_menu'>My Apps</div></a>
{foreach from=$global_plugins key=plugin_k item=plugin_v}
{if $plugin_v.menu_user != ''}
<a href='{$plugin_v.menu_user.file}' class='menu_item'>
<div class='left_menu_div_sub'>
{lang_print id=$plugin_v.menu_user.title}
</div>
</a>
{/if}
{/foreach}
{/if}
<br> <br>
{$ads->ads_display('2')}
{*SHOW LOGIN BOX IF NOT LOGGED IN *}
{else}
<div style="padding:10px 0px 0px 10px;">
<form action='login.php' method='post' style="color:#FFFFFF;" />
<font style="font-family:arial; font-size:9pt; color:#666666; font-weight:bold; margin-right:20px;">Email</font>
<input type='text' class='text_index_guests' name='email' size='24' maxlength='100' value='' />
<br>
<font style="font-family:arial; font-size:9pt; color:#666666; font-weight:bold; margin-right:20px;">Password</font>
<br>
<input type='password' class='text_index_guests' name='password' size='24' maxlength='100' />
<br>
<input style="vertical-align:middle;" type='checkbox' name='persistent' value='1' id='rememberme'><label style="color:#666666; font-size:9pt; vertical-align:middle; cursor:pointer;" for='rememberme'>Remember Me</label>
<br>
<input type='submit' value='Login' style="padding:3px 5px; margin:5px 0px 0px 0px;" />
<NOSCRIPT><input type='hidden' name='javascript_disabled' value='1' /></NOSCRIPT>
<input type='hidden' name='task' value='dologin' />
<input type='hidden' name='ip' value='' />
</form>
</form>
<a style="color:#058ec4; font-size:9pt" href="lostpass.php">Forgot password?</a>
</div>
<br>
<div class="hrm"></div>
<div style="padding:10px 0px 0px 10px;">
<font style="font-family:arial; font-size:9pt; color:#666666; font-weight:bold; margin-bottom:5px;">Need a login?</font><br>
<a style="color:#058ec4; font-size:9pt;" href="signup.php">Signup today!</a>
</div>
{/if}
<div style=" background-image:url(./images/left_menu_bottom.gif); background-repeat:no-repeat; width:200px; height:11px; margin-bottom:-1px;"> [B]<br> <br>[/B]
[B]{$ads->ads_display('2')}</div>[/B]
</div>
</td>
{* END USER MENU *}
<td valign='top' style="width:75%;">
{* SHOW BELOW-MENU ADVERTISEMENT BANNER *}
{if $ads->ad_belowmenu != ""}<div class='ad_belowmenu' style='display: block; visibility: visible;'>{$ads->ad_belowmenu}</div>{/if}
{* START MAIN LAYOUT *}
<div class='content'>