Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 10 Jan 2019, 18:14
iHunterJ iHunterJ is offline
 
Join Date: May 2014
Hiding stuff if custom profile field is empty?

Hi. I have a script which is for certain usergroups as demonstrated in this code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I want it to be hidden if 'field9' is empty, but can't work out how to do it.

What code would I need to be using?

TIA.
Reply With Quote
  #2  
Old 10 Jan 2019, 19:18
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

A condition like that should work to check if the field is an empty string or NULL.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 11 Jan 2019, 12:42
iHunterJ iHunterJ is offline
 
Join Date: May 2014
Originally Posted by Dave View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

A condition like that should work to check if the field is an empty string or NULL.
When I use this condition around my code it shows the following code if the field is empty, I want it to only show the corresponding code if the field isn't empty - any idea?
Reply With Quote
  #4  
Old 11 Jan 2019, 17:17
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Location: Lancashire, UK
Try this.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Better VB.org search
Reply With Quote
  #5  
Old 11 Jan 2019, 17:41
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Originally Posted by iHunterJ View Post
When I use this condition around my code it shows the following code if the field is empty, I want it to only show the corresponding code if the field isn't empty - any idea?
Just invert it like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Empty Profile Field Notification! 1.0.0 Stangsta vBulletin 3.5 Template Modifications 32 02 Nov 2006 05:36



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 23:51.

Layout Options | Width: Wide Color: