Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - file upload max width size how to??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

file upload max width size how to??

 Post Reply Post Reply Page  123>
Author
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post Topic: file upload max width size how to??
    Posted: 19 July 2003 at 9:45am

When users upload pitures to my forum and the piture is lager that the forum it all messes up :(

So i would like to specefy a max width.. like you have whit the max size..

How can i do that...

Thx

        --= = Brown Ghost = =--
--= = International Man of Mystery = =--



Edited by BrownGhost
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2003 at 11:14am
Back to Top
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2003 at 8:37pm

thx.. how whould i code that in to the forum??

can you post the change i have to add.. ??

Thx

BG

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2003 at 9:52pm
You would add it to the file upload.

If I have time, I'll work on a MOD. I may take a couple days as I have other work to complete right now.
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2003 at 10:49pm
Another thing you could do is include this javascript on your header.asp


<script language="Javascript">
     function checkText()
     {
          if (document.images.length > 0)          //Has images, validate sizes
          {
               var imgHeight;
               var imgWidth;
               for (var loop = 0; loop < document.images.length; loop++)
               {
                    if (document.images[loop].name.substring(0,6) == 'chkImg')
                    {
                         imgWidth = document.images[loop].width;
                         imgHeight = document.images[loop].height;
                         
                         if (imgWidth > <% = intAvatarWidth %>)
                         {
                              document.images[loop].width = <% = intAvatarWidth %>;
                              //Proportionalize Height
                              imgHeight = imgHeight / (imgWidth/<% = intAvatarWidth %>);
                              document.images[loop].height = imgHeight;
                         }
                    }
               }
          }
     }
</script>


and then go on functions_format_post.asp and make it add the following to the <img src tags when formatting [IMG] tags: id="chkImg1" name="chkImg2" that will resize all images posted on your forum, not only the uploads but if the user links to an image it'll also resize it... you might also want to add a <br> at the beggining and the end of the image tags otherwise if the user types a long line of text and then the image it'll still brake up your tables...



Edited by fernan82
FeRnAN
Back to Top
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2003 at 2:46am

oki.. what will it rezile the image Width to ??

ware can i specefy the Width Size???

Thx BG

Back to Top
BrownGhost View Drop Down
Groupie
Groupie


Joined: 26 November 2002
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrownGhost Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2003 at 2:48am

ljamal

A mod sounds real good :))

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2003 at 10:39pm
Originally posted by BrownGhost BrownGhost wrote:

oki.. what will it rezile the image Width to ??

ware can i specefy the Width Size???

Thx BG

Sorry I forgot to include that on my post and sorry it took so long ... I just copied that from my forum..., just change the <% = intAvatarWidth %> to the max width you want to allow.

Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.