View Full Version : Hide module for donators
Bellinis
05-23-2007, 10:34 AM
I created a module with an adsense ad in it. Now I would like to show this module to everyone except the people who donate to my site.
These donators are all in the registered users group and additionally in donators. Now how can I hide this module from my donators?
Thanks a lot in advance!
Brian
05-23-2007, 12:15 PM
Sorry, but there are no default options that will allow you to hide a module from a specific group, other than the normal usergroup permissions.
DementedMindz
05-23-2007, 12:50 PM
make a new usergroup donators and dont allow them to see that module ;)
Brian
05-23-2007, 01:52 PM
Those users are still in the "Registered" group, so they would still be able to see the module.
Bellinis
05-24-2007, 04:18 AM
I did try the following:
- Made a copy of adv_portal_module_wrapper
- Added an IF statement on top of this template which would not show the template to donators.
- used this copy for my new module
Unfortunately it didn't work either... :( Why not actually?
DementedMindz
05-24-2007, 01:38 PM
Those users are still in the "Registered" group, so they would still be able to see the module.
well if there moved to a new user group when they donate then they wouldnt see the registered users modules. had it set up on my site this way for a bit now.
karlm
07-26-2007, 02:44 AM
What I did to resolve this, is where-ever I have adsense, I use this code wrapped around it:
<if condition="(!is_member_of($bbuserinfo,xxx))">
<tr>
<td class="$bgclass">
<!-- PLACE CONTENT HERE -->
<!-- put your own google / whatever code between the markers.
<!-- END CONTENT HERE -->
<a href="/removeads.php"><font size="1">[CLICK TO REMOVE THESE]</font></a>
</td></tr></if>
Replace xxx in [<if condition="(!is_member_of($bbuserinfo,xxx))">] with whatever usergroup number you have set for donators.
This also puts a text link at the bottom of the ads, so none-donators can click the link, and be taken to your payments page. Thus, it leads people to realise that by donating to your site, they will have the advertisements removed.
The above code works anywhere within vbulletin, so you can use it in posts, mods, etc.
And the end result, looks like...
http://antimisandry.com/uploads/thumbs/viu1185428995z.jpg (http://antimisandry.com/uploads/viewer.php?id=viu1185428995z.jpg)
And this works whether the donators group is a part of another (e.g. registered members) or not.. as long as they are part of donators, it removes the advertisement completely from their screen.
Bellinis
07-29-2007, 03:47 PM
Thanks a lot karlm!! :D
Works great.
One question though: how would the condition look like if I want to use it for more groups? (I have normal donators, but also anonymous donators)
Hope you or someone else can help me on this one ;)
karlm
10-05-2007, 12:02 AM
If they're anonymouse... how will you know who to put in the group? LoL
Assuming you know though, just put an 'OR' condition.
<if condition="(!is_member_of($bbuserinfo,xxx)) or (!is_member_of($bbuserinfo,yyy))">
I think, but don't quote me, you could do it this way too: (i'm not a coder per se, just a 'tweaker').
<if condition="(!is_member_of($bbuserinfo,xxx,yyy))">
The bottom one (assuming it works) but better coding (and quicker to excecute) but if it doesn't work,just use the top one.
ps - sorry delayed, I only drop in once in a blue moon.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.