vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   forumid inside of video bbcode template? (https://vborg.vbsupport.ru/showthread.php?t=255878)

way2xtreme 12-25-2010 05:07 AM

forumid inside of video bbcode template?
 
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 [DATE]1293312606[/DATE] at [TIME]1293312606[/TIME] ---------------

Quote:

Originally Posted by ForumsMods (Post 2138815)
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 [VIDEO](.*)[/VIDEO] with something.

way2xtreme 12-29-2010 11:24 PM

Thanks, I will look into this :)


All times are GMT. The time now is 08:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01057 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete