not possible (or better: it's not possible without modifying core code and some more heat on the server -> 1 more query per thumb)
in functions.inc.php find (within function display_thumbnails):
if you use the modpack
$thumb_list[$i]['pheight'] = $row['pheight'];
if you use a standard coppermine
$thumb_list[$i]['aid'] = $row['aid'];
below add
//photo_shop plugin hook
$thumb_list[$i] = CPGPluginAPI::filter('display_thumbs',$thumb_list[$i]);
in the plugins codebase.php find
// Some filters
$thisplugin->add_filter('thumb_list','photoshop_add_item');
below add
(this is the slightly modified function for displaying the add item dropdown on the intermediate view and the filter call)
$thisplugin->add_filter('display_thumbs','photoshop_thumb_add_item');
//add an item to the cart while viewing the thumb list
function photoshop_thumb_add_item($pic_data){
global $CONFIG, $SHOP_CONFIG, $lang_photoshop, $album;
$html = "";
$added = "";
$event = isset($_POST['event']) ? $_POST['event'] : null;
//price override
//if the shop is disabled to show for that album we return $pic_data
//also we check if an override price is set
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_PRICES']} WHERE aid={$pic_data['aid']}");
while ($temp_data = mysql_fetch_array($results)) {
if($temp_data['gid']=='-1') return $pic_data;
$SHOP_CONFIG[$temp_data['gid']]['price']=$temp_data['price'];
}
mysql_free_result($results);
switch ($event) {
case 'add_item':
if(isset($_POST['pid']))
$added = '<center><font color="red">'.$lang_photoshop['added']."!</font></center>";
$duplicate=photoshop_deep_in_array($_POST['pid'],$_POST['item_id'],$_SESSION['photoshop']['cart']);//search array if item is already in cart.. then ++ amount of that item
if(is_numeric($duplicate)){ // only add 1 item if it's for the CD
if ($_SESSION['photoshop']['cart'][$duplicate]['id'] != "CD"){
++$_SESSION['photoshop']['cart'][$duplicate]['amount'];
} else {
//break;
}
} else {
$_SESSION['photoshop']['cart'][] = array(
'pid' => $_POST['pid'],
'id' => $_POST['item_id'],
'amount' => '1',
'aid' => $pic_data['aid'],
);
}
$cookie_data = base64_encode(serialize($_SESSION['photoshop']['cart']));
setcookie($CONFIG['cookie_name'] . '_cart', $cookie_data, time() + 86400 * 30, $CONFIG['cookie_path']);
break;
}
//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 = "thumbnails.php?album={$pic_data['aid']}" : $referer = null;
$shop_data = <<<EOT
<table class="shop_table">
<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>
</table>
EOT;
$pic_data['caption'] = $shop_data.$pic_data['caption'];
$referer = ($_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
if ($added) {
//this is not nice.. but the menu updates before the content. So if you add an item, the basket count can't match
// -> we have to refresh the page twice... can be removed but than the counter is wrong till the user manually reloads
photoshop_refresh($referer);
echo $added; // redundant ... while refreshing display 'item added'
exit;
}
return $pic_data;
}