vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Show allowed image dimensions under "Attach file" (https://vborg.vbsupport.ru/showthread.php?t=34182)

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:
PHP Code:

<smallfont>Maximum file size$maxattachsize bytes 

after it add:

PHP Code:

<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.


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01717 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete