Jump to content

AndZyk

Members
  • Posts

    722
  • Joined

  • Days Won

    10

Everything posted by AndZyk

  1. Sorry, if this is off-topic, but I am wondering regarding TailwindCSS: Since TailwindCSS covers the CSS part of components, what do you use for making the components interactive? Like for example a carousel, accordion etc. I saw that there are frameworks for TailwindCSS like daisyUI, Flowbite or Tailwind Elements. But isn't that the same like using a framework like Bootstrap or UIkit? Or do you use a different plugin for every component? One thing I like about frameworks like Bootstrap or UIkit is, that they offer a complete package. I don't want to be too dependent on many third-party plugins.
  2. Hello @zx80, I have no experience with translating modules, but have you tried the instruction of the ProcessHello module? Source: https://processwire.com/modules/process-hello/ It seems that you create those CSV files via the backend and then download them to bundle them with your module. Regards, Andreas
  3. That seems to be the defaultExtractor of the PurgeCSS configuration: https://purgecss.com/configuration.html So sadly no regex for safelisting UIkit classes. ?
  4. I have tried PurgeCSS today on UIkit with my good-old CodeKit App: https://codekitapp.com/help/purgecss/ It works for a majority of the classes, but it seems that PurgeCSS doesn't recognize rules like for example .uk-child-width-1-4@m > *. For this you have to write regular expressions to safelist these classes: https://purgecss.com/safelisting.html But I never really got the hang of regular expressions, so I might will pass. It seems too much of a hassle just to reduce maybe 100 kb of CSS. ? I guess PurgeCSS works best with utility based frameworks like TailwindCSS, where there are not much complex opinionated CSS rules.
  5. You can reduce unused CSS in UIkit if you manually only import the needed component partials from _import.scss. But yeah it would be nice if UIkit would have a automatic way to reduce unused CSS like PostCSS. I hope this will be a feature of UIkit 4. ?
  6. One more thing if you are building your own form: You can clean every data entered in the form by sanitizing every input. ? https://processwire.com/api/ref/sanitizer/ $fullname = $sanitizer->text($input->post->fullname); // Long $fullname = $input->post->text("fullname"); // Short https://processwire.com/blog/posts/processwire-2.6.14-brings-major-enhancements-to-sanitizer-and-input-api-variables/#sanitizer-and-input-are-now-a-couple
  7. That is also a option. ? If you just want to exclude search engines, you could make your page hidden and exclude it in your robots.txt But if you wan to protect your page, a .htaccess protection works as well. You could try the free LoginRegister module, if you want a better looking login form integrated with PW: https://github.com/ryancramerdesign/LoginRegister There is also a commercial successor of this module: https://processwire.com/store/login-register-pro/ Regards, Andreas
  8. Hello @zx80, I would go with a module for forms like the commercial FormBuilder or aformentioned FrontendForms. I have build forms in the past, but nowadays I use FormBuilder for every form, because forms can be complex to develop and maintain. Both FormBuilder and FrontendForms have protection well covered: https://processwire.com/store/form-builder/#spam-filtering-features https://github.com/juergenweb/FrontendForms#spam-protection-and-security-features For protection I am always using a honeypot and Google reCAPTCHA field with filtering by specific mail addresses or keywords, when I still get Spam. FormBuilder has an extra module for a Google reCAPTCHA field. Regards, Andreas
  9. Hello @Boost, have you seen this page: https://processwire.com/about/wordpress-vs-processwire/ ? ? Regards, Andreas
  10. Hi @franciccio-ITALIANO, it seems, that you always have the same ID "block01" for all your modals, so only one modal will always be opened? You should make the ID dynamic. <?php foreach($page->box_ripetitore as $b => $boxrip):?> <!-- INIZIO BLOCCO RIPETUTO --> <div class="<?php echo $boxrip->box_ripetitore_colore?>"> <div class="uk-tile" id="op31h2"> <a href="#block<?=$b?>" uk-toggle> <h2 style="font-family: Anton; font-size: 3em; color: white;"><?php echo $boxrip->box_ripetitore_tit?></h2> </a> <div style="font-family: Oswald; color: gold; font-size: 1.5rem;"><?php echo $boxrip->box_ripetitore_sottotitolo?></div> <!-- SEZIONI FOGLIA --> <div id="block<?=$b?>" class="uk-modal-container" uk-modal> Regards, Andreas
  11. Future Bass + World Music = Jungle Bass CloZee: Queen of Jungle Bass ???
  12. Hello @Roope, first of all thank you for your module. I am a long time user of your module and so far it has been working really fine. ? With PHP 8.2 I get following warning: Other than that the module is working normal. If you please could fix this warning that would be great. There is already a pull request for this warning, but I have not tested it. Regards, Andreas
  13. Thank you @bernhard for pointing me to this thread. This explains why this behaviour is necessary, although I wish it wouldn't. ? Then I will stick to my hook solution, if this is a recommended solution for this case. So far I haven't used custom page classes, but thanks for the hint.
  14. I have figured out which hook suits my case and decided to pre-select the options with the pages added hook: // Hook after page added $this->addHookAfter('Pages::added', function(HookEvent $event) { $page = $event->arguments(0); if ($page->template->name === "job") { // Pre-select job buttons $page->setAndSave("jobButtons", [1, 2]); } }); But I find this solutions still not very satisfying, because I think it should be possible to pre-select options without having the field to be required. Unless there is a reason behind, that I am not able to see.
  15. Hello, a client wanted to have the option to activate/deactivate two buttons on a page. But the default behaviour should be that both buttons are activated. So I have added a select options field with two options, which control if the buttons are visible or not. Now I can set both options to be preselected, but in order to makes this work, the field has to be required. But I don't want this to be a required field, because pages also should have the option to show no buttons. I honestly don't understand what's the reason, why this field has to be required, in order to show preselected options. Now I could add a third option "No buttons" or flip the logic to use this field for hiding butttons or I could use a hook for preselecting the options. But I am not sure which hook to use. But I hope there is a more elegant solution. Had somebody else this case before? I think this should be a common case. Regards, Andreas
  16. If the customer only wants to control the first level, then a page reference field should be enough. If the customer wants to control everything, then maybe a repeater with depth and page reference field should do the trick: https://processwire.com/blog/posts/pw-3.0.44-repeaters/ But I never had this case. Most clients want just rarely changes, which you can update in your code.
  17. As in my experience the menu usually doesn't change much, except maybe for submenus, I define the navigation in the _init.php and loop through the items and children: $homepage = pages()->get("/"); $nav = $homepage->children("template=foo|bar, sort=sort"); I try to keep the navigation connected to the page tree as close as possible.
  18. Hi @jetag, you could look here if there is still something: Source: https://documentation.mamp.info/en/MAMP-PRO-Mac/Servers-and-Services/MySQL/ This folder is hidden, so you would have to use for example your terminal: open /Library/Application\ Support/appsolute/MAMP\ PRO/db/ If you have a TimeMachine backup, you could restore the folder from your backup. Regards, Andreas
  19. The fieldtype repeater module is a core module and located under https://github.com/processwire/processwire/tree/master/wire/modules/Fieldtype/FieldtypeRepeater It should not be in the site/modules folder, you can just install it under Modules => Core.
  20. ProcessWire uses still a limited subset of Font Awesome 4 for the back-end. One solution could be to upgrade to Font Awesome 6 with 2000 icons in the free version: https://fontawesome.com/search?o=r&m=free Of course the Feather and Material icons are also beautiful.
  21. I can recommend the VSCode extension "Project Manager": https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager I have every project as own workspace with all root folders (site and wire) included and can easily switch with the project manager. The wire folder is excluded for opening files via the command palette. This way Intelephense knows everything, but I don't get suggested files in the wire folder. ?
  22. Hey @bernhard, I have not tested @Jan Romero solution, but it seems like a nice solution for this feature. ? The only thing that could be changed is to use an own CSS class name for the download icon, so it would be cleaner. Also I am still unsure, wether this feature is so important for everyone, that it has to be next to the trash icon. But that is something @ryan has to decide. Regards, Andreas
  23. The code before was just a wild guess. But I have now tried it and it could work like this: // Add the download label to $this->labels // Somewhere at the beginning of ___renderButtons() $downloadUrl = $pagefile->url; // In ___renderButtons() for example after variations // Download $buttonText = "<i class='fa fa-download'></i> $labels[download]"; $buttonText = str_replace('{out}', $buttonText, $this->themeSettings['buttonText']); $out .= "<a class='$buttonClass' href='$downloadUrl' download>$buttonText</a>"; Here is a screenshot: If you make it to a link styled like a button and add the download attribute, there is no need to open a modal and it would download the file with just one click.
  24. Just my proposition, but maybe this option would be better located under the image edit buttons: https://github.com/processwire/processwire/blob/3acd7709c1cfc1817579db00c2f608235bdfb1e7/wire/modules/Inputfield/InputfieldImage/InputfieldImage.module#L767 Because it is not a common option for everyone and the risk would be, that you download the file by accident if it is a button inside the image. Also you wouldn't have to change the SCSS file. It would be just something like: // Download $buttonText = "<i class='fa fa-download'></i> $labels[download]"; $buttonText = str_replace('{out}', $buttonText, $this->themeSettings['buttonText']); $out .= "<button type='button' data-href='$downloadUrl' data-buttons='button'>$buttonText</button>";
  25. I know that this is not the answer you are looking for, but at least on macOS I always open the image with the lightbox and then drag&drop the image on my desktop. That is not as convenient as a download icon, but three clicks less than Right click => Save image as.. => Select folder => Save ?
×
×
  • Create New...