Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. It needs the image filename and not a url. The php function getimagesize works for files in the systems filesystem. But why do you not use the $image->width and $image->height properties when you already have the $pageimage object. Why invoking an additional call to an external function when all you want to know is already there?
  2. Yep!!! ? I'm not sure. Maybe I haven't use this function in the last 5 years. I will try to look at it in the next days.
  3. This was a try to automatically detect the colors and hue and create a grayscale watermark text. A full file path to a TTF-fontfile can be passed as param to the function. Here you can read about the function in general:
  4. At first: Please look at the settings for this CKE field(s). There are checkboxes for showing or removing images without view access for guests. Second: check the access rights for (repeater)templates and its containing image fields!
  5. yep, it stores them as regular pageimage variations and you can remove them by hand when opening "variations" in an image inputfield. You also can remove them by calling the core method $image->removeVariations(), but this also removes other variations like the adminThumbnail and maybe variations from CKE-fields and others. Therefore there is the pim2Load('ALIAS')->removePimVariations(), so that you can remove only the pimvariations for that specific alias name. If you are in experimental mode with pim2, you have the option to load it with a second param (called $forceRecreation in the API page) that automatically refreshes this single variation. If you use a specific options array as second param with pim2Load(), you can set $forceRecreation as third param. ? $image->pim2Load('wm', true)-> ...
  6. It is working as expected since the positioning first was implemented. Here is the announcement post: There is also a tip and a photoshop action for download available in the second post of the thread. Do you use lowercase? https://github.com/horst-n/PageImageManipulator/blob/master/ImageManipulator02.class.php#L151-L162 If not please try with lowercase and report back. ------ No there are no API differences, only the opening method is different: $image->pimLoad() becomes $image->pim2Load(). Thats all. I changed the title of the first post for more clarity.
  7. With the module PageimageManipulator you can find a description for "watermarkLogo" that will result in a code like this in your template file: $frame = $pages->get('/settings/')->watermark; foreach($images as $image) { $wmImage = $image->pim2Load('wm', ['quality'=>100, 'sharpening'=>'none', 'defaultGamma'=>-1])->watermarkLogo($frame, $position='NW', $padding=1.5)->pimSave(); // do something with $wmImage } You can find the API explained here (look out for watermarkLogo): And there is a post about simple text here: https://processwire.com/talk/topic/4264-page-image-manipulator-1/?tab=comments#comment-41989 But if you want to use simple text on the images, it would be better not to use my module. Instead try Ukyos avbImage! There is more and better support for simple text watermarks:
  8. NAMESPACE - NAMESPACE - NAMESPACE - NAMESPACE ? <?php namespace ProcessWire;
  9. Looks to me that we always have to provide a template object and not a templates name when not in template file scope. The reason why this is working in template file scope may have to do with some extra work and attention of pw behind the scenes in template file scope. (like outputformatting etc.) But this is only my intuitive idea, no valid technical description. ?
  10. Have you also checked the entries in the root .htaccess file, if they are correct?
  11. Let all your code you need to run twice in the root of _init.php. Wrap all other, like the include_once of the _functions.php into a superglobal var condition, or, if the include of the _functions.php is the only issue you have, you can wrap this in a condition with function_exists: if(!function_exists("aFunctionNameThatExistsInFunctionsPhp")) include(__DIR__ . "/_functions.php");
  12. Ok, maybe scoping is what is in the way. Try setting as $GLOBALS["alreadyExecuted"].
  13. Maybe this does not work (I'm on mobile), but have you tried to set a var in _init.php like this: if(isset($alreadyExecuted) && $alreadyExecuted) return; $alreadyExecuted = true; // set it in the first run. EDIT: Or bind the include of _functions.php on the condition of the var.
  14. Its coming in Safari and iOS-Safari https://caniuse.com/?search=webp%20image versions 14 TP and 14
  15. https://jakearchibald.com/2020/avif-has-landed/
  16. Maybe a bit OT: with which php version is the script processed, and which set of modules are enabled for the php processor? Is it the same version the webserver is running on?
  17. if you are in PHP scope here, you cannot use the dot ($file.download()) but need to use -> for $file->download()
  18. Just a thought: How do you overwrite the files? Do you pass them through the UI mask in admin? If yes, have you set the file field in the system template for translations to be allowed to override existing files on upload? If I remember right, I once had to do that in a similar situation, (but not sure).
  19. The date field has HTML markup wrapped around the date. Can you make a csv file that has the blank datefield? Like with the PHP function strip_tags(), so that you only have the 22/10/2012 as values.
  20. Uh, how ugly! - Every your settings are looking good. I believe there is no possible solution within the imagesizer itself. Whats about uploading a bigger original image and don't use / allow upscaling?
  21. Which PHP / GD version? What are your settings for the image sizer in the site/config.php ? Have you changed the default settings (contained in wire/config.php)? You may experiment with these settings: 'defaultGamma' => -1, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) 'defaultGamma' => 2.2, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0)
  22. Has your root .htaccess file made it through the FTP program into the online host? Please double check if it is in place there. Some FTP programs have filters that hide and exclude dot files from transfers per default.
  23. No, but have you tried to set the page status to be unpublished, save it, then delete it?
×
×
  • Create New...