Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. if you are in PHP scope here, you cannot use the dot ($file.download()) but need to use -> for $file->download()
  2. Yes, this is what I meant.
  3. 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).
  4. 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.
  5. 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?
  6. 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)
  7. 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.
  8. No, but have you tried to set the page status to be unpublished, save it, then delete it?
  9. @ryan there is still one of my very first PW projects, the MP3-DB site profile, which doesn't work with any PW 3 version (or newer PHP versions ?). I've been wanting to put the essence of it into a module for quite some time, so that one can add MP3-DB support to any existing site with ease. It seems that I'm getting a bit closer to the goal thanks to your new features, because it will be much less work if partial file delivery and delivery of specific byte ranges and seeking is now natively supported by PW! ? When starting with it (maybe around christmas this year), I will contact you before.
  10. Working fine from here, germany, via hoster netcologne and also routed over different IPs via VPNs like PureVPN and CyberGhost. @clsource and btw, nice work! ?
  11. You first must enable / allow the upload and processing of zip files in the images inputfield settings screen!
  12. As a workaround on servers that behave like that, you may wrap your images into a single ZIP archive for a single file upload.
  13. Looks like ImportPagesCSVData is null or empty here, when an array or countable object is expected. Have you checked that your data import results in more then 0 valid records?
  14. Do you have enabled the Imagemagick rendering engine in PW? You also may set strictly use the webp variation, also if the jpeg or png source is smaller in filesize. This is not often the case, but its possible. site/config.php: $config->webpOptions = array_merge($config->webpOptions, [ 'quality' => 84, 'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) 'useSrcUrlOnSize' => false, // Fallback to source file URL when webp file is larger than source? 'useSrcUrlOnFail' => true // Fallback to source file URL when webp file fails for some reason? ]);
  15. @NooseLadder ... or you take the easy way and get you a full copy of Laragon! It has everything you may need or not. Including One-Click-SSL-Certificates in your local dev environment to use and test full https protocol. And much more. ? see what others mean: site:processwire.com/talk laragon
  16. See Line #7 in your Errorlog: site/modules/LoginRe ... gister
  17. Maybe you can wrap a output buffer around it, (in a site/_main.php) ? ob_start(); // do all your template and include code // and finally flush it to the browser all at once: echo ob_get_clean();
  18. To be honest: I don't know. I don't know why you have this, and I don't know how to change this. ?
  19. I think in its basic it can be something like https://www.php.net/manual/en/class.splobserver.php ?
  20. Yep, too much freedom can be a big burden. ?
  21. The "processwirish way", IMO, is called hooking. Therefore the originals modules author need to add three underscores to a method name: "___myMethodName()". This method than can be hooked and its output changed. Joshua, if you would add three underscores to the public render() method, I think its all done. @The G then should be able to hook in (before or after) and changes the output the way he likes to. In this case it seems like a small autoloaded custom module should fit: class MyCustomModule extends WireData implements Module { public static function getModuleInfo() { return [ 'title' => "MyCustomModule", 'summary' => "Customizes the output of PrivacyWire module", 'version' => "0.0.1", 'autoload' => true, 'singular' => true, 'requires' => [ "PrivacyWire", "PHP>=7.2", "ProcessWire>=3.0.0" ], 'icon' => 'cookie' ]; } public function ready() { $this->addHookBefore('PrivacyWire::render', $this, 'customRender'); } public function customRender(HookEvent $event) { // do your changes or complete override here // ... $myCustomOutput = $this->myHelperMethod(); $event->return = $myCustomOutput; } protected function myHelperMethod() { return 'something'; } } Not tested and I'm currently not perfect sure if its better to hook in before or after. (I think before, but you need to test it) TL;DR Other scenarios may be that the original modules author adds special hooking methods where an output finally is passed through. This function then optionally can be used for changes. // in PrivacyWire public function render(HookEvent $event) { ... $output = 'something'; $output = $this->finalizeOutput($output, $event); $event->return = $output; } public function ___finalizeOutput($output, $origEvent) { return str_replace("</body>", "{$output}</body>", $origEvent->return); } // in another module or site/ready.php, addHookAfter PrivacyWire::finalizeOutput
  22. If you need redirecting to the final domain name, you may have a look to this snippet. But you have to add it manually somewhere in the top of your root .htaccess file. ################################################################################ # Domain-Namen erzwingen # <IfModule mod_rewrite.c> RewriteEngine On AddDefaultCharset UTF-8 RewriteCond %{HTTP_HOST} ^example\.com [OR] RewriteCond %{HTTP_HOST} ^example-variation\.com [OR] RewriteCond %{HTTP_HOST} ^www\.example-variation\.com RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301] RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> # ################################################################################
  23. @teppo You already got setup by Kixe and Robin. So, only thing that I can contribute is, if you are using this in an environment that allows overwriting existing files with same filename, you should bind a check of last modified timestamps into your program logic: If fileFieldItem is image and not thumbnail exists: create a thumbnail If fileFieldItem is image and not thumbnail exists OR if origTimestamp is newer than thumbnailTimestamp: create a (new) thumbnail
  24. I think you have to hook into Page::viewable, then detect if user has role reviewer and page is unpublished. If yes, you can change the return to true. Please search for hook examples with Page::viewable here in the forums. There will be some available. Or you look into existing modules how it is done there, like this one: https://github.com/Sebiworld/PageAccessReleasetime/blob/master/PageAccessReleasetime.module.php#L182-L201 and here https://github.com/Sebiworld/PageAccessReleasetime/blob/master/PageAccessReleasetime.module.php#L241-L254 And you don't need to build a module, you can write the hook into the site/ready.php file.
×
×
  • Create New...