In Wp-includes/js/thickbox/thickbox.js about 39 lines of function Tb_show (caption, URL, imagegroup), add the following line (bold red word means the newly added code)
Copy Code code as follows:
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>";
}
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 & Lt;/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 & Lt;/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 ...
Effect:
After clicking "View Original Image", the original image will be displayed in the new browser window (TAB).
Author: elf Sundae (small confused)