[Released] Resize posted images

Do you like it?

yes
1
100%
no
0
No votes
 
Total votes : 1

[Released] Resize posted images

Postby Admin on Sat Apr 26, 2008 10:40 pm

MOD Title: Resize posted images

MOD Author: fiorefrank

MOD Description: This MOD resize images and open them in a new popup window.

MOD Version: 0.1.0

Phpbb versions : 3.0.0 and 3.0.1

Demo : look images here --> viewtopic.php?f=12&t=71

Code: Select all
-----[ OPEN ]------------------------------------------

    styles/prosilver/template/overall_header.html

-----[ FIND ]------------------------------------------
<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>


-----[ AFTER , ADD ]------------------------------------------
    <script>
    window.onload = resizeimg;
    function resizeimg()
    {
       if (document.getElementsByTagName)
       {
          for (i=0; i<document.getElementsByTagName('img').length; i++)
          {
             im = document.getElementsByTagName('img')[i];
             if (im.width > 700)
             {
                im.style.width = '700px';
                eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=500,height=500,scrollbars=1,resizable=1'); pop.focus();\")");
                eval("im.onclick = pop" + String(i) + ";");
                if (document.all) im.style.cursor = 'hand';
                if (!document.all) im.style.cursor = 'pointer';
                im.title = 'Click Here To See Image Full Size ';
             }
          }
       }
    }
    </script>
we don't see things like they are but we see them like we are
User avatar
Admin
Site Admin
Site Admin
 
Posts: 113
Joined: Wed Mar 05, 2008 6:31 am
Location: Internet
Highscores: 6

google adsense
Google
 

Return to MOD Reviews

Who is online

Users browsing this forum: No registered users and 0 guests

cron