Log in

View Full Version : some BBcode for member only


acyk
08-15-2010, 08:54 AM
Dear all ,

I have a question need all your help .

I want to make one of my bbcode that need user to login for watching .

My idea is , [ member ] Member Content [ /member ]

But I can't use the code as following (which is what I post in the bbcode area)


<if condition="$show['member']">
MEMBER CONTENT
<else />
Please login for watching ...
</if>


but these code were working perfectly in other place in the forums .

Can you tell me how to modify the script or how to make it work ?

thanks for your help .

DataHero
08-15-2010, 12:48 PM
Have you tried to use an if conditional array?


<if condition="is_member_of($vbulletin->userinfo, 2, 5, 6, 7)">
Code for members here
<else />
Errormsg for others here
</if>

acyk
08-15-2010, 01:24 PM
Dear DataHero

thanks for your reply , your code can not work with bbcode , I think there might be some limit that those command can not run outside the templates of the vbulletin

BirdOPrey5
08-15-2010, 03:45 PM
You can't use conditions or php in BB Code- it just doesn't work. That said search for the "[hide]" mod which should do the same thing... basically you need to make a product/plugin that hides text that looks like a BB Code but isn't really a BB Code.

https://vborg.vbsupport.ru/showthread.php?t=203010

https://vborg.vbsupport.ru/showthread.php?t=221667

acyk
08-18-2010, 04:03 PM
Dear BirdOPrey5

thanks for your information , I have done modification with your link , many thanks