PDA

View Full Version : forumid inside of video bbcode template?


way2xtreme
12-25-2010, 05:07 AM
Hi I am trying to limit guest viewing videos in certain forums.

I have tried:
<vb:if condition="in_array($GLOBAL['forumid'], array(78,80,85,83))">
<vb:if condition="in_array($thread['forumid'], array(78,80,85,83))">
<vb:if condition="in_array($post['forumid'], array(78,80,85,83))">
<vb:if condition="in_array($forumid , array(78,80,85,83))">

None of above works, what would be the right variable for this?

Also, if I want to put <vb:if condition="in_array($post['forumid'], array(78,80,85,83))"> and <vb:if condition="$bbuserinfo['userid'] == 0"> togehter, would it look like this?

<vb:if condition="in_array($post['forumid'], array(78,80,85,83)) AND $bbuserinfo['userid'] == 0">

Thanks
W

ForumsMods
12-25-2010, 05:09 AM
If you are using post cache it will not work.

way2xtreme
12-25-2010, 11:54 AM
hmm. Right now I have just <vb:if condition="$bbuserinfo['userid'] == 0"> statement and it seems to work, so do you mean the forumid part will not work?

Any alternative solution?

Thanks

--------------- Added 1293312606 at 1293312606 ---------------

If you are using post cache it will not work.

hmmm I see what you mean now. I viewed a page as a guest first. Then I login and viewed the same page staying the same...

Any workaround for this?

Thanks

BirdOPrey5
12-26-2010, 04:18 PM
The only work around would be to turn off the post cache and that isn't a good idea.

ForumsMods
12-29-2010, 03:13 AM
You can use postbit_display_start hook and pagetext_html variable.
If user is a guest and forumid is in array, replace (.*) with something.

way2xtreme
12-29-2010, 11:24 PM
Thanks, I will look into this :)