forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: zac on November 04, 2007, 12:29:02 am

Title: Photo Shop - tweak the dropdown chooser
Post by: zac on November 04, 2007, 12:29:02 am
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:

Code: [Select]
//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?
Title: Re: Photo Shop - tweak the dropdown chooser
Post by: Stramm on November 04, 2007, 08:22:25 am
hot