Jump to content

joshua

Members
  • Posts

    89
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by joshua

  1. What I've done so far, is a small implementation of webp-convert. Currently without a ProcessWire specific module or something, but that's planned. Just added a file called webp-on-demand.php in the ProcessWire root directory with following content: <?php // docs https://github.com/rosell-dk/webp-convert require 'webp/webp-on-demand-1.inc'; use WebPConvert\WebPConvert; $docRoot = rtrim($_SERVER["DOCUMENT_ROOT"], '/'); $requestUriNoQS = explode('?', $_SERVER['REQUEST_URI'])[0]; $source = $docRoot . urldecode($requestUriNoQS); $destination = $source . '.webp'; // Store the converted images besides the original images (other options are available!) $options = [ // Tell where to find the webp-convert-and-serve library, which will // be dynamically loaded, if need be. //'reconvert' => true, 'require-for-conversion' => 'webp/webp-on-demand-2.inc', 'quality' => 'auto', 'max-quality' => 75, 'fail' => 'serve-original' // see https://github.com/rosell-dk/webp-on-demand/blob/master/docs/api.md for more info ]; WebPConvert::convertAndServe($source, $destination, $options); Then in the folder webp the two on-demand files from here. After that I added following to the .htaccess: <IfModule mod_rewrite.c> RewriteEngine On # Redirect images to webp-on-demand.php (if browser supports webp) RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php [NC,L] </IfModule> AddType image/webp .webp And that's it. If the browser supports webp, all requests of .jpg and .png are redirectet to the webp-on-demand.php which desides if it needs to convert the image or serve the already converted one. A small caveat: the standard installation of Plesk has no webp support included, so on webservers with Plesk you either need to wait for their implementation or compile it yourself.
  2. We are also using 1Password in our team. Though it's not the chepaest option, it's easy to use and has a good right management..
  3. I updated some dependencies and bugs (e.g. the php 7.2 bug with each() ) in this push request.
  4. Oh, now I got it! Setting module autoload and singular to true again and clearing all caches helped... Thanks for this great module!
  5. Hi @Noel Boss, now I get exactly the problem Exception: Method PageArray::pageQueryJson does not exist or is not callable in this context as @kongondo mentioned. I've tried a minimal version of the pageQueryBoss: <?php namespace ProcessWire; $query = [ "title" ]; echo $pages->find('template=portal-entry')->pageQueryJson($query); But still with this error. Setting autoload to true does not change anything... Do you have any idea to solve this? Many thanks in advance - for your module but also for your medium article!
  6. Hi, I have the same problem as Martin has: In our template "padorder" is a checkbox and Sanitizer::purify breaks the order. My version is padloper-2015-6-21....
  7. I' currently working on something like that. Starting with the blog Profile should be good. Personally I started from scratch, so all the structure is like the way I think Do you want the billing system to be fully integrated in PW? Or would an external solution also be ok? There are some good payment service providers out there with a good API, so this could be easier. ECommerce with digital products or real products? Could be a big different... Take a look at "padloper", like Nico said before! ;-) In my case the members can communicate with each other. Do you want the members only to see more content (like premium articles etc.) or should they also be able to interact more?
  8. Thanks, Horst! I've created my forum account last year. The reason: FormBuilder, ProFields, ProCache So I also think there are many... many (!) other out there
  9. Thanks - I'll check this out now! @SiNNuT: Of course! ProcessWire is so brilliant and the support forum also is. I haven't found the time until now to answer questions by others but also didn't need any help until today. But even now it is (as always with ProcessWire) a simple & great solution. Edit: It works! foreach ($languages as $lang) { if($lang->isDefault()) continue; $nc->set("status{$lang}", 1); }
  10. Hello everyone, I'm working with ProcessWire now for more than two years and I'm verry verry satisfied with it! Currently I'm working on a project with integrated "Frontend CRM" and more functions for frontend-user-interaction. The Contacts for the CRM are Users with an alternate parent (as introduced in 2.5.14). Almost everything is working perfect so, but now I have one Problem: When a new user is created via the Frontend (via the great PW Api) it's parent has an name like "/en/crm/contacts/maxmustermann/" In this case the new created contact is only visible, if the Editor has "english" as language actived. In other languages (currently only German) the new Contact isn't shown. Here's the codepart, where the page is created: $c_template = $templates->get("contact"); $c_parent = $pages->get(1018); $c_name = $sanitizer->pageName($c_forname) . $sanitizer->PageName($c_lastname); if ($pages->get("name=$c_name")) { $date = date("ymdhis"); $c_name = $c_name .$date; } $nc = new Page(); $nc->template = $c_template; $nc->parent = $c_parent; $nc->name = $c_name; $nc->language = $user->language; $nc->contact_forname = $c_forname; $nc->contact_lastname = $c_lastname; $nc->contact_company = $c_company; $nc->contact_website = $c_website; $nc->contact_email = $c_email; $nc->contact_phone = $c_phone; $nc->contact_street = $c_street; $nc->contact_plz = $c_plz; $nc->contact_town = $c_town; $nc->contact_country = $c_country; $nc->email = $c_email; $nc->save(); The input values are validated before this part. I want the contact to be visible in all languages. How can I solve this problem? Many thanks in advance! Greets, Josh
×
×
  • Create New...