I need to show a banner into the first post only to unregistered user, but the code <!-- BEGIN switch_viewtopic_banner --> does not run.
I open viewtopic.php and try with this code( In version 1.3 and 1.27 run well):
--------------------------------------------------------
if ( ($i == 0) && (!$user->data['session_logged_in']))
{
$template->assign_block_vars('postrow.switch_viewtopic_banner', array());
}
{
$template->assign_block_vars('postrow.switch_viewtopic_banner', array());
}
----------------------------------------
In the viewtopic_body.tpl i try this code:
-----------------------------------------------------
<div class="post-subject {postrow.UNREAD_COLOR}"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" /></a> {postrow.POST_SUBJECT} </div>
<div class="post-text post-text-hide-flow">
<!-- BEGIN switch_viewtopic_banner -->
ADSENSE CODE
<!-- END switch_viewtopic_banner -->
{postrow.MESSAGE}<br />
{postrow.ATTACHMENTS}
</div>
<div class="post-text post-text-hide-flow">
<!-- BEGIN switch_viewtopic_banner -->
ADSENSE CODE
<!-- END switch_viewtopic_banner -->
{postrow.MESSAGE}<br />
{postrow.ATTACHMENTS}
</div>
--------------------------------
Could you help me? Thanks you in advance.