PDA

View Full Version : radio button with three options


harmor19
01-09-2006, 10:01 PM
is there a function to have three options per radio button?
This is for the admincp btw

peterska2
01-09-2006, 10:12 PM
Yeah coz some of the ACP settings already do.

Take a look at this one for example

<setting varname="quickreply" displayorder="10">
<datatype>number</datatype>
<optioncode><![CDATA[<div class=\"smallfont\"><label for=\"qr0\"><input type=\"radio\" name=\"setting[$settingid]\" id=\"qr0\" value=\"0\" tabindex=\"1\"" . ($setting['value'] == 0 ? ' checked="checked"' : '') . " />$vbphrase[no]</label></div>
<div class=\"smallfont\"><label for=\"qr1\"><input type=\"radio\" name=\"setting[$settingid]\" id=\"qr1\" value=\"1\" tabindex=\"1\"" . ($setting['value'] == 1 ? ' checked="checked"' : '') . " />$vbphrase[yes] - $vbphrase[qr_click_not_required]</label></div>
<div class=\"smallfont\"><label for=\"qr2\"><input type=\"radio\" name=\"setting[$settingid]\" id=\"qr2\" value=\"2\" tabindex=\"1\"" . ($setting['value'] == 2 ? ' checked="checked"' : '') . " />$vbphrase[yes] - $vbphrase[qr_click_required]</label></div>]]></optioncode>
<defaultvalue>2</defaultvalue>
</setting>

I guess you can figure it from there :)

harmor19
01-09-2006, 10:23 PM
My mom is on the computer that has my test vb so I'll have to wait for her to get off.
I'll look into it more later on.
Hopefully I can add the new feature to my hack and write the upgrade files tonight.

lightwave
02-28-2006, 09:27 PM
Uhm... sorry for the newb question... but how do I call that in my code then? ^^;;

if($vbulletin->options['settings_name'] == 0){
^ I assume like that.

PS: this is my first edit of a plugin.. so bare with me :p


While I'm at it, how do I create a text box?... like for a file path.