Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2012, 02:15 AM
Fluke667 Fluke667 is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 03-10-2012, 04:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post what you tried and also tell us what template you tried it in.
Reply With Quote
  #3  
Old 03-10-2012, 05:16 PM
Fluke667 Fluke667 is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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> 
Reply With Quote
  #4  
Old 03-10-2012, 06:37 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to use $post[field12] not $bbuserinfo[field12].
Reply With Quote
  #5  
Old 03-10-2012, 07:50 PM
Fluke667 Fluke667 is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
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]">
Reply With Quote
  #6  
Old 03-10-2012, 08:18 PM
christon26 christon26 is offline
 
Join Date: Dec 2008
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 03-10-2012, 09:08 PM
Fluke667 Fluke667 is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Displays Nothing
Reply With Quote
  #8  
Old 03-10-2012, 09:22 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 03-10-2012, 09:59 PM
Fluke667 Fluke667 is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the output is:

Postbit1


Postbit1 is the Image name defined in Profile Fields... Image is Postbit1.png
Reply With Quote
  #10  
Old 03-11-2012, 12:10 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fluke667 View Post
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");
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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.04317 seconds
  • Memory Usage 2,276KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete