Photo Shop - tweak the dropdown chooser Photo Shop - tweak the dropdown chooser
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Photo Shop - tweak the dropdown chooser

Started by zac, November 04, 2007, 12:29:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zac

Hey there.. any ideas on how to go about changing the dropdown select chooser into another format, like checkboxes or radio buttons in a box containing all the print options?  Does this require a really major hack or could I just change the select to input elements ?  After nosing around in my typically clueless fashion I found this:


//loop through the items and create forms

$html .= "<select name=\"item_id\" class=\"listbox_lang\">";
foreach($SHOP_CONFIG as $key => $value) {
if ($value['type'] == 'photo') {
if ($value['price'] != 0) {
$html.="<option value=\"{$value['id']}\">{$value['name']} - {$lang_photoshop['USD']}{$value['price']}</option>";
}
} elseif ($value['type'] == 'cd') {
$cd = true;
}
}
$html .= ($cd) ? "<option value=\"CD\">{$lang_photoshop['CD']}</option>" : '';
$html .="</select>";

($album == 'search') ? $referer = "displayimage.php?pos=-{$pic_data['pid']}" : $referer = null;

$shop_data =  <<<EOT
<table class="shop_table">
<tr>
<td>&nbsp;</td></tr>
<tr>
<td>
<form action="{$referer}" method="post">
  {$added}{$lang_photoshop['buy']} {$html}
<input type="hidden" value="{$pic_data['pid']}" name="pid" />
<input type="hidden" value="add_item" name="event" />
    <input type="submit" value="{$lang_photoshop['send']}" class="comment_button" />
</form>
</td>
</tr>
<tr>
<td>&nbsp;</td></tr>
</table>




Am I warm?

Stramm