vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Variables for conditionals (https://vborg.vbsupport.ru/showthread.php?t=64118)

dartho 12-04-2007 11:00 AM

I'm trying to add a conditional to my postbit which does not show attachments in a specific forum. Any ideas on the variable?

<if condition="$postinfo[forumid] != '5'">Show attachments</if>

I'm guessing here, but it now work :(

Zachery 12-04-2007 03:59 PM

$GLOBALS[forumid]

dartho 12-05-2007 01:28 AM

Thankyou!

Anyone able to make a complete list of $GLOBALS variables? This thread has helped me a lot quite often!

valdet 12-05-2007 04:43 AM

Keep the list growing guys. This is an amazing resource.

Opserty 12-05-2007 12:08 PM

Quote:

Originally Posted by dartho (Post 1395214)
Anyone able to make a complete list of $GLOBALS variables?

You only need to use $GLOBALS when the template is called inside a function, there isn't a list so you have to check the files that calls that template to see what is available.

Zachery 12-06-2007 12:48 PM

Quote:

Originally Posted by Opserty (Post 1395478)
You only need to use $GLOBALS when the template is called inside a function, there isn't a list so you have to check the files that calls that template to see what is available.

Most everything is avaible in globals in some way shape or form.

Opserty 12-06-2007 02:42 PM

Quote:

Originally Posted by Zachery (Post 1396160)
Most everything is avaible in globals in some way shape or form.

I never said it wasn't...:confused:

rungok 12-09-2007 11:49 AM

Is there a way to check if someone has birthday today? The birthday and birthdaysearch-field contains year aswell, so breaking this variable up in a template would be a bit difficult. In forumhome there is a cake displayed for the persons that have birthday, so maybe there is some variable floating around that I could use to trigger som happening in postbit like showing this cake under the users avatar?

RedTyger 12-09-2007 12:12 PM

I doubt it is as simple as a conditional, but there is already a modification around that does this.

rungok 12-09-2007 05:02 PM

Quote:

Originally Posted by RedTyger (Post 1397851)
I doubt it is as simple as a conditional, but there is already a modification around that does this.

Do you know where this modification is?

adnan2007 12-09-2007 10:50 PM

Hey can u define your own variables to be available in template conditionals?

If so, can somebody tell me how?

I put some code in Global Start along with some vars, but when i go to check against their values in template conditionals, it seems they're out of scope.

Anybody know how to do this?

thx

rungok 12-13-2007 09:07 PM

Quote:

Originally Posted by rungok (Post 1397843)
Is there a way to check if someone has birthday today? The birthday and birthdaysearch-field contains year aswell, so breaking this variable up in a template would be a bit difficult. In forumhome there is a cake displayed for the persons that have birthday, so maybe there is some variable floating around that I could use to trigger som happening in postbit like showing this cake under the users avatar?

To answer my own question (in case anyone wonders) I can probably use this little snippet of code:

https://vborg.vbsupport.ru/showthread.php?t=82612


All times are GMT. The time now is 01:34 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.01271 seconds
  • Memory Usage 1,739KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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