vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   All Vb <if> conditions (https://vborg.vbsupport.ru/showthread.php?t=132032)

kh99 08-17-2011 03:57 PM

What template do you want to put that in?

s.sami 08-17-2011 03:59 PM

this is forum statics plug-in "changuondyu_latestpost_bit"

kh99 08-17-2011 04:05 PM

Hmm...I'm not sure what to tell you. It depends on what variables are available when the template is eval'd, and not only is that from a mod, but apparently that mod is no longer available.

s.sami 08-17-2011 04:36 PM

if the user can view forumid x can see this thread title.. my mean is this..

BirdOPrey5 08-19-2011 12:54 PM

What's stored in $vbulletin->bf_ugp_forumpermissions['canview']?

If it's just a 1 or 0 or true or false maybe all you need is:

Code:

<if condition="$vbulletin->bf_ugp_forumpermissions[canview]">

kh99 08-19-2011 01:13 PM

Unless I'm mistaken, $vbulletin->bf_ugp_forumpermissions[canview] is a mask for checking that forum permission, so you'd need the actual forum permission bits to '&' it with. Unfortunately I can't find the source for that mod so I don't know if it's available or what.

souperman 08-20-2011 08:17 PM

You can use pretty much anything in the <if>

Here's a bit more complex ones,

Code:

<if condition="($variable1 == 1) AND ($variable2 = "sample string" || $variable3 != "sample")">
html here
</if>


s.sami 08-21-2011 03:06 PM

this is not working.
Code:

<if condition="$vbulletin->bf_ugp_forumpermissions[canview]">

i need this php code for vb for forumhome_lastpostby template

Code:

if (!($lastpostforumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR (!($lastpostforumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND $lastpostinfo['lastposter'] != $vbulletin->userinfo['username']))

s.sami 08-27-2011 09:07 PM

<if condition="$bbuserinfo[forumpermissions][$forum[forumid]] & 36">

why cant i use this ?

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

i need if user have permissinon on this forumid can see this code

help please

souperman 08-28-2011 04:09 AM

What are you trying to do? can you explain a bit clearer?


All times are GMT. The time now is 06:52 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.06600 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete