WordPress thickbox Add "view artwork" effect code
function Tb_show (caption, URL, imagegroup) {//function Called when the user clicks on a thickbox link
try {
Code omitted ...
tb_nexthtml = "";
Tb_imagecount = "";
Tb_foundurl = false;
Open a new window to display the original artwork
tb_opennewhtml = "";
if (imagegroup) {
///code omitted ...
if (tb_foundurl) {
Tb_nextcaption = Tb_temparray[tb_counter].title;
Tb_nexturl = tb_temparray[tb_counter].href;
tb_nexthtml = "<span id= ' Tb_next ' > <a href= ' # ' >" +thickboxl10n.next+ "</a></span>";
} else {
Tb_prevcaption = Tb_temparray[tb_counter].title;
Tb_prevurl = tb_temparray[tb_counter].href;
tb_prevhtml = "<span id= ' Tb_prev ' > <a href= ' # ' >" +thickboxl10n.prev+ "</a></span>";
}
//////opens a new window to display the original image
Tb_opennewhtml = "<span style= ' font-size:11pt ' > <a href= '" +url+ "' target= ' _bla NK ' style= ' color:red ' > View original artwork </a></span> ';
} else {
Tb_foundurl = true;
Tb_imagecount = thickboxl10n.image + ' + (Tb_counter + 1) + ' + thickboxl10n.of + ' + (tb_temparray.length);
Open a new window to display the original artwork
tb_opennewhtml = "<span style= ' font-size:11pt ' > <a href= '" +url+ ' ' target= ' _blank ' style= ' "color:red ' > View original image </a></span> ";
}
}
}
}
Code omitted ...
Resizing large images-orginal by Christian Montoya by me.
Code omitted ...
End resizing
Tb_width = ImageWidth + 30;
Tb_height = ImageHeight + 60;
jquery ("#tb_window"). Append ("<a href=" id= ' Tb_imageoff ' title= ' "+thickboxl10n.close+" ' ></a> ' "+" <div id= ' Tb_caption ' > ' +caption+ ' <div id= ' tb_secondline ' > ' + tb_imagecount + tb_prevhtml + tb_nexthtml + ' </div>& Lt;/div><div id= ' Tb_closewindow ' ><a href= ' id= ' Tb_closewindowbutton ' title= ' +thickboxl10n.close+ ' ></a></div> ");
Show next picture + new Window view artwork (add tb_opennewhtml)
jquery ("#tb_window"). Append ("<a href=" id= ' tb_nextimage ' title= ' "+thickboxl10n.next+" ' ></a> ' "+" <div id= ' Tb_caption ' > ' +caption+ ' <div id= ' tb_secondline ' > ' + tb_imagecount + tb_prevhtml + tb_nexthtml + tb_opennewhtml + "</div></div><div id= ' Tb_closewindow ' ><a href= ' # ' id= ' Tb_closewindowbutton ' title= '" "+ Thickboxl10n.close+ "' ></a></div>");
jquery ("#tb_closewindowbutton"). Click (Tb_remove);
if (!) ( tb_prevhtml = = "")) {
Code omitted ...