The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I did a postbit_legacy change this morning to recreate member social networking and related hobby site accounts to their profile on my site.
In this, I added "Find me on:" which will then show all of the social accounts However, I don't want the "Find me on:" to appear if they choose to not provide anything. SO, I did add the following, and tied it to one of the profile fields used for this Code:
<vb:if condition="$post['field32']"> <B><SIZE=5>Find me on:<br /></B><?SIZE></vb:if> The problem is if they dont link their Twitter account (Field32 on my site), the verbiage does not appear Thus, my thinking on using an OR condition with the fields, but I am not 100% sure if I can array this in the following manner Code:
<vb:if condition="in_array($post['field'], array(32,X,Y))"> |
#2
|
|||
|
|||
![]()
So you want to check if field32 is filled in or not?
Simply use <vb:if condition="!empty($post['field32'])">not empty</vb:if> |
#3
|
|||
|
|||
![]()
I have at this point 10 fields that I would want to do this same check for... though in thinking about this, it might be best to only tie this to a single field or 2.
|
#4
|
|||
|
|||
![]()
You'd have to use the !empty check for each one of those individually in order to do what you want. The in_array function you showed in your example checks if $post['field'][32] exists which makes no sense so that cannot be used.
|
Благодарность от: | ||
scottkoz20 |
#5
|
|||
|
|||
![]()
Thanks Dave - i figured the array was not the correct method for this.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|