phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Help creating switch_


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
siljo
Board Member



Joined: 16 Oct 2011

Posts: 3



PostPosted: Sun Oct 16, 2011 6:14 am 
Post subject: Help creating switch_

Hi.

I need some help with creating switch_

I use Arcade mod ( the author website is dead,i can upload mod if is needed ) and i use an adult 18+ category with adult flash games.Now i need a switch_ to turn off my sponsor ads in this category.

I know the switch is made in page_header.php

with code like this one

Code:
if (($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD))
{
$template->assign_block_vars('switch_admin_or_mod', array());
}


Can somebody help me?
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Sun Feb 19, 2012 5:41 pm 
Post subject: Re: Help creating switch_

all you have to is create a new one, with your condition.
Code:
   if ($mycondition==1)
   {
      $template->assign_block_vars('switch_my_condition_to_show_image', array());
   }

then in your template file, use it wherever you need it:
Code:
<!-- BEGIN switch_my_condition_to_show_image -->
<img src="">
<!-- END switch_my_condition_to_show_image -->


that should do it.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0182 seconds using 15 queries. (SQL 0.0013 Parse 0.0005 Other 0.0164)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo