cinq
12-03-2003, 05:24 AM
Not a hack as no editting of PHP files are involved, though I'd like to share it.
What it does ?
When users link images, at times the images linked are a tad too big for your forum layout and spoils the look of the page.
This new bb code, provided the images are linked using this BB code, will allow smaller thumbnails to retain the layout of the page.
The image is not resized per se, it is just viewed as resized so that it would not spoil the page layout.
-------------------------------------------------------
Steps to perform
Add a new BB code ( AdminCP -> Custom vB Codes -> Add
vB Code tag
img2
vB Code replacement
<img src={param} border='2' onload="javascript:if(this.width>screen.width-600){ this.height=Math.round(((screen.width-600)/this.width)*this.height); this.width=(screen.width-600);}" onclick="javascript:window.open('{param}','','scrollbars=1' )"/>
<br><smallfont> * Image resized. Click on image to view full size.</smallfont><br>
vB Code example
http://www.yoursite.com/forum/images/banner.jpg
Use {option} ?
Select No.
-------------------------------------------------------
Notes:
Thumbnail sizing is proportionate. It can be changed by altering the value 600 in the code replacement bit.
-------------------------------------------------------
Hope this proves useful. :)
What it does ?
When users link images, at times the images linked are a tad too big for your forum layout and spoils the look of the page.
This new bb code, provided the images are linked using this BB code, will allow smaller thumbnails to retain the layout of the page.
The image is not resized per se, it is just viewed as resized so that it would not spoil the page layout.
-------------------------------------------------------
Steps to perform
Add a new BB code ( AdminCP -> Custom vB Codes -> Add
vB Code tag
img2
vB Code replacement
<img src={param} border='2' onload="javascript:if(this.width>screen.width-600){ this.height=Math.round(((screen.width-600)/this.width)*this.height); this.width=(screen.width-600);}" onclick="javascript:window.open('{param}','','scrollbars=1' )"/>
<br><smallfont> * Image resized. Click on image to view full size.</smallfont><br>
vB Code example
http://www.yoursite.com/forum/images/banner.jpg
Use {option} ?
Select No.
-------------------------------------------------------
Notes:
Thumbnail sizing is proportionate. It can be changed by altering the value 600 in the code replacement bit.
-------------------------------------------------------
Hope this proves useful. :)