Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Switch_viewtopic_banner Does Not Run 
 
Hello,

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):
--------------------------------------------------------
Code: [Download] [Hide] [Select]
if ( ($i == 0) && (!$user->data['session_logged_in']))
        {
            $template->assign_block_vars('postrow.switch_viewtopic_banner', array());
        }

----------------------------------------

In the viewtopic_body.tpl i try this code:

-----------------------------------------------------

Code: [Download] [Hide] [Select]
<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}&nbsp;</div>
        &nbsp;
        <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.
 




____________
Acuarios, mascotas
Forografia, fotos
Informatica, pc
 
Edited by Joshua203, Thu 27 Jun, 2013 13:42: Added Code Tags
portalpezSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
I've editted your post above PortalPez, please keep using Code Tags for codes in posts
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
Joshua203 wrote: [View Post]
I've editted your post above PortalPez, please keep using Code Tags for codes in posts


Thanks you and Sorry.... Looks like i am new....
 




____________
Acuarios, mascotas
Forografia, fotos
Informatica, pc
 
portalpezSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
Anyone?
 




____________
Acuarios, mascotas
Forografia, fotos
Informatica, pc
 
portalpezSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
You should just make this edit:

OPEN viewtopic.php
FIND
Code: [Download] [Hide] [Select]
            $template->assign_block_vars('postrow.switch_viewtopic_banner', array());

REPLACE WITH
Code: [Download] [Hide] [Select]
            if (!$user->data['session_logged_in'])
            {
                $template->assign_block_vars('postrow.switch_viewtopic_banner', array());
            }

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
Thanks you but Does not run... I try with your code, but does not show "Hello word" to unregistered users

I put exactly this:

In viewtopic.php:

Code: [Download] [Hide] [Select]
if (!$user->data['session_logged_in'])
{
$template->assign_block_vars('postrow.switch_viewtopic_banner', array());
}


In viewtopic_body.tpl:

Code: [Download] [Hide] [Select]
<!-- BEGIN switch_viewtopic_banner -->
            Hello word
<!-- END switch_viewtopic_banner -->


Thanks you very much!!!
 




____________
Acuarios, mascotas
Forografia, fotos
Informatica, pc
 
portalpezSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Switch_viewtopic_banner Does Not Run 
 
I think you are misunderstanding that function.

I would suggest to add a code to viewtopic_body.tpl without altering PHP.

Code: [Download] [Hide] [Select]
<!-- IF not S_LOGGED_IN -->
My Message
<!-- ENDIF -->

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron