PDA

View Full Version : Show options


Adem GEN?
03-11-2009, 05:56 PM
Hello,

How can I select the show?

Admin CP:
96300

Forum page:
96301

How do I do this?

Admin CP "textarea" variable: option_list

I just want the php and html code, "Codes only to for show"

Thanks

TigerC10
03-11-2009, 06:39 PM
$options = explode("\n", $vbulletin->options['option_list']);

$output = '<select name="option_list">';
foreach( $options as $option ){
$output .='<option value="'.$option.'">'.$option.'</option>';
}
$output .='</select>';

echo $output;



The variable name "options_list" is a bad name, you should make it more unique like "mymod_options_list" where mymod is the name of your modification to the vBulletin code.

Adem GEN?
03-11-2009, 08:10 PM
Thank for help
But
Are not listed and One was during the "option1 option2 option3 option4"

The variable name, I have written sample, I'm using the unique

For test
<form method="POST">

$output

</form>Print: "option1 option2 option3 option4"

Print html:
<form method="POST">
<select name="soyadi_listesi"><option value="option1
option2
option3
option4">option1
option2
option3
option4</option></select>
</form>
--------------- Added 12 Mar 2009 at 01:22 ---------------

Okay,

Problem: explode('\n', $vbulletin -> explode("\n", $vbulletin


Thank you very much

TigerC10
03-11-2009, 11:03 PM
Whoops, didn't see that typo. I edited the post to be more correct. You're very welcome.

Adem GEN?
03-12-2009, 03:24 PM
Again Thank you very much