Page 1 of 1
Calguys Smart Image Toolkit use with multidomain
Posted: Tue Sep 03, 2024 1:54 pm
by map_1961
Hi coders.
As i use an cmsms install with MultiDomain module (helpful becvause not for every domain / page a new install is needed) i get o the issue that in module Calguys Module Extension i can place one Graphical Watermarks only - this has to be placed physicly in folder uploads.
Who has an idea how to make it selectable fitting to the spewcific domanin and content fpr the diferent domains hosted in the cmsms install with MultiDomains?
Thx MAP
Re: Calguys Smart Image Toolkit use with multidomain
Posted: Fri Sep 06, 2024 3:57 pm
by DIGI3
In theory you can have PHP logic within your config.php file, but I have no idea if or how well it would work. Also keep in mind that all CG modules have long been abandoned, so migrating to SmartImage and CMSMSExt would be advised.
Here's an untested thing you could experiment with in your config.php (I'm using CMSMSExt parameters but you can adjust if you're sticking with CG):
Code: Select all
if($_SERVER['SERVER_NAME'] == 'domain1.foo') {
$config['xt_watermark_file'] = 'watermark1.jpg';
} else {
$config['xt_watermark_file'] = 'watermark2.jpg';
}
I have no idea how well this will work with caching etc., it's just an idea to try. Consult the help for both modules to see what parameters you can use.
Re: Calguys Smart Image Toolkit use with multidomain
Posted: Fri Sep 06, 2024 7:03 pm
by map_1961
Thx.
I will try and report.
KR
MAP
[solved] Calguys Smart Image Toolkit use with multidomain
Posted: Fri May 02, 2025 4:43 pm
by map_1961
The way to do ist - based on the hint given in ere - is to make changes in the modules/CGExtension/class.watermakre.php like you see in the picture attached.
Cheers
MAP
Re: Calguys Smart Image Toolkit use with multidomain
Posted: Fri May 02, 2025 6:31 pm
by DIGI3
Normally we don't allow code changes in the forum as they don't maintain a connection to core or module version numbers. Because this is a long defunct module it's ok, but in future please put them on the Forge instead. You can always link to your Forge report in your forum post.