benbyf Posted April 3, 2017 Share Posted April 3, 2017 Looking to write a tricks and tips article, anyone got anything which is SUPER useful for Processwire users which sits outside of installation and general usage and structure? Maybe things you wish you were told, or little tricks to get around restrictions or issues. 2 Link to comment Share on other sites More sharing options...
szabesz Posted April 3, 2017 Share Posted April 3, 2017 Hi @benbyf I cannot come up with something that has not been addressed in the forums in some way or another, there is so much buried here that it is probably impossible to decide what should be highlighted more than others. It might not fit your current needs, but what I would like to see in a more concise/tutorial like manner is implementing complete frontend user features from scratch. Well, maybe not from scratch, you could use UIkit 3 to do the design stuff, but other than that only pure PW could be used, even without the backend's form API. Something like this one turned into a complete tutorial: Such a tutorial would not only provide on solution to the long standing "how to do frontend users" dilemma, but it would also be a great example of implementing forms, sending emails, etc.. 2 Link to comment Share on other sites More sharing options...
kongondo Posted April 3, 2017 Share Posted April 3, 2017 Not sure if you can use these, but this, to the best of my knowledge, is the home of PW Tips and Tricks: https://processwire-recipes.com/ 5 Link to comment Share on other sites More sharing options...
Craig Posted April 4, 2017 Share Posted April 4, 2017 You can double-click the bin icon on file/image fields to mark all items for deletion. 5 Link to comment Share on other sites More sharing options...
szabesz Posted April 4, 2017 Share Posted April 4, 2017 (edited) Yeah, it would be a good idea to make a cheat sheet on these hidden "shortcuts". Edited April 5, 2017 by szabesz typo 3 Link to comment Share on other sites More sharing options...
benbyf Posted April 4, 2017 Author Share Posted April 4, 2017 21 hours ago, szabesz said: Hi @benbyf I cannot come up with something that has not been addressed in the forums in some way or another, there is so much buried here that it is probably impossible to decide what should be highlighted more than others. It might not fit your current needs, but what I would like to see in a more concise/tutorial like manner is implementing complete frontend user features from scratch. Well, maybe not from scratch, you could use UIkit 3 to do the design stuff, but other than that only pure PW could be used, even without the backend's form API. Something like this one turned into a complete tutorial: Such a tutorial would not only provide on solution to the long standing "how to do frontend users" dilemma, but it would also be a great example of implementing forms, sending emails, etc.. might address this somewhat with the revamped subscribers module which im going to be working on soon... what did you want to see? I though of putting together a site profile job site as an example of how to use it in production. 3 Link to comment Share on other sites More sharing options...
benbyf Posted April 4, 2017 Author Share Posted April 4, 2017 4 hours ago, Craig A Rodway said: You can double-click the bin icon on file/image fields to mark all items for deletion. this is PERFECT thanks! I never knew! 1 Link to comment Share on other sites More sharing options...
szabesz Posted April 4, 2017 Share Posted April 4, 2017 3 minutes ago, benbyf said: might address this somewhat with the revamped subscribers module which im going to be working on soon... what did you want to see? I though of putting together a site profile job site as an example of how to use it in production. This sounds great to me! Tricks and tips can be useful, but if you have the time, a tutorial can be more helpful, but obviously requires more time. The topic of "newsletters and frontend users" is worth the effort, I think. I'm thinking of targeting somewhat experienced developers new to ProcessWire, so you should not have to delve into all the details, but provide working example code with comments and some explanation, just like you did in the case of your Beginner’s modules tutorial, but this time it would be more lengthy I think. 2 Link to comment Share on other sites More sharing options...
Sergio Posted April 5, 2017 Share Posted April 5, 2017 (edited) On 4/4/2017 at 10:17 AM, szabesz said: This sounds great to me! Tricks and tips can be useful, but if you have the time, a tutorial can be more helpful, but obviously requires more time. The topic of "newsletters and frontend users" is worth the effort, I think. I'm thinking of targeting somewhat experienced developers new to ProcessWire, so you should not have to delve into all the details, but provide working example code with comments and some explanation, just like you did in the case of your Beginner’s modules tutorial, but this time it would be more lengthy I think. For a project I've posted yesterday I built a basic module to subscribe users to a Sendy installation. I love Sendy and my client too as we use it to send lots of emails using Amazon SES costing almost nothing at all. Do guys think that's worth to post about? It's very basic now, it doesn't use Sendy's API at all, it just send the data using POST to subscribe the users to different lists. Edited April 5, 2017 by Sérgio grammar 4 Link to comment Share on other sites More sharing options...
szabesz Posted April 5, 2017 Share Posted April 5, 2017 2 minutes ago, Sérgio said: to send lots of emails using Amazon SES costing almost nothing at all. Do guys think that's worth to post about? Definitely 3 Link to comment Share on other sites More sharing options...
Sergio Posted May 15, 2018 Share Posted May 15, 2018 On 4/5/2017 at 11:19 AM, Sergio said: For a project I've posted yesterday I built a basic module to subscribe users to a Sendy installation. I love Sendy and my client too as we use it to send lots of emails using Amazon SES costing almost nothing at all. Do guys think that's worth to post about? It's very basic now, it doesn't use Sendy's API at all, it just send the data using POST to subscribe the users to different lists. I added the source code on this post: 2 Link to comment Share on other sites More sharing options...
dragan Posted May 15, 2018 Share Posted May 15, 2018 Over the years, I accumulated so many custom API scripts, that I have decided at some point to simply include a special template in my PW boilerplate that holds all these utility / "batch-operation" API scripts in one place. In the template settings, I allow URL segments, and make sure access is for superusers only. This "API-scripts" template has (for better maintainability / readability) a simple switch/case that loads a certain .php file via include: Spoiler <?php namespace ProcessWire; if( !$user->isSuperuser() ) { return $this->halt(); } switch ($input->urlSegment1) { case 'set-live-urls': include_once('actions/set-live-urls.php'); break; case 'cleanup-client-names': include_once('actions/cleanup-client-names.php'); break; case 'client-names': include_once('actions/client-names.php'); break; case 'field-edit': include_once('actions/field-edit.php'); break; case 'wp': include_once('actions/wp.php'); break; case 'dexter': include_once('actions/dexter.php'); break; case 'fields': include_once('actions/template-and-field-listing.php'); break; case 'add-industry-from-vertec': include_once('actions/add-industry-according-to-vertec-codes.php'); break; case 'fieldsets': include_once('actions/getFieldsetOf.php'); break; case 'handson-table': include_once('actions/handson-table.php'); break; case 'image-tags': include_once('actions/image-tags.php'); break; case 'mapping': include_once('actions/mapping.php'); break; case 'page-lock': include_once('actions/page-lock.php'); break; case 'create-cms-partners': include_once('actions/pages-create-cms-partners.php'); break; case 'reset': include_once('actions/reset.php'); break; case 'users-create': include_once('actions/users-create.php'); break; case 'users-edit': include_once('users-edit.php'); break; case 'users-listing': include_once('users-listing.php'); break; case 'vertec-check': include_once('vertec-check.php'); break; default: break; } return $this->halt(); So, if e.g. I need a quick listing / overview of all fields that a certain template has, I go to: mysite.com/api-scripts/fields - then I go back and lock the template again = comment the first few lines for security reasons (one can never be too paranoid...). For me, these are big time-savers, because even if you have to modify the included scripts for the current project, at least I don't have to search for these scripts over and over again and guess "where have I been using something similar the last time?" tl;dr: It's like having the whole PW-recipes site (and more) always at your fingertips ? 6 Link to comment Share on other sites More sharing options...
bernhard Posted May 16, 2018 Share Posted May 16, 2018 @dragan do you know adrians admin actions module? Link to comment Share on other sites More sharing options...
dragan Posted May 16, 2018 Share Posted May 16, 2018 4 minutes ago, bernhard said: @dragan do you know adrians admin actions module? Sure. I have that installed as well. But very often, I need to do stuff that's not possible with that module, or simply easier to do writing a few lines of code myself. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now