Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Photo Shop - tweak the dropdown chooser  (Read 3413 times)

0 Members and 1 Guest are viewing this topic.

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Photo Shop - tweak the dropdown chooser
« 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?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Photo Shop - tweak the dropdown chooser
« Reply #1 on: November 04, 2007, 08:22:25 am »

hot
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.