vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   IF Statement For IM Icons In Postbit (https://vborg.vbsupport.ru/showthread.php?t=142534)

Masked Crusader 03-19-2007 06:24 PM

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.

Kungfu 03-19-2007 08:16 PM

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

this goes in postbit and postbit_legacy if you use it.

Masked Crusader 03-19-2007 09:19 PM

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.

HMBeaty 03-19-2007 09:22 PM

Its not an <if> conditional you should be using. If I understand what you are needing done, you need to use <else />

Masked Crusader 03-19-2007 09:46 PM

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

Kungfu 03-20-2007 12:46 AM

<if condition="$post[aimicon]">table blah blah $post[aimicon] end table</if>

TheMilkCarton 03-20-2007 02:53 PM

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>"? :)

Raptor 03-08-2013 07:44 AM

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>

squidsk 03-08-2013 02:49 PM

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.


All times are GMT. The time now is 11:44 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.02824 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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