PDA

View Full Version : Show allowed image dimensions under "Attach file"


mvigod
01-16-2002, 07:33 PM
This is what I call a "micro" hack. It does just what the title says and lets users know the maximum image dimensions (along with the maximum file size which is already there) that they are permitted to upload. It takes the dimensions from whatever you have set them to in your admin control panel

It requires one template hack and about 30 seconds.

INSTRUCTIONS:

Go to template "newpost_attachment"

Find: <smallfont>Maximum file size: $maxattachsize bytes

after it add:

<br>
Max width $maxattachwidth pixels X Max Height $maxattachheight pixels

That's it!

Once done when a user goes to post they will see the maximum file size permitted for an attachment and below it the maximum allowed height and width in pixels for an uploaded image.

Marc

nafae
01-16-2002, 09:40 PM
Adding it now :) Looks useful, especially with tommy boy's hack add attachment on edit... AND fireflys hack... so many good hacks! :china:

Lucky
01-17-2002, 10:55 AM
Good one.

Shenlong
01-18-2002, 10:37 AM
good microhack! thanx

Lesane
01-18-2002, 04:38 PM
Nice template modification, thanks.