vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Conditional list? (https://vborg.vbsupport.ru/showthread.php?t=99796)

Gellpak 10-31-2005 11:11 PM

Conditional list?
 
Is there a list of conditionals that can be used in the templates?

I'm attempting to make the whole row of each thread with a new post have a different color than those which have no new posts. It's probably possible to do this with the $thread[statusicon] variable, but there are (looks like) 18 possible values of that, so it would get to be a headache. There has to be a variable already set that indicates whether the current thread has new posts...?

akanevsky 11-01-2005 12:09 AM

No, there is no list of conditionals, just as there is no list of all the coding possibilities of any given language.
The list is only limited by your imagination and coding skills ;)

Gellpak 11-01-2005 12:27 AM

Quote:

Originally Posted by Dark Visor
No, there is no list of conditionals, just as there is no list of all the coding possibilities of any given language.
The list is only limited by your imagination and coding skills ;)

Fair enough, is there a preset variable that does what the above post describes? There must be, in order for vb to make the decisions it needs to on a post-to-post basis. These types of default existing variables were what I was referring to.

akanevsky 11-01-2005 01:11 AM

I'd suggest using <if condition="$show['gotonewpost']"> for your particular case. :)

Gellpak 11-01-2005 01:26 AM

Quote:

Originally Posted by Dark Visor
I'd suggest using <if condition="$show['gotonewpost']"> for your particular case. :)

Hmm... didn't have any effect.

akanevsky 11-01-2005 05:46 PM

This is just a tip. You need to figure out the rest of the HTML yourself...
Maybe:

...somehtmlcode...
<if condition="$show['gotonewpost']">
style="background-color:white;"
</if>
...morehtmlcode...

Gellpak 11-01-2005 06:13 PM

Well that goes without saying... I put some sample code between those tags, just to see where it worked, and couldn't get it to ever show up, under various conditions.

Code:

<if condition="$show['gotonewpost']">NEW</if>

akanevsky 11-01-2005 06:16 PM

Weird, it works on my board. What template are you trying to use that code in?

T3MEDIA 11-01-2005 06:26 PM

Quote:

Originally Posted by Gellpak
Is there a list of conditionals that can be used in the templates?

I'm attempting to make the whole row of each thread with a new post have a different color than those which have no new posts. It's probably possible to do this with the $thread[statusicon] variable, but there are (looks like) 18 possible values of that, so it would get to be a headache. There has to be a variable already set that indicates whether the current thread has new posts...?

I guess people dont get what you mean. I do. I asked about this ages ago but I am on ignore at the moment.

I was also curious if there was a way to pull information from a variable in templates.

Example. I want to have information on user 200

insted of $user[fieldx] I want $pull(200)[fieldx] so this phantom 'pull' command works as the user or userinfo string but can be used at anytime anywhere.

would solve a kazillion hacks that need extra information. say gender on a pager or ummm avatar of who sent you admeration the list could go on and on.


Im on 3.0.x but it would be nice to see someone have this for their system.

Gellpak 11-01-2005 06:27 PM

threadbit... and what's weird is that there are several other places in the template where it shows up also, but doesn't seem to be doing anything either.

akanevsky 11-01-2005 06:40 PM

Quote:

I guess people dont get what you mean. I do. I asked about this ages ago but I am on ignore at the moment.

I was also curious if there was a way to pull information from a variable in templates.

Example. I want to have information on user 200

insted of $user[fieldx] I want $pull(200)[fieldx] so this phantom 'pull' command works as the user or userinfo string but can be used at anytime anywhere.

would solve a kazillion hacks that need extra information. say gender on a pager or ummm avatar of who sent you admeration the list could go on and on.


Im on 3.0.x but it would be nice to see someone have this for their system.
However, the conditionals are limited by the PHP syntax.

Quote:

threadbit... and what's weird is that there are several other places in the template where it shows up also, but doesn't seem to be doing anything either.
That conditional is supposed to show the "go to new post" arrow when the thread is new.


All times are GMT. The time now is 10:37 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.01104 seconds
  • Memory Usage 1,738KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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