-
Posts
2,922 -
Joined
-
Last visited
-
Days Won
18
Everything posted by szabesz
-
@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.
-
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.
-
@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!
-
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.
-
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.
-
ace-editor folder is huge, do we need all that stuff?
szabesz replied to szabesz's topic in Tracy Debugger
Quite agree! Personally I never implement anything relying on CDN because of the possible issues with external dependencies. -
ace-editor folder is huge, do we need all that stuff?
szabesz replied to szabesz's topic in Tracy Debugger
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. -
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.
-
Happy new year to all! @adrian My question is in the title :) The ace-editor folder is ~11.7MB with ~444 files, along with snippets, themes and such. Personally, I do not think I/we need them all. Would it be possible to make it a lot slimmer somehow? cheers, Szabesz
-
Your list is exactly what I wish for as well, I have nothing to add. I gave it a thumbs-up. Ryan's time to work on ProcessWire is limited and being the only one to stear the boat, naturally, he needs to prioritize. I think the most important issue with implementing and maintaining migrations is that it is a HUGE effort, and Ryan would need to add support for his Pro modules as well. Again, he only has 24 hours a day. I cannot even imagine who would have the time to rewrite the admin theme from scratch. However, if Ryan ever wants to move it forward to the next level, he needs to move his mindset to the reactive era, probably HTMX + Alpine.js. If we drop support for the others, people would surely use AdminThemeUikit :P
-
I'm in! Maintaining AOS would be just too much work for even the most experienced, I think, so no wonder @tpr is no longer interested in it, especially that he no longer uses ProcessWire. Also, AOS mostly supports the Default or Reno admin themes which we should deprecate, IMHO.
-
Still implementing pages is essential, I think. Thanks for the addition.
-
Thanx @gebeer for sharing! As a side note, anyone implementing infinite scroll, be aware that a simple and basic implementation can lead to very bad UX, see for example: https://builtin.com/ux-design/infinite-scroll So it is a lot of work to implement it from scratch if one wants to provide something that is not pita for the user.
-
It is surely not "actively" maintained. The question is, will it ever be maintained at all?
-
New post – Implementing and using TinyMCE 6 in ProcessWire
szabesz replied to ryan's topic in News & Announcements
That's an interesting idea indeed. I'm not sure how that could be implemented in practice but the possibility to switch compatible Inpufileds on the fly sounds powerful enough on its own. Maybe this request is related in some regard: https://github.com/processwire/processwire-requests/issues/470 This often happens, especially when fixing client's work done in the RTE. Maybe TinyMCE 6 is a lot better than CKEditor was, so fixing things will be less frequent in the future but when the HTML source is long and complex then a plain text HTML input is hard to work with. Also, I often like "experimenting" with the HTML source and that is another use case, I think. -
New post – Implementing and using TinyMCE 6 in ProcessWire
szabesz replied to ryan's topic in News & Announcements
As a starting point, I guess, as they look outdated to me but I have not tried... Anyway, I think an officially supported "advanced" code editor plugin would be beneficial to all of us. -
New post – Implementing and using TinyMCE 6 in ProcessWire
szabesz replied to ryan's topic in News & Announcements
Thank you for all the hard work you put into migrating PW to TinyMCE 6, which is so much better than CKEditor. One thing I'm still longing for is a "proper" source code editor which is a paid addon, unfortunately. Would it be possible for you to implement a TinyMCE code editor for ProcessWire, based on CodeMirror or similar? -
Not too much spare time either but if I have some, I will look into that. No promises though. Thanks anyway! As you can see, links do not appear when editing user pages. And it is not just for the user's name field but all the other additional fields I have added to the User template. (And the template edit link is missing too). It is probably because ProcessWire treats users differently from regular pages.
-
I agree. AI has nothing to do with computer's being intelligent or being able to do something on their own without human aid and intervention. Oxford dictionary for the word "intelligence": "the ability to acquire and apply knowledge and skills" A bunch of data in a database is not knowledge. What is in a human's head, that is "knowledge". Again, the Oxford dictionary says: knowledge: "information, and skills acquired by a person through experience or education; the theoretical or practical understanding of a subject" skill: "the ability to do something well; expertise" "artificial" by the dictionary: "made or produced by human beings rather than occurring naturally" Artificial Intelligence by the same dictionary: "the theory and development of computer systems able to perform tasks normally requiring human intelligence" So how could one eliminate the "human" form Artificial Intelligence which – by definition – is strictly related to human beings? If we start using words and expressions which can also mean the opposite as well (or something else completely) then we instantly loose our ability to communicate. (That would be like on-the-fly redefining the commands and responses of a protocol in a computer system. The result would be a complete mess.)
-
Who can help with adding a download icon to image fields?
szabesz replied to bernhard's topic in General Support
Thanks! I've added my thumbs-up but where are the others? ;) -
Another factor is the user's personal preference. For example, when adding products to a cart in a webshop, I prefer a short notification of some sort (even just an animated counter on the shopping cart's icon) so that I know my submit action worked, ie. the item was added to cart. I never want to be redirected to the Cart, for example, nor I need a modal window trying to sell me something else as well. So, what is pleasant UX for me might not be a pleasant experience for others and vice versa, of course.
-
If you have the time, maybe reading some Sitepoint articles you can find some useful info. Just a few examples: https://www.sitepoint.com/premium/books/designing-ux-forms/read/1/jzjar4hq/ https://www.sitepoint.com/premium/books/form-design-patterns/read/1/jz0sdfcg/ https://www.sitepoint.com/premium/books/html5-forms-interactive-elements/read/1/ https://www.sitepoint.com/html-forms-constraint-validation-complete-guide/ I have not read those, but in the past I did read some Sitepoint articles and there were all very good reads.