vb.org Archive

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

TurkeySub 08-05-2009 12:31 PM

Postbit Editting
 
Hi Guys,

I am setting up this: https://vborg.vbsupport.ru/showthrea...light=postbit*

The trouble I have run into, is I would also like to have it around the ICQ, MSN, etc icons, however not everyone with have them.

So I am looking for a way to only show the div when they actually have one of the above on their account, that way I dont end up with a box with nothing in it.

Current code:
Code:

                                $template_hook[postbit_userinfo_right]
                                <div class="postinfo">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
                        </div>

I assume I am going to need a if statement, however that is the extent of my cosing knowledge, so any ideas?

THANKS!

Marco van Herwaarden 08-05-2009 12:46 PM

If you have questions/problems with a modification or style, then please post in the thread (or support forum/board) about that modification/style. Best chance to receive a reply from either the author or another member using the same modification/style.

TurkeySub 08-05-2009 01:12 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1861831)
If you have questions/problems with a modification or style, then please post in the thread (or support forum/board) about that modification/style. Best chance to receive a reply from either the author or another member using the same modification/style.

Its not a problem with a MOD or Style, it is a question on how I would create the if statement. The mod does not address this as they do not involve it.

Thanks!

Lynne 08-05-2009 02:30 PM

Something like this should work (not tested):
HTML Code:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]">
<div class="postinfo">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</if>


TurkeySub 08-05-2009 04:06 PM

Quote:

Originally Posted by Lynne (Post 1861925)
Something like this should work (not tested):
HTML Code:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon]">
<div class="postinfo">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</if>


That ended up throwing syntax error, thanks though!

Lynne 08-05-2009 04:15 PM

You may have to put single quotes around the variables in the condition, ie $post['icqicon'], or if you have a condition above that one, you may have to combine them.

TurkeySub 08-05-2009 04:34 PM

Quote:

Originally Posted by Lynne (Post 1861994)
You may have to put single quotes around the variables in the condition, ie $post['icqicon'], or if you have a condition above that one, you may have to combine them.

Thanks, I ended up with:
Code:

<if condition="'$post[icqicon]' OR '$post[aimicon]' OR '$post[msnicon]' OR '$post[yahooicon]' OR '$post[skypeicon]'">
<center><div class="postinfo">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></center>
</if>

Only problem is, the div is still being read even when none of the tested variables is present.

Lynne 08-05-2009 04:53 PM

If the div is still being read, then the condition is not working. Did you try what I suggested?


All times are GMT. The time now is 08:42 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.01075 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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