Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #91  
Old 25 Jun 2015, 20:26
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Since you didn't use the code tags, it looked like your code was not all on one-line, which it needs to be if you don't use the parenthesis.

You don't use that code for a radio button though. That code is for Multiple-Selection Menu and Multiple-Selection Checkbox profile fields. You need to use the code for For Single-Line Text Box, Multiple-Line Text Box, Single-Selection Radio Buttons, and Single-Selection Menu profile fields.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #92  
Old 09 Jul 2015, 23:44
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
Hi Lynne,

Is it possible to display a different image on the postbit depending on the option chosen on a single-selection menu?

Example: "What is your favourite colour?"
Red
Blue
Green
Orange

I've used method one but am suspecting that method two may actually be more suitable for this task.

Thank you in advance,

ProfC.
Reply With Quote
  #93  
Old 10 Jul 2015, 18:01
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You could use either template edits or a plugin to do what you want. In the examples I show, just replace 'Your 1rst option' with '<img src="image.png" alt="Red Image" height="xx" width="yy">'
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #94  
Old 10 Jul 2015, 18:25
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
Originally Posted by Lynne View Post
You could use either template edits or a plugin to do what you want. In the examples I show, just replace 'Your 1rst option' with '<img src="image.png" alt="Red Image" height="xx" width="yy">'
Thank you! I'll take a look and see what I get.
Reply With Quote
  #95  
Old 21 Jul 2015, 18:28
friendlymela's Avatar
friendlymela friendlymela is offline
 
Join Date: Dec 2012
Real name: Zeeshan Shams
Good advices thanks for share this
Reply With Quote
  #96  
Old 24 Jul 2015, 15:05
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
I'm having a bit of trouble somewhere with this. I decided to go the plugin method for multiple selection fields, as it seemed to offer the means to set different things to display based on the option selected. Unfortunately, I haven't been able to get any further than it displaying "house memberships" (the field name) on the postbit.

I'm not sure whether I've even used the right method or not but the "single selection menu" method didn't appear to have the options to display a different result based on what was selected in the profile menu.

Would it be possible for someone to tell me where I've gone wrong? (I get the sensation I'll be asking this a lot -sigh-) Thank you in advance

Plugin code:

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

Reply With Quote
  #97  
Old 24 Jul 2015, 15:22
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
You want to use "==" instead of "&" in your conditionals. However, might I suggest using a switch statement instead?


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

Reply With Quote
  #98  
Old 24 Jul 2015, 16:48
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
Thank you; although it appears I'm getting the same result using your version as I am with the one I added following the article.
Reply With Quote
  #99  
Old 24 Jul 2015, 17:46
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
What hook location are you using?
Reply With Quote
  #100  
Old 24 Jul 2015, 17:52
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
"postbit_display_complete" as mentioned in the article.
Reply With Quote
  #101  
Old 24 Jul 2015, 18:03
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Okay, try using the plugin code:


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

What do you get now?
Reply With Quote
  #102  
Old 24 Jul 2015, 18:13
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
"House Membership: Default", I have "Ravenclaw" selected in my profile. I edited my profile to leave it blank, and the field disappeared but upon changing it to Ravenclaw again, it went to "Default" on the postbit.
Reply With Quote
  #103  
Old 24 Jul 2015, 18:18
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Okay, it sounds to me that the value being stored in the variable $post['field17'] isn't what you are expecting.
Reply With Quote
  #104  
Old 24 Jul 2015, 18:43
ProfC's Avatar
ProfC ProfC is offline
 
Join Date: Jun 2011
It seems it.

I'm not sure what I may have done wrong. This is a screenshot of the profile field from the ACP.
Reply With Quote
  #105  
Old 24 Jul 2015, 19:25
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Okay, try this as your plugin code:


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

Reply With Quote
Reply



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

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 20:18.

Layout Options | Width: Wide Color: