PDA

View Full Version : vB permissions on a non-vB page?


thuffner
08-13-2005, 12:51 AM
I was wondering how this would be implemented.

I currently run ads on both my forums and every page of my website. I was wondering how I would go about "getting rid of" the ads on both the forums and every page if the user was registered to the forums.

EDIT: To be specific, I would like to be able to use this if statement on a non-vB page:

<if condition="$show['guest']"> Stuff that only a guest sees. </if>

Any ideas? Could someone point me in the right direction?

Thanks so much. :):)

Adrian Schneider
08-13-2005, 01:08 AM
<if conditon="!$bbuserinfo['userid']">Guests Can see this</if>

?

thuffner
08-13-2005, 01:11 AM
But for a non-vB page? How do I 'tell' the if statement to look in the directory of my forum users?

Adrian Schneider
08-13-2005, 01:12 AM
So it's not related to vbulletin at all? If you want to check if they are a user on the forums you'll have to include global.php.

Andreas
08-13-2005, 01:32 AM
Including global.php or at least init.php would be the easiest way.

Paul_Hollibone
08-14-2005, 01:32 AM
I would also like to know how this can be done. Anyone know how to do it?

Andrew111888
08-16-2005, 06:29 AM
You would need:


<?php
require_once('./global.php');
?>


You may also need the code to call templates (if your non-vB pages are stored as templates, and not in the file.

And if you would like to remove the advertisments if a user is registered:


<if condition="$bbuserinfo['usergroupid'] == 1">
Advertisement Code here
</if>