Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin/uploader resize and logo add #89

Open
SeditioCMS opened this issue Sep 16, 2023 · 0 comments
Open

plugin/uploader resize and logo add #89

SeditioCMS opened this issue Sep 16, 2023 · 0 comments

Comments

@SeditioCMS
Copy link

SeditioCMS commented Sep 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant