Jump to content

szabesz

Members
  • Posts

    2,846
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by szabesz

  1. Hello Daniel and welcome to ProcessWire, If you want to ease your way into working with CSS, then I recommend either using UIkit 3 or Bootstrap 5. Both have its pros and cons, so you need to look into both to decide which one you prefer. For example, I started with UIkit 3 but nowadays I prefer Bootstrap 5. So preferences can change, too :) A lot of PW devs also like Tailwind CSS, for example, but there are loads of others, of course, for example: https://github.com/troxler/awesome-css-frameworks As for PHP, it's hard to recommend something which stands out of the crowd, but you might find useful tutorials here: https://hackr.io/tutorials/learn-php?sort=upvotes&type_tags[]=1 Just avoid old PHP tutorials as they probably teach deprecated PHP stuff. Stick to PHP 8.x and up. Hope this helps. Happy coding! ps: use the Google site search to search on this forum and/or in the PW blog. You'll get quick results that way.
  2. Hello @kongondo How about using some node graph libs? See for example: https://github.com/wbkd/awesome-node-based-uis I have no experience with any of them, but a decent JS library like that might do the trick. Another idea is that you might want to consider not to build any visual aid for the actions based approach but implement a programming library for that. After all, your target audience is developers. Sure, visual building makes it easy for newcomers to produce results fast, but it will be limiting in the long run. And there is the option to mix the two approaches. Since you are planning to work on the module in iterations, you might want to start with the programming library approach as that should be the bases of the visual aid anyway. Side note: recently I worked on a complex form and decided to implement some utility classes for handling forms, along with realising dependent selects as well, and I also had to deal with "non-parent/child relationships". (Just don't think of any sort of "library level" coding here, those utility classes are for my own humble needs.)
  3. Under 4 hours 27 mins 52 secs? Protecting data is very expensive for sure. It's just that lawmakers don't give a damn about that because it's not they who need to pay the price. Anyway, thank you for advancing Duplicator!
  4. BTW, on the frontend I use this https://github.com/brick/money which works well. It is a bit verbose to do math like that, but worth the hassle.
  5. Use decimal, already in the core, see (FieldtypeDecimal uses InputfieldFloat): https://github.com/processwire/processwire-requests/issues/126 https://weekly.pw/issue/367/ "Float and integer fields are now considered compatible with the newly added decimal field, making it possible to convert these from one type to another." If you feel like applying custom formatting in the admin, see :
  6. Chatsonic examples: How to create a page with the API of ProcessWire? How to return an array in ProcessWire?
  7. Sounds great for sure! Thank you in advance.
  8. First of all, thanks for your work on this! You mean all four repos? I starred them all. Another question: maybe I'm blind a bit, but I cannot find any search function on the site. We can always use Google, like https://www.google.hu/search?q=hook+site%3Aprocesswire.recipes but Google might not be always up-to-date for a while, I guess.
  9. In this case, apparently they do not redirected to anywhere but we get a "No Template specified" exception. Yes, they do get lost, so there is no template to edit, hence the exception.
  10. The issue is here: https://github.com/uiii/AdminHelperLinks/blob/023a5bc75028713ebcfea1212132cbe00867a024/AdminHelperLinks.js#L134 There is no need for the extra forward slash before '/setup....: ProcessWire.config.urls.admin + '/setup/template/edit?id=' For some reason it no longer works in newer PW versions but it is not needed anyway.
  11. You always get normal delayed output out of the box, even if $config->useMarkupRegions is set to true by default. Markup Regions is never enforced, and even though it is turned on by default it just sits there to be used. If you do not need it, you can disable it for performance reasons, of course.
  12. Also, anyone in need for a fix for this, please give a thumbs-up at the GitHub issue so that Ryan can see how "popular" (or rather: unpopular) this issue is.
  13. I also wanted to do this and was surprised that this is not possible so I had to code around this.
  14. It looks to me that the post above was generated by ChatGPT. It begins with "In ProcessWire,..." and ends in "Keep in mind that...". I doubt that copy/pasting ChatGPT results is a good way of discussion.
  15. Maybe it's a limitation and not a bug. ProcessUser is for the admin where PW lets the current user with correct permissions edit users. However, on the frontend, users get "more protection".
  16. @Pip Could you please put your very long code blocks into spoiler blocks this rich text editor provides? (Just use the eye icon in the toolbar.) Topics like this with extremely long code blocks are pretty hard to digest. Thanks in advance.
  17. Hello, Please note: Also, CKE is going to be retired in the not so distant future, TinyMCE is taking its place. Back then, tpr put countles hours of work into AOS. I can be wrong, but I'd bet he can no longer support it due to lack of free time, especially anything CKE related.
  18. @Macrura There is a console.log($(this)); left in simplemde_init.js: https://github.com/outflux3/FieldDescriptionsExtended/blob/f550084f25ea32cecfe0b9879bf46bc23b3b03ac/simplemde_init.js#L12 Next time you update the module, could you please comment it out? Pretty useful module, BTW. Thanks for sharing!
  19. Hello, Probably, it is the find() or a "similar method" (which also begins with the word find) is the one which you should use, not get(), see: https://processwire.com/api/ref/pages/ $pages->get() : Returns the first page matching the given selector with no exclusions. Meaning with get() you get one page only without checking any kind of status nor access control.
  20. Thanks Adrian! I simply postponed upgrading the module. Next time I work on that site, I will surely try to upgrade it base on the info you provided above.
  21. Quite agree! Personally I never implement anything relying on CDN because of the possible issues with external dependencies.
  22. I quite understand it, so please simply forget my question if such a task would add any considerable amount of time to the maintenance of the module. I just saw that in your Admin Actions module the Ace editor files add up to only about 1MB, and I simply use Ace in these modules the way they are configured by default, and I will highly probably never be interested in more than that. So to me, what is not used is just "ballast". Looks like the distribution directory of this editor is about the same size as Ace's (maybe even a bit bigger) and if so, it might not be an answer to the "issue". Also, (quote) "The Monaco editor is not supported in mobile browsers or mobile web frameworks." which is not an issue to me as I never use the ProcessWire admin on a mobile, so I do not even know if Ace supports that or not.
  23. Hi, You could hook after "InputfieldText::processInput". That way you can also check for the uniquness of the name/title if you need to, and add your error messages as needed. Here is a similar hook I use in a project: <?php namespace ProcessWire; wire()->addHookAfter("InputfieldText::processInput", function ($event) { /* @var $page AddonPage */ $field = $event->object; if ($field->name == "suffix") { $page = modules()->ProcessPageEdit->getPage(); if ($page->template != "addon") return; //The final title and name is based on the fields: addon_addon + suffix (both are text fields) $suffix = $field->value; $suffixFormatted = " (" . $field->value . ")"; $addon = session()->get('addon_addon'); session()->remove('addon_addon'); $titleNew = empty($suffix) ? $addon : $addon . $suffixFormatted; $nameNew = wire()->sanitizer->pageName($titleNew, true); $uniqueName = pages()->names()->uniquePageName($nameNew, $page); $titleSelector = wire()->sanitizer->selectorValue($titleNew); $existingPage = wire()->pages->get("template=addon, title={$titleSelector}"); $hasErrors = empty($addon); if ($existingPage->id == $page->id && !$hasErrors) { //bd("Page name has not changed, he have no errors, so no need to proceed..."); return; } if ($existingPage->id != 0 || $hasErrors) { //bd("We had errors, we need to clean things up..."); $titleUntitled = "addon-" . date("YmdHis"); $nameUntitled = wire()->sanitizer->pageName($titleUntitled, true); $uniqueNameUntitled = pages()->names()->uniquePageName($nameUntitled, $page); $page->name = $uniqueNameUntitled; $page->title = $titleUntitled; $page->addon = $addon; if ($hasErrors) { session()->error("Errors listed below must be fixed for this add-on to be saved properly!"); } else { session()->error("Title is already in use by an existing one (ID '{$existingPage->id}'). Either change the Label and/or add a unique suffix!"); } } else { //bd("No errors, We can save provided values..."); $page->title = $titleNew; $page->name = $uniqueName; } } }); Note that the admin "new page creation process" skips the step asking for the title in the first place, so I had to handle the case of blank values as well when the user abandons the complete process of creating a page with the required text fields being filled in and saved.
×
×
  • Create New...