vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   some BBcode for member only (https://vborg.vbsupport.ru/showthread.php?t=248661)

acyk 08-15-2010 08:54 AM

some BBcode for member only
 
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)

PHP Code:

<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?

HTML Code:

<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


All times are GMT. The time now is 09:56 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.01022 seconds
  • Memory Usage 1,720KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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