-
Reduce images width
This mod allows you to automatically reduce the size of the images posted so as not to unpack the graphics forum,
Code:
################################################## ############
# # MOD Title: Click Image Resize MOD
MOD # # Author: Sllohcin <staff@toynexus.org> (N / A) http://www.toynexus.org
# # MOD Description: This MOD resizes any images "inline" that are greater than a set width (default is 300px) so as to constrain them to the September said width (create a pseudo thumbnail). One may then 'click' the thumbnail to enlarge the image and then click it again to shrink it back. Any images that are smaller than the set width are not affected nor are any cursor changes applied to them. This only affects MOD images posted via the [IMG] tag.
# # MOD Version: 1.0.0
# #
# # Installation Level: (Easy)
# # Installation Time: 5 Minutes
# # Files To Edit: templates / subSilver / overall_header.tpl
# # Templates / subSilver / simple_header.tpl
# # Templates / subSilver / admin / page_header.tpl
# # Templates / subSilver / bbcode.tpl
# # Included Files: (N / A)
# # License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
################################################## ############
# # For security purposes, please check: http://www.phpbb.com/mods/
# # For the latest version of this MOD. Although MODS are checked
# # Before being allowed in the MODS Database there is no guarantee
# # That there are no security problems within the MOD. No support
# # Will be given for MODS not found within the database which MODS
# # Can be found at http://www.phpbb.com/mods/
################################################## ############
# # Author Notes:
# #
################################################## ############
# # MOD History:
# #
# # 2007-12-05 - Version 1.0,0
# #
################################################## ############
# # Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############
#
#-----[ OPEN ]----------------------------------------- --
#
templates / subSilver / overall_header.tpl
#
#-----[ FIND ]----------------------------------------- --
#
</ style>
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
. pointer (cursor: pointer; cursor: hand;)
#
#-----[ FIND ]----------------------------------------- --
#
</ head
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
<script type="text/javascript">
setImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
gotImage.className = 'pointer';
)
)
changeImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
return;
)
if (gotImage.width = 300) (
gotImage.removeAttribute ( 'width');
)
)
</ script>
#
#-----[ OPEN ]----------------------------------------- --
#
templates / subSilver / simple_header.tpl
#
#-----[ FIND ]----------------------------------------- --
#
</ style>
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
. pointer (cursor: pointer; cursor: hand;)
#
#-----[ FIND ]----------------------------------------- --
#
</ head
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
<script type="text/javascript">
setImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
gotImage.className = 'pointer';
)
)
changeImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
return;
)
if (gotImage.width = 300) (
gotImage.removeAttribute ( 'width');
)
)
</ script>
#
#-----[ OPEN ]----------------------------------------- --
#
templates / subSilver / admin / page_header.tpl
#
#-----[ FIND ]----------------------------------------- --
#
</ style>
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
. pointer (cursor: pointer; cursor: hand;)
#
#-----[ FIND ]----------------------------------------- --
#
</ head
#
#-----[ BEFORE, ADD ]--------------------------------------- ---
#
<script type="text/javascript">
setImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
gotImage.className = 'pointer';
)
)
changeImageDimensions function (gotImage)
(
if (gotImage.width> 300) (
gotImage.width = 300;
return;
)
if (gotImage.width = 300) (
gotImage.removeAttribute ( 'width');
)
)
</ script>
#
#-----[ OPEN ]----------------------------------------- --
#
templates / subSilver / bbcode.tpl
#
#-----[ FIND ]----------------------------------------- --
#
<! - BEGIN img ->
#
#-----[ IN-LINE FIND ]-------------------------------------- --
#
<img
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
onload = "setImageDimensions (this)" onclick = "changeImageDimensions (this)"
#
#-----[ SAVE / CLOSE ALL FILES ]------------------------------------- -----
#
# EOM
-
Re: Reduce images width
So where does this come in use! Reduce size of images, but in what.
-
Re: Reduce images width
I think the code is about reducing the images size on the web pages.
Page generated in 1,717,385,021.53296 seconds with 10 queries