Skip to content

plugin/uploader resize and logo add #89

Description

@SeditioCMS

Uploader.ajax find

$disp_errors = '';

add below

$naddlogo = sed_import('naddlogo','P','BOL');
$naddlogo = ($naddlogo) ? 0 : 1;
$nresize = sed_import('nresize','P','BOL');
$nresize = ($nresize) ? 0 : 1;

Find
@chmod($cfg['pfs_dir'].$filename, 0644);

add on top

`if ($nresize && in_array($f_extension, $cfg['gd_supported']) && $cfg['gallery_imgmaxwidth'] > 0)
{
sed_image_resize($cfg['pfs_dir'].$u_sqlname.$u_name, $cfg['pfs_dir'].$u_sqlname.$u_name, $cfg['gallery_imgmaxwidth'], $f_extension, $cfg['gallery_logojpegqual']);
}

		if ($naddlogo && in_array($f_extension, $cfg['gd_supported']) && !empty($cfg['gallery_logofile']) && @file_exists($cfg['gallery_logofile']))
				{
					$img2_dotpos = mb_strrpos($cfg['gallery_logofile'], ".") + 1;          
					$img2_extension = mb_substr($cfg['gallery_logofile'], $img2_dotpos, 5);
					sed_image_merge($cfg['pfs_dir'].$u_sqlname.$u_name, $f_extension, $cfg['gallery_logofile'], $img2_extension, $img2_x, $img2_y, $cfg['gallery_logopos'], $cfg['gallery_logotrsp'], $cfg['gallery_logojpegqual']);
				}`

Save
Image resizing and logo adding was done

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions