Wp-Ecommerce and nextGen Gallery

For WordPress Users

  • If you have both nextGen and wp-shoppingcart installed but don’t have the gold cart files.
  • If you have nextGen and wp-shoppingcart installed and do have the gold cart files but don’t like the row of thumbs in the pop up thickbox window.
  • If you want to get the Full Size link back in the thickbox pop up window.
  • If you want the pop up images to get resized less in the thickbox pop up window.
  • If you prefer nextGen’s thickbox to wp-shoppingcart’s.

Having both plugins used to create a mess but the authors seem to have reached a compromise:if both plugins are detected,nextGen will *use wp-shoppingcart’s javascript(thickbox).

The Hard Way

Keeps the additional row of thumbs
I opened the wp-shoppingcart plugin folder in plugins and found in js, thickbox.js.
The structure looks like this:
wp-content/
plugins/
wp-shoppingcart/
js/
thickbox.js
I opened up the thickbox.js that nextGen supplies and found the code for the full-size link.

[javascript]"’ id=’TB_FullSize’ title=’Full Size’>Full Size</a>&nbsp;&nbsp;"[/javascript]

Then I opened thickbox.js in wp-shoppingcart/js and added it to the block which begins at line 189 and ends on line 191. If you aren’t comfortable splicing in code you can just paste this entire block from lines 189 to 191 in the file (the line numbers refer to the numbers in the .js file not this snippet)

[javascript]// TODO empty window content instead
jQuery("#TB_window").append("<a href=” id=’TB_ImageOff’ title=’Close’><img id=’TB_Image’ src=’"+url+"’ width=’"+imageWidth+"’ height=’"+imageHeight+"’ alt=’"+caption+"’/></a>" + "<div id=’TB_caption’>"+caption+"<div id=’TB_secondLine’>" + imageCount + "&nbsp;&nbsp;<a href=’" + url + "’ id=’TB_FullSize’ title=’Full Size’>Full Size</a>&nbsp;&nbsp;" + prev.html + next.html + "</div></div><div id=’TB_closeWindow’><a href=’#’ id=’TB_closeWindowButton’ title=’Close’>close</a></div>");
[/javascript]
Be sure to comment out the old block or just cut it
Optional other changes
Pop up images are resized too small. Thickbox.js resizes your images with our old friend math.
Stop it from resizing them too much by editing lines 110 to 111.
Original
[html]
var x = pagesize[0] – 150;
var y = pagesize[1] – 150;[/html]
Edited
[html]
var x = pagesize[0] – 50;
var y = pagesize[1] – 50;[/html]
I am not smarter than the people who wrote this resizing code, so act accordingly.

The Easy Way

But without that extra row of thumbs on the left
Because messing with thickbox.js can lead to trouble (if done wrong your pop ups won’t work) an alternative is uploading nextGen’s thickbox.css and thickbox.js to the wp-shoppingcart folder.
In the end that is what I did. I was very happy with the result. I always thought having the additional row of thumbs on the left of the pop up window was swanky but redundant. If you come to a page of thumbnail pictures do you really need even more thumbs in the actual pop up window?

Instinct
nextGen

These edits or file-switches will be wiped out when you upgrade.
*Apparently you can pick another effect besides thickbox like highslide or smoothbox in Gallery Options>>Effects tab.