News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

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