PDA

View Full Version : Add if rule in the plugin


Zi55
01-01-2010, 03:07 AM
Hello ,
I just would like to know how i can put this if rule inside plugin ,
<if condition="$show['member']">
include a file for example
</if>

maybe you will tell me to use is rules , is the below right ?

if (is_member_of($vbulletin->userinfo, 1)) (The group of guests)
{
//return empty result
} else {
include
}

Thanks ,
Zi5

--------------- Added 1262351928 at 1262351928 ---------------

Please help

Lynne
01-01-2010, 02:43 PM
Your second should work in most hook locations:
if (!is_member_of($vbulletin->userinfo, 1))
{
//stuff for users NOT a member of usergroup 1
}

ragtek
01-01-2010, 03:08 PM
why not use if (!$show['guest']) ;)

Lynne
01-01-2010, 03:17 PM
Probably could do either.

Zi55
01-02-2010, 12:21 AM
Lynne & ragtek
Thanks for yours reply , your rules works for guests , if i use this
if (!$show['member']) in plugins it will work ?
Thanks ,
Zi55