vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   vBulletin If Tag? (https://vborg.vbsupport.ru/showthread.php?t=300773)

Dan321 08-02-2013 07:45 PM

vBulletin If Tag?
 
on a page, how do I add an if for example

I want members to see a image saying staff only. but staff seeing a page with lets say a movie.

kh99 08-02-2013 09:38 PM

If you're writing a php script, you can use something like:

Code:

if (!is_member_of($vbulletin->userinfo, 1, 2, 3)
{
  // display no permission
}
else
{
  // display movie
}


If you're using a template you can do something like:

Code:

<vb:if condition="!is_memebr_of($bbuserinfo, 1, 2, 3)">
Members only.
<vb:else />
Movie
</vb:if>


Dan321 08-03-2013 03:11 PM

neither are working on Logicians WebTemplates :/

--------------- Added [DATE]1375557503[/DATE] at [TIME]1375557503[/TIME] ---------------

bump

kh99 08-03-2013 06:21 PM

Sorry, I don't know what Logicians WebTemplates is. The second thing I posted will only work in a vbulletin template.

The first is php code so it will work if you're writing your own php script. Does WebTemplates allow you to insert php code? Then something like the above might work if you're including the vbulletin files (like global.php).

Of course you'd have to change the 1, 2, 3 in my examples to the actual usergroups you want.

Dan321 08-03-2013 06:49 PM

anyway of HTML ?

Skivey 08-03-2013 07:27 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=289090" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=289090</a>


All times are GMT. The time now is 08:49 PM.

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.01141 seconds
  • Memory Usage 1,716KB
  • 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
  • (2)bbcode_code_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