Results 1 to 3 of 3

Thread: Reduce images width

  1. #1
    Join Date
    Apr 2008
    Posts
    586

    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

  2. #2
    Join Date
    Jan 2008
    Posts
    644

    Re: Reduce images width

    So where does this come in use! Reduce size of images, but in what.

  3. #3
    Join Date
    Jun 2006
    Posts
    623

    Re: Reduce images width

    I think the code is about reducing the images size on the web pages.

Similar Threads

  1. Can’t reduce width of Taskbar in windows 7 system
    By dUCK-yOUNG in forum Operating Systems
    Replies: 6
    Last Post: 03-12-2010, 11:40 PM
  2. CSS width not working in Firefox
    By Transporter in forum Software Development
    Replies: 5
    Last Post: 29-12-2009, 06:06 PM
  3. MAX width and max height of a image using css
    By Rutajit in forum Software Development
    Replies: 2
    Last Post: 22-05-2009, 07:30 PM
  4. How do I know the width of an element through javascript?
    By Conner in forum Software Development
    Replies: 3
    Last Post: 06-04-2009, 11:29 AM
  5. Problem with IE7 width margin
    By Dharmesh Arora in forum Technology & Internet
    Replies: 2
    Last Post: 19-03-2009, 03:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,385,021.99514 seconds with 16 queries