Jump to content

3fingers

Members
  • Posts

    368
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by 3fingers

  1. Try to change the trigger from "saveReady to "save"? // Before public function ready() { $this->pages->addHook('saveReady', $this, 'afterSaveReady'); } // After public function ready() { $this->pages->addHookAfter('save', $this, 'afterSaveReady'); }
  2. I've used Mailjet (from the same company of Mailgun) and it worked fine for me. 6.000 emails per month for free are more than enough for testing purpose I think πŸ˜›
  3. Create a new php file inside template folder (or a subdirectory of it, ex. "inc") and paste your html portion you want to include in all the other templates, save it. Then, in all the templates, where you want that portion to appear just: <?php include('path/to/partial.php'); ?> // replace the path with yours.
  4. $featured = $all->find("limit=4, check_featured!={$page->check_featured}"); // Just 4 results here $items = $all->find("limit=6"); // Cannot be 6 here Spot the mistake?
  5. Are you sure you're using the correct syntax? // eg: <img src="<?= $urls->templates ?>img/your_image.jpg"> // $urls is a shorthand for $config->urls
  6. @ryan and @bernhard, you rock! Could you please provide some screenshots of the Reno and Rock themes? Thanks!
  7. Ciao Francesco, bel lavoro! Hi Francesco, good work! I notices a bit of delay on the homepage because the hidden map has to load a lot of tiles/images, I would try to load the map on demand/click to improve the perceived speed of the site πŸ™‚
  8. Hi @Robin S I have a scenario where a series of pages are protected by LoginRegisterPro, so user can access them upon registration. I'd like to grant access to those pages to some users coming from another website via a query string. It is possibile with your module? Is there a hook where I can redirect to login form if a user could not access the page/s? Thanks! πŸ™‚
  9. Hi, you can use PurgeCss for this, you'll need to install postcss and follow some steps in order to make it function. Take a look at this post, you can have an idea on how purgecss works, even if you are not interested in using tailwindcss. I don't think there is something similar for javascript, rather than minification. You'll need to understand which elements rely on which js and then remove the useless parts by hand.
  10. Hi had the same problem on my localhost but then I manage to solve it installing an ssl certificate to have https by default, otherwise I got 403 to every endpoint.
  11. Nice site! That's what I call a mobile first approach! 🀣 On my 27" monitor that hamburger icon is HUGE! I'd expected the same size also for the close button as well πŸ™‚
  12. In the gist the naming of the main css file is different (kickstart.pcss rather than main.css, the .pcss extension is optional) because at the time of the recording I had already made my previous guide, in which I've used that naming convention, so I prefer not to change it. Feel free to name your files however you want, just remember to reflect those changes inside the "scripts" object inside package.json.
  13. I've just recoded a brief video where I've tried to explain how to install tailwind inside Processwire ( really badly spoken πŸ˜† , so be kind...) Moreover I've updated the gist here to reflect the changes I've made since the last time I've written the guide above. There you have it:
  14. @fruid I agree with you that at first it looks complicated, mainly because it need a compilation step which has to be handled in some way. Nowadays is quite common to rely on tools like webpack, rollup, parcel, vite, etc.. to handle some activities like compilation, minification, bundling, etc. Postcss is mainly just one of them, but specifically intended to work with with css. Once you grasp the few key steps to install it and how to purge your css efficiently I guarantee you will see the benefits at your disposal (mainly speed of layout blocking and very low css file sizes). If someone it's interested I can make a video where I can explain all the install steps in further details.
  15. Thanks @MoritzLost now I got it, you've clarified my doubts. So many things to learn πŸ™‚ I'll bookmark this thread for reference in the future πŸ™‚
  16. I think you have a typo where you check for instances (all of them, here just one for brevity): if ($value instanceof Pageimage) // Shouldn't be $type insted of $value? and $type could be reached also like this? (as seen here) $type = $value->type; // where $value is the variable you previously created
  17. Hello @bernhard, playing around a bit with your example I came up with: https://codepen.io/3fingers/pen/dyNdvyx Note I uncommented line 63 on my example, which looks like the culprit for the blank result, so there is something related to time values I didn't figured out (even though I've tried different formats).
  18. Currently I don't think it's possibile with just one select field because options for language A must match options for language B (and so on...). As far as I know you then need to select field (or page field) for what you are looking for.
  19. Thanks @gebeer, I've used repeaters (and repeater matrix) a ton and never looked at their corrispettive pages. Now it all makes sense. Great explanations by the way, kudos! πŸ™
  20. @gebeer Where does 'template=repeater_repeater' comes from?
  21. From @bernhard suggestion: One key thing I missed the first time I read Tabulator docs: So I can use that further data (unused for presentational purpose) to filter various columns because it is effectively present and coupled with every row. Does it sound correct? πŸ™‚
  22. For a project I'm close to start I'm evaluating the use of Tabulator or DataTables to make a custom filtered table like the one you can see here. The example shows four custom dropdown that act upon custom data, filtering it via data-attributes stored on the table rows in this case. Both plugins don't offer natively this kind of functionality. @bernhard I know you have played a lot with Tabulator, releasing also a module based on it, but as far as I can tell you didn't implemented anything like that, but maybe you (or someone else, of course) could give me some pointers πŸ™‚ Thanks, as usual.
  23. There are different ways to accomplish this, as usual. The first coming to my mind right now is to use: Basically you should have two page reference fields, one for each group of editors (eg. us_editors, gb_editors, etc.). Those page reference should point to the corresponding branch inside the page tree: - Us Editors // page reference -> us_editors -- editor #1 -- editor #2 -- ... - Gb Editors // page reference -> gb_editors -- editor #1 -- editor #2 -- ... Then you might want to use a custom selector (custom selector option of the module linked above) based on your language to show only the correct page reference field. Eg: $user->language->id = 1234 // The id of the language the page field might be shown //OR $user->language->name = 'GB' // Or whatever the name you have choosen Then in your template file you can work with the editors whom belong to the current user language $editors = ($user->language->name == 'US') ? $page->us_editors : $page->gb_editors; This method will fail shortly if you plan to have more than two languages. Another, and probably more reliable, method is to use a hook on page creation and populate a single page reference with the values you need.
  24. Thanks adrian, I had to put my karate headband on and take some time to study your code (eg. right now I don't get where the code below came from). $args = $query->original_args; I'll do some research πŸ™‚ ...by the way using tailwindcss lately I'm not negatively impressed by the markup you mentioned πŸ˜† Thanks!
  25. How, if I can ask? :)
Γ—
Γ—
  • Create New...