Jump to content

gebeer

Members
  • Content Count

    973
  • Joined

  • Last visited

  • Days Won

    22

gebeer last won the day on January 16

gebeer had the most liked content!

Community Reputation

1,045 Excellent

1 Follower

About gebeer

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Male
  • Location
    Thailand/Germany

Recent Profile Visitors

9,505 profile views
  1. New version v2.1.2 is out on github. This version fixes a problem with images inside a folder that have names not conform with file naming conventions. When the module loads images from a folder, it converts them to Pageimage objects. When images are added to a Pageimages object file names get sanitized automatically by PW. In my case this resulted in different file names inside the Pageimage object and on disk. Consequently, thumbnails and previews for those images could not be loaded. I fixed this by automatically renaming all folder images to match the sanitized name versions inside a Pagimage object. This version also adds the ability to set values to this field via API. You can now do something like this to set a Pageimage object as new value to this fieldtype via API $p = $pages->get(1001); $image = $p->image; // returns a Pageimage object $p->of(false); $p->set('imagereference', $image); // sets the Pageimage object to the ImageReference field. This gets converted to a JSON string internally for storage $p->save();
  2. This does the job perfectly, indeed. Thanks a lot for that simple yet elegant solution. So all you need to add to site/api/events.php is public function findOne($selector, $options = array()) { return $this->pages->findOne($selector, $options); }
  3. I know this is an old thread. But just had a similar problem. You added the $events instantiation code to your _init.php which, most likely, is in site/templates/. But this code needs to go in site/init.php as stated in the tutorial. Then everything works as expected. The $page object inside template file site/templates/event.php is of Type Event and not Page. Sometimes it's the little details that matter. Posting this info mainly for my own reference. But maybe someone else might find it useful, too :)
  4. The findOne() method is defined in Pages (wire/core/Pages.php). Since your custom Events class extends PagesType, there is no findOne() method available out of the box. You can add one, though. I did this and it worked for me. Here is my site/api/events.php I basically just copied it over from wire/core/Pages.php Since the findOne() method makes use of $this->loader, we need to make sure that the loader is available in our custom class Events. So I added the loader var at the beginning of the class definition and in the construct() method, I instantiated it. Just did this right now to see if it works. In my case I now get a result for $events->findOne("date_publish_start<=now");
  5. Images from cloud storage providers could be added via URL with this module. I agree that it would be awesome to have all these options available in the core image field. Maybe file a feature request? EDIT: But that would add too many setting options to the core field that most of the users won't need. The image field is extendable via hooks and class inheritance. So other modules can add that functionality to the core field on demand.
  6. Hello, and welcome to the forum. This is not really a ProcessWire specific question. You might get advice or even find a solution on stackoverflow.com. And http://youmightnotneedjquery.com/ also might have some useful info.
  7. So true. I share your frustration. If it was for me, I wouldn't care (as you can see on my website, if you speak German). But what to do if clients are pushing? I'd like to see a reliable source for that, too. The thread @szabesz linked to, contains a link to Art. 6 GDPR. But like with all legal texts, as a layman it is hard to interpret them correctly. And even if you ask 3 lawyers you might get 3 different answers... In this thread @ceberlin links to an article on a well known German site for legal advice. I'm no subscriber to that site, so cannot access that information. The whole topic remains mysterious and frustrating. At least clients pay for cookie consent implementation. But I'd rather spend my time with more thrilling tasks...
  8. Hello all, I'm in the process of updating some websites to comply to the new GDPR opt-in regulations. Doing some resarch, I found this open source tool: https://klaro.kiprotect.com/ It looks quite promising and implementation seems quite easy. Have you used this tool? What is your experience so far? I saw that @Jens Martsch - dotnetic made some comments to the klaro GH issues. Did you implement this with PW?
  9. First off, big thanks to all authors for this module! There's a lot of changes going on regarding the legal situation of cookie consent management. The latest requirements for opt-in don't seem to be covered by this module. I tried latest dev version and also @joshua's fork. When clicking on Manage Cookies, I only get 2 options: I consent, I do not consent. There is no list of individual tracking cookies with checkbox to opt-in. I understand that implementing this can be a fairly complex task. Clients in Germany pushing quite hard to have compliant cookie management on their websites. This module does not seem to fulfill this need at the moment. Or am I missing something? Wordpress has paid plugins to accomplish this. But there are open source tools available, that can help to manage cookies compliant to GDPR and ePrivacy laws: https://klaro.kiprotect.com/ and https://www.oiljs.org/ both look promising. Do you have any plans for implementing a similar solution into this module in the future?
  10. gebeer

    SeoMaestro

    I just installed v1.0.0 on PW 3.0.142 and seeing a problem with german umlauts in The Google preview and inherited title. The site has Language Support installed, just to have the backend translated to German. No additional languages. Field title is of type Page Title with textformatter HTML Entity Encoder (standard setting). umlauts.mp4 The title is saved in DB field_title as 'Über uns'. Removing the Entity Encoder Textformatter doesn't help. EDIT: page title is also rendered in the wrong format: Can anyone reproduce this issue? A fix would be greatly appreciated. EDIT: This solution from github issues fixed it for me.
  11. What do you mean by frontend companion? Should frontend vistors be able to choose widgets? Most of the times I don't really need a sophisticated widget system. So far working with page fields solved my needs. In my widget templates I have select fields for the widget position. You'd need a repeater field to define different positions on different pages. To pack the positions into your inputfield would sure be difficult while having good UX at the same time. The widget management module would definitely be very useful to get an overview. That should do it.
  12. I like that approach. Looks great and quite intuitive for the user. Reminds me of old Joomla days. There is a similar page-tree style thing that lets you choose where widgets (in Joomla speak: modules) should show. It would be great if the user could also choose on every page which widgets to show. Like a 2-way thing: in the widget you choose the pages. In the page you choose the widgets. That way you don't have to jump around the page tree to select widgets for pages. I'd definitely be interested in such a inputfield (combination).
  13. Thank you anyway. I have managed to fix this problem. See my post above.
  14. New minor version v2.1.1 with fix for error when using field inside RepeaterMatrix is on github. This was a strange error and, honestly, I still don't quite understand the root cause. When trying to add a new repeatermatrix item with this field inside, I got the error Field [fieldname] is not saveable because it is in a specific context Google brought me to this closed issue in the processwire-issues repo. The issue was related to FieldTypeFile. I just applied the fix for it to my fieldtype module and it worked. But I'd like to understand the underlying problem. So if anybody has any clue, please let me know. Thank you.
  15. The RestAPI part in particular would be very interesting. I know there are some modules/site profiles already. But since you seem to do that quite frequently, you sure have some nice tips/concepts to share.
Γ—
Γ—
  • Create New...