Jump to content

Ivan Gretsky

Members
  • Posts

    1,459
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. There is a specific type of modules in PW called Text Formatters for doing just that. They parse text field contents before they get output and can change things based on regular expressions. Just make a new text formatter module based on something simple like this and adjust it to your needs. You probably could change the initial behaviour somehow too if this solution does not work out.
  2. Very interesting topic. I surely can relate to the thing that the new CKEditor 5 seems weird for those used to work mostly with html and DOM (like myself). But I can see that it is very much in line with content editing principles @ryan initially put in ProcessWire. By default we can't put too much raw html and especially js in CKEditor fields. This stuff all gets striped out if you do not take time to configure otherwise (and this configuration is not that easy if not just simply turning everything off). So it might be CKEditor 5 is the best choice for content editing as defined by PW by default. And it can be configured even easier (by those who know how to). The main problem I can see is that there may be lack of developer's experience to get it all right for PW, as most of us here seem not to be easy with modern js development workflow.
  3. Thanks for your work on docs, @ryan! Actually your way of presenting and explaining things is as an important feature of ProcessWire as its beloved API. I remember being "hooked" after watching that gentle introductory video, way before I understood anything (could not find it to link here, is it gone?) Nowadays forum newcomers do not get much direct response from you (except for pro boards - and that is another reason to buy Pro modules ?), so probably even do not know about your way of turning answers to simple questions to profound mini-tutorials, often with some philosophical background. And that makes this documentation updated by you even more meaningful (Luckily those forum gurus that handle most of the never-ending questions are still inspired and hold the spirit of wise goodwill that make this place so great to be at). And those connections between established documentation and the constantly updating blog you wrote about are not only the new way to obtain more knowledge, but also a way to show the power of ProcessWire Page field in action on a site that should be an outstanding example of the system. The only thing i wish would happen but not yet happening is a community collaboration on creating, updating, linking the contents of the site, as well as designing and building it. You did say that the latter is about to happen, we do not discuss the former too much. So I suggest we think about the means by which the community can help you better in maintaining the docs and updating them gradually, so they are always up to date. These times most collaborative documentation is written under some kind of source control systems like git and afterwards presented with static site generators. I doubt this is a good way to go for a CMS project like PW (we should be eating our own dog food). But maybe we could use a mechanism of keeping contents in github and importing it to PW docs site when it is upgraded? Like the one use in ProcessWire Recipies website? That way we could help. And that is probably one of the best way to make happen the docs translation you talked about in the last post. Do you think we should explore this, or maybe you have something more profound already planned?
  4. Browsing this new Pundits' site a came across this little blog. Although it was spotted before by @diogo, I thought it might be a good idea to link it here, as it has a couple of PW cases described and seems to be made with PW itself.
  5. I am sure it is something useful not only in my case, but for Tracy usage in general. I'll be glad to at least test it if not switch to it for that dev/prod PW project if it will be implemented. I am pretty sure I never sent emails on init events.
  6. Going back to the original question, here are a couple of ways to get rid of too much pages. You could use URL segments instead of a page hierarchy to route requests to your REST class (hope I am using the right words)))) You could install some 3rd party router (maybe even laravel's own) via composer, include it the root api template and use it to route requests to your REST class. You could use GraphQL instead of REST.
  7. One more offtop question here, @adrian. Is it possible to set Tracy mail interceptor option programmatically as part of environment config?
  8. Will this method work everywhere, @adrian ? I mean sending emails from hooks and scripts bootstraping PW initiated via cron? I really can't allow to accidentally send a few letters))
  9. Here it is, @adrian. Not in the modules directory, unsupported, and does not work without some minor modifications with recent WireMail versions, but serves me well for quite a while. Thanks, @LostKobrakai!
  10. Thanks, @horst. That was about what I was thinking. But my desire was to use predefined WireMail instance as a lot of code already relies on it. As I can guess from your answer there is no way to be sure which of the installed WireMail modules will be used in $mail API variable... Or is there? I am asking again thinking about the other use case I am keeping in mind. I am using your wonderful WireMailSmtp for production, but switch to @LostKobrakai's WireMail Testing in dev. So I wish I could have both installed and use one of them for $mail depending on some $env variable. Is there a way to do it?
  11. Good day! I need to use 2 different modules which extend WireMail in the same script (WireMailSmtp and WireMail Mailgun). How do I do it?
  12. Seems like a nice addition to your in-place documentation module suite, @Macrura: + I think that with PW in-place docs are a real help for editors. And you are the expert in this field. I would love to read or watch a screencast about all those modules used together. If you could find time to share your knowledge, that would surely be an awesome gift to the community. And yes, that is just a fancy way to ask something free for myself ?
  13. This is how it works in Bitrix, popular Russian proprietary CMS:
  14. Not answering you question directly, but to provide alternatives to solve the problem. There is a commercial module by kongondo that does just that. And another open source and free one by justb3a that does something similar.
  15. Hi @louisstephens! Are you putting all that js inside a foreach? If so the variable names are the same for each list element. Therefore they get overwritten and you always get the last value in your itemId. Either change the variables to have index as part of their name (itemId1, itemId2) or (preferably) store the id as a data attribute and write a universal js which will get the corresponding data-attr value for each button click dynamically. If I totally misunderstood you case, please forgive me and provide some more details.
  16. It seems like browsers do not need an extension to recognize the image MIME type. But ProcessWire Image Field limits files that you can add to it by extension list (see field's Details tab). I am not sure if you can configure it to accept no extension (probably not). But you could write some script to add an extension to the image based on its MIME type before adding it to the field. PHP should be capable of doing it easily.
  17. My simple Google search gave me this module (and this discussion as a bonus). Maybe it will help you.
  18. Hey, @quickjeff! There is already a discussion going on here. Maybe you will find something useful. But as I see it, not really much to be done on PW side, but rather on developer side.
  19. Seems like you just want to email the contents of the cart. You probably do not even need to store the data, just send it right away like this or with FormBuilder (which seems like handy thing for you anyway).
  20. I am still confused where you at and what you are trying to achieve: The form is on a product page and you want to store the selected number of products to display in the cart later. The form is at the end of a checkout process and you need to make a new order ...something else, like my 1st assumption. But let's think you know what you are doing and you want to save shopping cart contents (one or many product, quantity and price) to database and make that connected to the user currently logged in. You need to decide, where are you going to store that data in PW, choose a fieldtype for that. It can be a Repeater, ProFields Table or some specially crafted custom fieldtype. Those all fit as the are capable of storing random number of defined data (product, quantity and price). Them you need to create s field based on that fieldtype and configure it. Than add it to desired template. Depending on your case you could add that field directly to user template. But much more likely you need to create a new template (probably, "order" or something like that) and add this field there. On form submission you would use PW API to get the data from the user $input and save it in the created field on use page or order page. How to do that depend on the chosen field and template it was added to. Explain the case better please.
  21. Welcome to the forums, @hellboy! As I can understand, you want to store the content of the last (or maybe more than one) abandoned shopping cart in the db, so retuning customers can continue the purchase. This is all possible with ProcessWire. But PW does not have shopping cart feature out of the box, so I guess you either bought Padloper module or crafted something yourself. Not sure about all those terms you use like 'Userdatabase' and stuff. Could you explain a little bit, how are products stored within your ProcessWire installation, so we can suggest how to store information about them.
  22. There is a couple long trending repos with checklists on github: https://github.com/thedaviddias/Front-End-Checklist https://github.com/thedaviddias/Front-End-Design-Checklist ...and a whole lot more of alike here. I know, I 'm not sharing something of my own as you asked, but a something to start with anyway.
  23. I tried to instruct composer running from PW root to put vendor one level up in the folder tree with vendor-dir setting. It seems not to work (at least with the relative path I provided). Did you manage to solve this, @gmclelland? Or are you moving the vendor folder manually? If so, maybe a simple require_once('../../vendor/autoload.php'); in site/init.php can help?
×
×
  • Create New...