vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Template Conditionals Problem (https://vborg.vbsupport.ru/showthread.php?t=279848)

Fluke667 03-10-2012 01:15 AM

Template Conditionals Problem
 
I need a Template Conditional that Shows my $bbuserinfo[field12].png Profile Field choosen Image to all the Other Users and to me.

With all the Template Conditionals i did try, the Image was showing only to me :(

Lynne 03-10-2012 03:07 PM

Please post what you tried and also tell us what template you tried it in.

Fluke667 03-10-2012 04:16 PM

I got this in my Postbit_legacy Template. This should Display a Background Image for the Postbit_Legacy, for other Users and for me but it Displays the Background only for me and not for Other Users...





PHP Code:


<if condition="$bbuserinfo[field12]">
<
style type="text/css">
.
postbit {
background#212224 url(images/postbit/$bbuserinfo[field12].png);
background-repeatrepeat-y;
width:200;
border-leftsolid 0px;
border-rightsolid 0px;
}
</
style>
<
td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]"></if>

<if condition="
empty($bbuserinfo['field12'])">
<td class="
alt2" width="175" style="border$stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top0pxborder-bottom0px"></if> 


BirdOPrey5 03-10-2012 05:37 PM

you need to use $post[field12] not $bbuserinfo[field12].

Fluke667 03-10-2012 06:50 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2308356)
you need to use $post[field12] not $bbuserinfo[field12].



PHP Code:


<if condition="$post[field12]">
<
style type="text/css">
.
postbit {
background#212224 url(images/postbit/$bbuserinfo[field12].png);
background-repeatrepeat-y;
width:200;
border-leftsolid 0px;
border-rightsolid 0px;
}
</
style>
<
td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]"></if>

<if condition="
empty($bbuserinfo['field12'])">
<td class="
alt2" width="175" style="border$stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top0pxborder-bottom0px"></if> 
Edit/Delete Message 

Not working with <if condition="$post[field12]">

christon26 03-10-2012 07:18 PM

There are two other incidences of $bbuserinfo[field12] in your code, did you try it with those replaced too?

Quote:

<if condition="$post[field12]">
<style type="text/css">
.postbit {
background: #212224 url(images/postbit/$bbuserinfo[field12].png);
background-repeat: repeat-y;
width:200;
border-left: solid 0px;
border-right: solid 0px;
}
</style>
<td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]"></if>

<if condition="empty($bbuserinfo['field12'])">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if>
Edit/Delete Message

Fluke667 03-10-2012 08:08 PM

background: #212224 url(images/postbit/$post[field12].png);

Displays Nothing

BirdOPrey5 03-10-2012 08:22 PM

Just put "Value: $post[field12]" in the message area and see what it says when you view the page, see what comes after value... Is it blank?

Are you sure you are using VB 3.x? This won't work on VB 4.x.

Fluke667 03-10-2012 08:59 PM

the output is:

Postbit1


Postbit1 is the Image name defined in Profile Fields... Image is Postbit1.png

BirdOPrey5 03-10-2012 11:10 PM

Quote:

Originally Posted by Fluke667 (Post 2308418)
the output is:

Postbit1


Postbit1 is the Image name defined in Profile Fields... Image is Postbit1.png

Then:

Code:

background: #212224 url(images/postbit/$post[field12].png);
becomes

Code:

background: #212224 url(images/postbit/Postbit1.png);
So there must be something wrong with the css because the correct image name is being generated... I thought the url is supposed to be in quotes?

Code:

background: #212224 url("images/postbit/Postbit1.png");


All times are GMT. The time now is 02: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.01802 seconds
  • Memory Usage 1,754KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)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
  • (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