vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Image Attachment Processor (https://vborg.vbsupport.ru/showthread.php?t=48430)

Axe 02-02-2003 06:24 AM

Image Attachment Processor
 
1 Attachment(s)
Is there a way to process image files (.jpg, .gif, .png) that are attached to posts?

Basically, we're running PhotoPost and all images uploaded to it get tagged by "Hosted by ReptileRap.com" across the bottom of the image (see attached piccy).

Is there a way to get vBulletin to run uploaded images through ImageMagick so I can perform the same process on those?

Xenon 02-19-2003 01:09 PM

hmm i don't know that ImageMagick

but i think it shouldn't be to hard..

in admin/functions.php this function:
Code:

// ###################### Start acceptupload #######################
function acceptupload($moderate=0) {

i think you have to add that parsethrough part here:
PHP Code:

    if ($extension=="gif" or $extension=="jpg" or $extension=="jpeg" or $extension=="jpe" or $extension=="png" or $extension=="swf") { // Picture file
      
if ($imginfo=@getimagesize($attachment)) {
        if ((
$maxattachwidth>and $imginfo[0]>$maxattachwidth) or ($maxattachheight>and $imginfo[1]>$maxattachheight)) {
          @
unlink($attachment);
          eval(
"standarderror(\"".gettemplate("error_attachbaddimensions")."\");");
        }
        if (!
$imginfo[2]) {
           @
unlink($attachment);
           eval(
"standarderror(\"".gettemplate("error_avatarnotimage")."\");");
        }
      } elseif (
or !$allowimgsizefailure) {
          @
unlink($attachment);
          eval(
"standarderror(\"".gettemplate("error_avatarnotimage")."\");");
      }
    } 

directly before the last }


All times are GMT. The time now is 07:05 PM.

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.01047 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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