Jump to content

AndZyk

Members
  • Posts

    709
  • Joined

  • Days Won

    10

Everything posted by AndZyk

  1. Hello @horst, first of all thank you for all your efforts to bring WebP support to ProcessWire. ? I have installed ProcessWire 3.0.132 and implemented this code to almost every image: <?php $image = $image->size(1600, 900); ?> <picture> <source srcset="<?=$image->webp->url?>" type="image/webp"> <img src="<?=$image->url?>" width="<?=$image->width?>" height="<?=$image->height?>" alt="<?=$image->description?>"> </picture> Of course with more variations. This is just an example code. My issue is, that my local MAMP server doesn't support WebP and my webhosting does support it. On the webhoster the WebP variations get generated and everything is fine. But on my local MAMP server, ProcessWire can't generate the WebP variations and tries to generate them on every page load, which leads to a server timeout. I saw a condition $image->hasWebp in your early drafts. Can I use this for environments that don't support or should ProcessWire better not try to generate WebP variations at all, if there is no WebP support? ? Regards, Andreas
  2. Just wanted to add, that ProDrafts also seems to re-publish previous unpublished repeater items again after saving. Maybe someone can confirm this and maybe I will renew my license some time and post these issues into the dedicated support board. Until then, this is unfortunately a deal-breaker for me and I will disable ProDrafts again. Regards, Andreas
  3. Hello @buster808, you seem to have empty links inside your slider without any purpose. Maybe you should remove them. ? In my opinion it is good, that the slider doesn't have a adaptive height. Because then the slider navigation and content flow would be disrupted on every slider change. You could always choose a different component for your quotes than a slider on mobile. Just create two components with the same content and hide/show them on different viewports with the visibility component. And don't worry about search engines, because this is not considered duplicate content as far as I know. Regards, Andreas
  4. I meant the browser based Visual Studio Online, mentioned at the end of the article, that will be coming in the future. Although it might be not be for you, that was the real news. ?
  5. Microsoft announced Visual Studio Online: https://devblogs.microsoft.com/visualstudio/intelligent-productivity-and-collaboration-from-anywhere/ @bernhard Could be what you are looking for. ?
  6. Just wanted to add, that using one highly compressed WebP image as source image also would be bad for using responsive images, which is highly recommended to use, because of all those different devices with different screen resolutions. For responsive images you need generated variations of a uncompressed source image. ?
  7. Thank you @Noboru, I will try this out. ? I am wondering: Can you even open WebP files in apps other than browsers without having the codec installed? As far as I know you cannot simply open a .webp file. After all it is meant for browers. But I haven't tried it much. In my opinion I would not serve WebP content in a .jpg or .png file. I would serve only WebP in a .webp file for browsers that support it. ?
  8. IMagick Image Sizer has priority 1. I think that is the default value.
  9. Thank you, I have downloaded your new commit and now I don't get an error anymore. Unfortunately it seems, that the GD library and Imagick by MAMP doesn't support WebP yet. I found an tutorial how to recompile PHP for MAMP with WebP, but I rather wait for an update. I noticed that the forceEngine option doesn't change the engine for me. I first had to uninstall the core module IMagick Image Sizer, so that the GD library would be used. Could that be a bug or have I done something wrong? It seems, that for now I will have to wait for more WebP support by MAMP and my hoster. But at least ProcessWire will be ready. ?
  10. Thank you for the hint, that seems to be it. Here is a screenshot of my local ImageMagick installed with Homebrew on MacOS: But even when I uninstall the core module IMagick Image Sizer, I cannot create a WebP image with ImageSizerEngineGD. Our hoster doesn't seem to support WebP either unfortunately. Not so easy to use WepP at the moment. ?
  11. Hello @horst, thank you for your efforts to bring WebP to ProcessWire. I can't wait till it is implemented in the core and want to try it out, but have some problems getting it to work. I hope you can help me: I have downloaded your modified ProcessWire from your pull request and replaced the wire folder with your wire folder, because I don't want to mess up the Git development branch of my project. Maybe I don't understand the concept of pull requests right. ? Following files have changed: wire/config.php wire/core/ImageSizerEngine.php wire/core/ImageSizerEngineGD.php wire/core/Pageimage.php wire/modules/Image/ImageSizerEngineIMagick/ImageSizerEngineIMagick.module Now if I have understood correctly, I should be able to generate a WebP of an image with: <?php $options = [ "webpAdd" => true, "webpQuality"=> 90 ]; page()->image->size(800, 600, $options); Now I get the error: Am I missing something or has it to do with my local MAMP? Regards, Andreas
  12. It is fine, because my year of support is expired and I should renew my license. But unless ProDrafts will be developed further, I don't want renew it right now. ?
  13. Sorry for hijacking this topic, but I don't have access to the ProDrafts VIP support board at the moment: It seems that the automatic save (normal) doesn't play well with image fields inside a Repeater Matrix. The images get lost on upload. For now I have excluded the image fields inside the Repeater Matrix from automatic save (normal). Automatic save (relaxed) seems to work. ? Regards, Andreas
  14. Thank you for your answers @BitPoet and @7Studio. I was using the core module System Notifications for a long time and didn't knew, that this feature came from this module. I stopped using it, because it didn't look nice with AdminThemeUIkit (the badge) and AdminThemeUIkit offers grouped notifications. I have tried the Page Edit Soft Lock module and this one looks good. ?
  15. Hello, this maybe a simple question, but it bothers me for a while now: There used to be a warning, if two or more user try to edit the same page. But ever since AdminThemeUIkit I haven't seen it any more. Is this a bug or are there special circumstances under which the warning will be displayed? If I am logged-in in the same browser with one default and one privat window, I don't see this warning. But also different browsers on different machines in the same network don't see this warning. I was looking for the blog post on which this feature was announced, but couldn't find it anymore. We had the case, that two people were writing a text for the same page, but after person A saved the page first, the text of the person B was lost. I know we could have used ProDrafts for this case, but it shouldn't happen in the first place. I would appreciate some feedback. ? Regards, Andreas
  16. Hello @Tom., do you use the core module IMagick Image Sizer and have you disabled sharpening in the module settings? I usually disable it. Maybe that could be the reason. ? Regards, Andreas
  17. Hello @kkalgidim, if you already use jQuery, I also can recommend jQuery Typeahead by Running Coder. I wrote a tutorial for a autocomplete search function with this plugin: It is basically the same like the code by @dragan, with a little more information. Of course you could use any typeahead plugin or service you want and build a nice search function with ProcesWire. All you have to do is prepare the search results in the required format of the plugin or service, f.e. JSON. ? Regards, Andreas
  18. Thank you for the information. It seems that Chrome on Windows doesn't support CSS hyphens yet. Would have expected more of Chrome. ? I have reduced the font size for now, so the long headlines should fit better even without hyphens. If you find anymore bugs, please contact me via PM first. ?
  19. Glad you like the navigation and yes you have to get used to it. ? Although there is no classic breadcrumb navigation, you can see the headline of a area above the navigation, content and the back link of the third level. But a sitemap would be helpful, I will keep that in mind. Yes it has it advantages on tablets, but the navigation was a little bit tricky to develop. What Browser and OS are you using? The headlines use CSS hyphens, which is not yet supported everywhere.
  20. The family centre in Furtwangen, Germany, is an association of three Catholic day-care centres. Among them are the kindergartens Maria Goretti and St. Martin as well as the children's house St. Elisabeth. The navigation of the website captivates by a clear structure, which is thought from the point of view of the site visitors. The structure and the color-separated areas make it easy for visitors to enter the site. The color palette used for this is derived from the logo and gives the site a playful and friendly appearance. In the background, large-format pictures give a first impression and create an authentic atmosphere. For announcements there is a news ticker on which events, news or job offers can be advertised. www.familienzentrum-furtwangen.de Features: Navigation News ticker Navigation The navigation is separated in areas for visitors or parents and has an automatically generated color palette with ten different colors from the logo. Links can be references to existing pages to resuse informations without having duplicate content. News ticker The news ticker can contain downloads, links or text and is a fixed part of the navigation. Modules used: Cookie Management Banner Front-End Page Editor Markup Sitemap XML ProCache Repeater Matrix Tracy Debugger Upgrades Regards, Andreas
  21. If someone has issues with generating an access token, I now have learned that it is important to include a language with the request for the access token: https://www.instagram.com/oauth/authorize/?client_id=YOUR_CLIENT_ID&redirect_uri=http://page.dev/processwire/module/edit?name=InstagramFeed/&response_type=token&scope=public_content&hl=en Source: https://stackoverflow.com/questions/55449162/https-api-instagram-com-oauth-authorize-api-login-error So inside the "InstagramFeed.module", you should add 'hl' => 'en' in line 385: <?php $request = array( 'client_id' => $this->clientId, 'redirect_uri' => $redirect, 'response_type' => 'code', 'scope' => 'public_content', 'hl' => 'en' ); Regards, Andreas
  22. Thank you all for your feedback. ? I will then try out the Page Rename Options module, because it looks more like what I am looking for. Regards, Andreas
  23. @Sergio Thank you for the hint. ? This solution is ok, but I don't like, that the page name is now before the page title and takes up so much space. A smaller page name edit field under the page title (like the WordPress one) or a quick link to the field in the settings tab would in my opinion be nicer. I know that ProcessWire doesn't want to clutter up the back-end and that is a reason why I love it and I know that I could add a note in the page title field or a hook for changing the page name on every save. But I think in this case, showing the page name under the page title would be better then hiding it under the settings tab. Maybe @ryan could consider this wish. ? Regards, Andreas
  24. Hello, when you add a page you can see the page name of the page under the page title field. But when you change the page title afterwards, you have to go to the settings tab to also change the page name. We have many clients that change the page title afterwards but forget to change the page name, because they don't look in the settings tab or forget it. Is it possible to show the page name on the content tab under the page title? I hate to say this, but I like how WordPress handles this better: Or should I open an GitHub request? Regards, Andreas
  25. Thank you. ? My solution was to include a script for converting PHP to ICS, if you visit the event template with the URL segment "/download/". Tricky was to format all data for the ICS format. Here is my version of the script mentioned above: <?php namespace ProcessWire; // Variables used in this script: // $summary - text title of the event // $datestart - the starting date (in seconds since unix epoch) // $dateend - the ending date (in seconds since unix epoch) // $address - the event's address // $uri - the URL of the event (add http://) // $description - text description of the event // $filename - the name of this file for saving (e.g. my-event-name.ics) // // Notes: // - the UID should be unique to the event, so in this case I'm just using // uniqid to create a uid, but you could do whatever you'd like. // // - iCal requires a date format of "yyyymmddThhiissZ". The "T" and "Z" // characters are not placeholders, just plain ol' characters. The "T" // character acts as a delimeter between the date (yyyymmdd) and the time // (hhiiss), and the "Z" states that the date is in UTC time. Note that if // you don't want to use UTC time, you must prepend your date-time values // with a TZID property. See RFC 5545 section 3.3.5 // // - The Content-Disposition: attachment; header tells the browser to save/open // the file. The filename param sets the name of the file, so you could set // it as "my-event-name.ics" or something similar. // // - Read up on RFC 5545, the iCalendar specification. There is a lot of helpful // info in there, such as formatting rules. There are also many more options // to set, including alarms, invitees, busy status, etc. // // https://www.ietf.org/rfc/rfc5545.txt $filename = page()->name . ".ics"; // 1. Set the correct headers for this file header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: attachment; filename=' . $filename); // 2. Define helper functions // Converts a unix timestamp to an ics-friendly format // NOTE: "Z" means that this timestamp is a UTC timestamp. If you need // to set a locale, remove the "\Z" and modify DTEND, DTSTAMP and DTSTART // with TZID properties (see RFC 5545 section 3.3.5 for info) // // Also note that we are using "H" instead of "g" because iCalendar's Time format // requires 24-hour time (see RFC 5545 section 3.3.12 for info). function dateToCal($timestamp) { return gmdate('Ymd\THis\Z', $timestamp); } // Escapes a string of characters function escapeString($string) { return preg_replace('/([\,;])/','\\\$1', $string); } // 3. Echo out the ics file's contents ?> BEGIN:VCALENDAR CALSCALE:GREGORIAN VERSION:2.0 PRODID:-//Stadtkirche Pforzheim//NONSGML ProcessWire//DE <?php if (page()->template == "event"): $summary = page()->getUnformatted("headline"); $dateStart = page()->dateStart; $dateEnd = page()->dateEnd; $address = page()->place->getUnformatted("title"); $uri = page()->httpUrl; $description = strip_tags(page()->getUnformatted("summary")); ?> BEGIN:VEVENT DTEND:<?= dateToCal($dateEnd) . "\n"; ?> UID:<?= uniqid() . "\n"; ?> DTSTAMP:<?= dateToCal(time()) . "\n"; ?> LOCATION:<?= escapeString($address) . "\n"; ?> DESCRIPTION:<?= escapeString($description) . "\n"; ?> URL;VALUE=URI:<?= escapeString($uri) . "\n"; ?> SUMMARY:<?= escapeString($summary) . "\n"; ?> DTSTART:<?= dateToCal($dateStart) . "\n"; ?> END:VEVENT <?php elseif (page()->template == "ensemble"): $eventsPage = pages()->get("template=events"); $events = pages()->find("template=event, has_parent=$eventsPage, ensemblesSinging|ensemblesPlaying=$page, sort=dateStart, dateStart>" . time()); foreach ($events as $event): $summary = $event->getUnformatted("headline"); $dateStart = $event->dateStart; $dateEnd = $event->dateEnd; $address = $event->place->getUnformatted("title"); $uri = $event->httpUrl; $description = strip_tags($event->getUnformatted("summary")); ?> BEGIN:VEVENT DTEND:<?= dateToCal($dateEnd) . "\n"; ?> UID:<?= uniqid() . "\n"; ?> DTSTAMP:<?= dateToCal(time()) . "\n"; ?> LOCATION:<?= escapeString($address) . "\n"; ?> DESCRIPTION:<?= escapeString($description) . "\n"; ?> URL;VALUE=URI:<?= escapeString($uri) . "\n"; ?> SUMMARY:<?= escapeString($summary) . "\n"; ?> DTSTART:<?= dateToCal($dateStart) . "\n"; ?> END:VEVENT <?php endforeach; endif; ?> END:VCALENDAR I have never bothered to try any other calendar format than ICS, because ICS is the only standard calendar format I know of. I usually use the latest version installed with Yarn and then compile the source SCSS. The source SCSS files don't seem to have the comment.
×
×
  • Create New...