Adverts for guests only.

flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Mon, 2009-11-16 15:26

Is it possible to stop showing adverts for a user who has registered?

Thanks.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-11-16 17:24

You can check if they are a registered user:
http://codex.gallery2.org/Gallery2:Themes:Reference:Variables

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Mon, 2009-11-16 17:47

Thanks for your reply. It looks like it may be possible then but beyond my capabilities to work it out on my own. I have an advert in the sidebar. How would I show a different sidebar to a guest and a member please?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-11-16 20:31

Post a URL to your site.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Wed, 2009-11-18 12:30

Sorry I had to go out for the day yesterday.
It's an adult site. FBB

p.s. just made a modest donation to the cause. :)

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-11-18 14:15

In the same file you modified to display the ads, add the stuff in bold:
[EDIT] oh and that file would be /themes/ice/templates/local/theme.tpl [/EDIT]

 {if $user.isRegisteredUser}
 Welcome {$user.userName}! <-- You can leave this blank or add some other text or something here
 {else}
<!-- Begin: Black Label Ads, Generated: 2009-10-04 20:30:41  -->
REST OF YOUR AD JAVASCRIPT HERE
<!-- End: Black Label Ads --> 
 {/if}

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Wed, 2009-11-18 19:50

Thanks nivekiam, it worked like a charm. I won't be implementing it for a day or two but it's sitting there already to go!

Very much appreciated. :)