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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2007, 06:24 PM
Masked Crusader Masked Crusader is offline
 
Join Date: Oct 2005
Location: Sacramento, CA, USA
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default IF Statement For IM Icons In Postbit

Hey guys.

Here is what is going on. I made a template edit in which there is a table around the IM icons on the Postbit.

The problem is, when the user does not have any information in the IM slots in their profile, the table still appears in the postbit.

Look here for an example of what is going on: http://www.roninleague.com/showthread.php?t=1

Look under second post on the thread. See how it is just a table underneath the activity modification.

I need an IF statement so that the table only appears in the user has entered in IM information in their profile.

I do not know what the condition of the IF statement should be.

Any help would be appreciated.

Thanks in advance.
Reply With Quote
  #2  
Old 03-19-2007, 08:16 PM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>

this goes in postbit and postbit_legacy if you use it.
Reply With Quote
  #3  
Old 03-19-2007, 09:19 PM
Masked Crusader Masked Crusader is offline
 
Join Date: Oct 2005
Location: Sacramento, CA, USA
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<div class="pbitspacer"><div class="pbit" align="center">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
That is the code I have for the IM part of the postbit.

If you would read above, I stated that I had put a table around the icons. If those $post values do not pose true, then the table STILL appears.

I need an IF statement for the table.
Reply With Quote
  #4  
Old 03-19-2007, 09:22 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its not an <if> conditional you should be using. If I understand what you are needing done, you need to use <else />
Reply With Quote
  #5  
Old 03-19-2007, 09:46 PM
Masked Crusader Masked Crusader is offline
 
Join Date: Oct 2005
Location: Sacramento, CA, USA
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I use an <else /> statement without an <if> statement...they are layered programming commands.

Seems like I should just not put a table there...lol
Reply With Quote
  #6  
Old 03-20-2007, 12:46 AM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="$post[aimicon]">table blah blah $post[aimicon] end table</if>
Reply With Quote
  #7  
Old 03-20-2007, 02:53 PM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But then the table won't show if there is no AIM info.

You'd have to do
Code:
<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]"><div class="pbitspacer"><div class="pbit" align="center">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></div></if>
And shane.... that code you posted. Where's the 2nd "</div>"?
Reply With Quote
  #8  
Old 03-08-2013, 07:44 AM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyway to get this working with vb4.20 ?

I tried the below code and it wont allow to save due to an error

<if condition="{vb:raw post.icqicon} OR {vb:raw post.aimicon} OR {vb:raw post.msnicon} OR {vb:raw post.yahooicon} OR {vb:raw post.skypeicon}">
<div class="imlinks">
<div class="post_field">
{vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
</div></div></if>
Reply With Quote
  #9  
Old 03-08-2013, 02:49 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vb4 its now <vb:if>...</vb:if> and you can't use the {vb: . . . } notation in conditions, you'd need to use $post['icqicon'] etc.
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 07:12 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.03992 seconds
  • Memory Usage 2,234KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete