Jump to content

Michael Murphy

  • Posts

  • Joined

  • Last visited

Everything posted by Michael Murphy

  1. I sounds like what you are trying to build is a multi faceted search that updates the filters and results depending on what the user has chosen or typed. I think you are on the right track with the setup you've described, using the Page reference field to apply the categories to each product. The challenge will be how you build the logic of what to show / hide depending on the filters, and combine this into a usable experience. Most of the solutions I've seen are a combination of javascript logic in the front-end that connects to search results via an API. This project called instantsearch.js is a library of UI widgets for building these type of instant-search multi filter type experiences - unfortunately it only works with a commercial hosted search service (algolia), but it may give you some ideas on how to build your solution (some kind of javascript + api combination). This e-commerce example looks similar to what you are trying to build… https://community.algolia.com/instantsearch.js/examples/e-commerce/
  2. I was just doing something similar the other day and managed to get the latest PW installed with one command. Requirements are to have the latest version of Wireshell installed globally via composer. (idea - maybe wireshell could be packaged into a distributable Phar file to make this even easier…) You then need a database and user setup (or just a database user that is allowed to create databases) To create a new PW install with a blank profile in the current directory run this long command with your own details: wireshell new . --profile=blank --dbUser=yourDBuserName --dbPass=yourDBuserPassword --dbName=yourDBname --timezone=Europe/Zurich --httpHosts=yourHostName --username=yourPWadminName --userpass=yourPWadminSecurePassword --useremail=yourEmail.com (idea - maybe these details could be loaded from an external config file for easier CI workflow / setup…) After this you could import fields and templates via Wireshell and I’ve not tested this but on the wireshell forum thread someone mentioned that you can also load templates / fields via a separate json files.
  3. Just wanted to say thanks for creating the Valet driver - it works well with the latest master and dev branches of PW. It is noticeably faster than MAMP, not to mention much easier to setup - just create a new folder and off you go. Also the ease of setting up SSL for local testing is very unique. I've not used it extensively but this feels like the best local development setup I have tried so far (for performance and ease of setup). Interested to hear if anyone has had any issues using Valet for PW development. I am also very impressed by homebrew - it has come a long way since my earlier tests and seems to be very solid since turning 1.0 with lots of additional help to make sure you don't mess anything up.
  4. Why are the modules not listed on the public reference page? for example the MarkupPagerNav is listed (under Additional) but the MarkupPageArray, and many more of the core modules are not (although they can be browsed in the Pro module). Also I agree with @adrian - the ability to see where the file is located and quickly open it would be helpful for learning (see @adrian implementation in the Tracy debugger module). If the API explorer could be used to document our own templates, CSS, SAAS, JS etc. files, this "edit / open file" feature would be useful when collaborating with other developers and might also be a good way for new users to learn about PW from site profiles.
  5. It’s ironic that they release this tool on the day the Snooper's Charter law became official in the UK. The new surveillance law (Investigatory Powers Act) requires web and phone companies to store everyone’s web browsing histories for 12 months and give 48 official groups full access to the data - one of these groups is the GCHQ. These groups will also gain new powers to officially hack into computers and phones to collect communications data in bulk. http://www.wired.co.uk/article/ip-bill-law-details-passed
  6. hi @szabesz thanks, the database backup modules is one of my default modules (probably should be in the core), but I've never tried the upgrade module - maybe I have a strong resistance to any kind of automatic update systems which goes back to some nightmare OS "automatic" upgrades on Windows and Mac Usually I have some sort of git workflow for updates, but on sites that I don't have access to the server (like shared hosting) this upgrade module might be a better and safer option than my manual upgrade process. And the module is built by Ryan then I am sure it is pretty solid and well tested. Thanks for the suggestion! thanks @adrian I have been recently using the tracy debugger and finding it very useful. That is a pretty cool integration for switching between versions, will give it a try!
  7. This sounds like an analytics / marketing type of problem, so maybe researching these types of solutions might help. You will need some way of storing custom user actions - like “a user watches a video” or a “a user downloads a file” probably via javascript. These user actions could be stored in an analytic solution which are well designed to handle this type of data. You could then access the user analytics data via their api, and setup rules in your own code to show your survey based on certain criteria. I’ve not researched this space for while, but from my previous experience Keen.io is a nice hosted solution for doing any type of custom event tracking, and also a good way to learn about these type of analytics systems. The documentation and api is easy to get started with and they have a very reasonable free plan (15 million events per month), which will probably cover most situations. https://keen.io/guides/data-modeling-guide/ https://keen.io/docs/data-collection/ Piwik is a stable open source hosted solution for analytics, and they also have a user events tracking feature. I don’t know how well it fares against some of the commercial solutions for tracking user events (like Mixpanel etc.) but is definitely worth a look http://piwik.org/docs/event-tracking/ I was recently looking at an open source marketing application called Mautic and they classify this type of thing as a "Campaign". Maybe you can integrate Mautic into your own app or learn from their implementation how they solved a similar problem… https://mautic.org/docs/en/campaigns/campaign_builder.html
  8. I also worry about doing upgrades despite having done it so many times. The least stressful approach I have found is to rename the existing wire folder, index.php and .htaccess files, and then upload the new ones. So first I rename the existing files like this: wire-old index-old.php .htaccess-old Then I copy over the latest wire, index.php and .htaccess files. If something goes wrong during the upgrade, you can then easily delete these new files and rename the -old files. This approach feels quicker and also avoids those dialogs asking about overwriting files.
  9. To update those on this thread, Ryan just pushed some fixes to the dev branch which fixed this issue for me, maybe also for you. Amazing turnaround - less than 5 days (3 actual working days) from a bug submission to a working fix. Big up respect to @ryan Would be interesting to hear what people are planning to use the multi-instance support for. My initial needs are for some content migration between two sites, but I can imagine using it for much more in the future.
  10. Sounds like an interesting idea. The multi-instance support may be able to do this in the future according to Ryans blog post, so I guess secure authentication / communication between two apps will be something that has to be solved at some point. Maybe you can look at using an Oauth solution. The Oauth2 server from the PHP league seems to be highly recommended https://oauth2.thephpleague.com/ and they also have an Oauth client… http://oauth2-client.thephpleague.com/ Laravel recently integrated this Oauth2 server and called it Passport, to make doing authentication very easy. It’s explained here: https://laravel.com/docs/5.3/passport
  11. I just tested with two fresh installs of the master branch using the multi-language default profile. Seems to be a bug, so submitted this to the issues repository: https://github.com/processwire/processwire-issues/issues/60
  12. I am also having the same issue with 3.0.36 - it only seems to affect multilanguage fields like TextLanguage, PageTitleLanguage and TextareaLanguage. Has anyone found a work around or should I add this to the issues repository?
  13. Thanks for the reply and further clarification. Would you recommend doing all field and template changes in code, and avoid using the UI? Is this something you would do from the start of building a PW project (completely avoiding the UI), or just after the initial build (using the UI) I would be fine with that, and have always thought it would be nice to manage this in a text file. Do you have any more detailed example snippets of what this would look like? I will be interested to hear how you use this with a fellow collaborator. One thing I am interested in is collaboration while developing, the other is maintenance / upgrade path for shared site profiles. I am starting to see this module as a way to safely manage changes or updates for many common tasks that we sometimes have to do with PW. And I like the idea of having shared snippets, a bit like the PW recipes (maybe a new category for that site?). Another use case idea for multilingual sites would be a snippet that allows a site to easily change the default language by swapping all the field values.
  14. Thanks for your work on this, it’s a feature many of us have been after for a while and is much appreciated. I have been playing around with the module and I think I understand how it works, but I would appreciate some further clarification on how I can use it. Modifying or adding templates + fields My most common use case is migrating field and template changes from my local development to a production server. What I currently do is 1. check in my template php file changes 2. deploy files to production 3. backup production database. 4. apply the template / field changes on the production site by exporting the json files from /setup/(template|field)/export/ and importing them via /setup/(template|field)/import/ within the PW admin. With this module, can I now copy these json files into a migration file and deploy them with the rest of my files, and then run the migrations module on the production site? Is there any way to “record” or log all template and field changes as you are developing and then import them into a migrations script? Other use cases Some other scenarios that I would like to use this module for… Changing existing data Like changing all users with role “editor” to use a new admin theme. Migrating from one field to another Like migrating pages from a PageTable field to a RepeaterMatrix field (something I am planning to do!) Collaboration workflow I am very interested to hear how this could be used with a team of developers working on the same PW project. How would you keep all the developers and designers using the latest version, notifying them when they need to run a migrations script etc. Something like this… 1. Store project files in version control including migration script 2. Push files and deploy 3. Other team members pull latest version - they are somehow notfied of a new migrations script to run (in PW admin maybe) 3. Backup db 4. Run migrations 5. Everyone hugs each other to celebrate all the extra time they have saved while doing migrations. Upgrading site profiles Could this be used to manage site profiles and keep them updated? For example, if Ryan makes some field / template changes to the blog profile, could this module be used to update existing users who already have the blog profile installed? It would be nice to work out a way to have an upgrade path for site profile development. Thanks!
  15. If you can't find a way to disable the button, maybe just hide it with CSS or JS? I've done this directly in the admin theme before, but it might be worth researching the module called "Admin Custom Files". I've not used it yet, but it looks like a better way to manage any custom admin changes you plan to make. http://modules.processwire.com/modules/admin-custom-files/
  16. @caribou I have also been thinking the same thing recently - that it would be nice to have a visual way to browse the Page field. After discovering the excellent "Page Field Edit Links " module (which I think was added to the core in 2.6.17??), I have been using the Page field to manage a shared collection of media assets (videos, images and documents). With the additional "Page Field Edit Links" module, it allows the users to search, add and edit media from the the shared collections without leaving the page. The only issue is that it's text search only - a thumbnail would be very useful here for searching, and then to show what was selected. Also an icon or a custom image would be nice to distinguish between different page templates (videos, images, documents etc,). The Select2 jquery plugin has some examples of this: https://select2.github.io/examples.html#templating If the Page field can be extended to include more custom content (like images and icons), I am thinking it might be a good solution for a simple "content block" type setup. I am currently using the PageTable field for a "content block" type setup - it works well, but it has some user experience issues that I think the Page field would avoid. @kongondo could you explain a bit more what you module does?
  17. @Reid Bramblett Have you tried adding a selector in the $page->children call? $page->children("address!=0") Maybe you could combine this with the $page->siblings $page->siblings("address!=0") Regarding the original post by @diogo, how do people check for fields that return an array like image and page fields? This is what I do, but maybe there is a more elegant way? <?php if($page->images->count() > 0): ?>
  18. This issue was fixed in the latest dev branch - 2.5.10 dev. Thanks Ryan!
  19. Hi Oliver, Thanks for sharing this, it's always interesting to see how others setup their projects. Could you give an example of how this would be used in a typical project? Like a portfolio site or a simple online shop.
  20. @Macrura thanks I will have a look at your module. @Valery this is a good idea, thanks. I will probably just add a Page field (with Page Auto Complete) to the template which will allow the editors to easily choose any other page.
  21. Thanks for testing @owzim, much appreciated. I guess this is a bug, so I will open an issue on github (unless someone else has an idea).
  22. Hi Macrura, That is what I have told the editors to do for now until I work out what is wrong. The reason I would like to do this is because I want to allow the editors different ways of managing the content outside of the PageTable field context. First I have added some helper links on the front end that allows editors to easily edit the PageTable pages. I have also setup some Lister pro saved searches for certain PageTable pages (I call them "Content Blocks") like for "Video blocks" and "Image blocks" - so an editor can easily change any of the videos or images from the Lister view (almost like a media manager). Thanks!
  23. I want to allow extra markup in the image description field (for basic formatting and links etc.). I have added Markdown to the "Text formatters (for file descriptions)" on the Images field, but it does not seem to be rendering the markdown in my templates. Processwire version : 2.5.8 dev Modifications : I have ProcessCropImage and the Language support for Fields and Page Names installed When i try to render the image description in my template : echo $image->description; It shows the text and seems to recognise and strip out the markdown tags (e.g. **This** becomes This), but does not actually render any html. Any ideas what is going wrong? It kind of makes sense that the default behaviour does not output any html (in case you use it as image alt text for example), so maybe there is an extra way to render the markup? Thanks for any help.
  24. Hi @Valery, I have also been looking for this "add an existing page" option for the PageTable. I have yet to find it, but after reading this thread, maybe it is only visible when you have the PageTable pages stored as children of the parent page. I am always storing my PageTable pages in a separate hidden folder. Would be nice to have this as an alternative way to add or import pages into a PageTable. Was also wondering if it would be possible to have one page in multiple PageTable fields (like a reusable common page). Otherwise I am really liking this PageTable field and finding it very useful in all my recent client projects. It allows for some really interesting design and layout possibilities for mixed media and content heavy sites.
  25. I am having problems deleting pages used by a PageTable and PageTableExtended field Processwire version : 2.5.8 dev Modifications : I have installed Language support for Fields and Page Names. This issue affects the PageTable and PageTableExtended modules - they are both slightly different but maybe connected somehow. That could be because of the whole interconnectedness of everything or because they have almost the same name. With the PageTable I am storing the PageTable pages in a hidden folder called "Videos". If I delete one of these pages outside of where the PageTable is being used (i.e. from the "Videos" folder) the following happens : If I am logged in as root admin, the deleted PageTable page is greyed out, I can open the page and edit, but there is a message that : This page is in the Trash And there is no way from this dialog to restore the page (of course you can go manually to the trash and restore it). If I am logged in as an editor (with reduced permissions but including "page-delete") - the deleted PageTable page is greyed out, but when I try to edit the page, there is an error message. Module ProcessPageEdit failed init - You don't have access to edit No page found And it is not possible to edit the page. With the PageTableExtended I am storing the PageTableExtended pages in a hidden folder called "Content Blocks". If I delete one of these pages outside of where the PageTable is being used (i.e. from the "Content Blocks" folder). When logged in as root admin and also as an editor (with reduced permissions but including "page-delete") I get the following error when trying to edit the page where the PageTableExtended is being used. Page '/en/trash/1743_content-block-36/' is not currently viewable. The only way to allow them to edit the page again, is to go into the trash and restore the deleted content block back to it's original location (the "Content Blocks" folder). Thanks for any help!
  • Create New...