vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Show only to logged in users BBCODE? (https://vborg.vbsupport.ru/showthread.php?t=251206)

Virtualshiner 09-26-2010 11:58 PM

Show only to logged in users BBCODE?
 
When I make a bbcode of

Code:

<if condition="$show['member']">
{param}
</if>

No matter what, it shows. Is there any way to make this work? Also, how would I make a bbcode that uses php? When I do, all that shows is that code for it.

kh99 09-27-2010 12:51 AM

You can't use template conditionals or PHP in a bbcode definition. The only way to make that kind of thing work would be to write a plugin.

Virtualshiner 09-28-2010 11:18 PM

How would I do that?

kh99 09-29-2010 12:09 AM

I don't know offhand. But I was thinking about this - it seems like it wouldn't be too hard to make a mod that allows a BBCode definition to be PHP code (and use templates if you wanted). Does anyone else know if it's been done before?

BirdOPrey5 10-02-2010 02:04 PM

There is a "[hide]" mod available that can do this. There are several "Hide" mods, at least one should be able to do what you want.

But to kh99- there is no mod I've ever seen to allow php or templates in bb code.

kh99 10-02-2010 02:55 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2105907)
There is a "[hide]" mod available that can do this. There are several "Hide" mods, at least one should be able to do what you want.

Even better, they probably have acp options and such...

Quote:

But to kh99- there is no mod I've ever seen to allow php or templates in bb code.
...but I still might do this just for the heck of it.

iask 10-02-2010 04:00 PM

For vb 4

<vb:if condition="$show['member']"> you code </vb:if>

BirdOPrey5 10-02-2010 09:09 PM

Quote:

Originally Posted by kh99 (Post 2105914)

...but I still might do this just for the heck of it.

If you can get php and templates to work in BB Code it would quickly become my favorite mod.:up:


All times are GMT. The time now is 06:31 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.01099 seconds
  • Memory Usage 1,725KB
  • 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_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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