Page 1 of 1

Advanced Thumbnail Popup Image Resize BBCode

Posted: 08 Mar 2010, 13:33
by Sir Xiradorn
Advanced Thumbnail Popup Image Resize BBCode

Author: Sir Xiradorn
Description: This BBCode will allow you to create thumbnails automatically with help of javascript. To see the full-size images, pop-ups can be invoked through a simple click on that.

BBcode:

Code: Select all

[advthumb]{URL}[/advthumb]
HTML:

Code: Select all

<!-- Adv_Thumb_resize_popup_Sir_Xiradorn -->
<a style="text-decoration: none; font-style: italic; font-size: 0.75em;" href="javascript:void(0)" onclick="window.open('{URL}', 'XCyberPopUp',  'width=500,height=500,resize=1,toolbar=0,scrollbars=1,screenX=200,screenY=200,left=200,top=200')"><img onload="tempWidth=this.width; tempHeight=this.height; if(tempWidth>201||tempHeight>201) {if(tempWidth>tempHeight) {tempHeight=tempHeight*201/tempWidth;tempWidth=201} else {tempWidth=tempWidth*201/tempHeight;tempHeight=201}}; this.width=tempWidth; this.height=tempHeight;" src="{URL}" alt="{L_IMAGE}" /></a>
<!-- Adv_Thumb_resize_popup_Sir_Xiradorn -->
Example:

Code: Select all

[advthumb]http://a.imagehost.org/0012/evamendes.jpg[/advthumb]
Demo:
http://xiradorn.it/forum/viewtopic.php?f=36&t=114