First I want to say thank you for a clean nice module, loving it so far and can't wait to get it on my server.
I have been playing with it on a test server and is fairly close to what I'm looking for.
I had a need to make sure all photos are watermarked, and also the ability to add a custom watermark as it basically already does except there is not a default per say. So what I have done is added so that Watermarks in images/phocagallery would be default in all subfolders unless the folder has watermark files in it and it will use those. It works for my needs, maybe some others or maybe not. I do okay with PHP but it's not my strong suit, but I thought I would share just in case it's usefull and maybe someone can point out a more appropriate way to code it.
Info:
Phoca Gallery Version: 2.2.3 beta
My changes start at Line 819 in file administrator/components/com_phocagallery/helpers/phocagallery.php
Code: Select all
$fileName = PhocaGalleryHelper::getTitleFromFilenameWithExt ($file_in);
// ****Corey add default watermark in image root dir****
// If watermark is in current directory use it else use default
$path=JPATH_ROOT.DS.'images'.DS.'phocagallery';
$fileWatermarkMedium = str_replace($fileName, 'watermark-medium.png', $file_in);
$fileWatermarkLarge = str_replace($fileName, 'watermark-large.png', $file_in);
clearstatcache();
// Which Watermark will be used
if ($thumbnailMedium) {
if (file_exists($fileWatermarkMedium)) {
$fileWatermark = $fileWatermarkMedium
} else {
$fileWatermark = $path.DS.'watermark-medium.png';
}
} else if ($thumbnailLarge) {
if (file_exists($fileWatermarkLarge)) {
$fileWatermark = $fileWatermarkLarge
} else {
$fileWatermark = $path.DS.'watermark-large.png';
}
} else {
$fileWatermark = '';
}


