Kiwi Chris

Members
  • Content count

    35
  • Joined

  • Last visited

  • Days Won

    1

Kiwi Chris last won the day on November 13

Kiwi Chris had the most liked content!

Community Reputation

87 Excellent

About Kiwi Chris

  • Rank
    Jr. Member

Profile Information

  • Location
    New Zealand

Recent Profile Visitors

411 profile views
  1. You got me thinking. I do work as a single developer, but increasingly I'm finding I want to deploy solutions I've developed for one project to another, and just copying and pasting via the admin isn't ideal. I was having a look at Silverstripe recently, as I have a possible project where Processwire, though I'm sure can do the job, might meet some resistance, whereas Silverstripe will almost certainly be accepted as it's mandated as the CMS of choice by government here (NZ). What struck me is that you can do far more with Processwire with less coding, but in some cases defining data structures via coding rather than via an admin UI may be more appropriate for sharing code between projects or in the case of a team between team members. Processwire is perfectly capable of doing this as the admin UI is just a layer on top of the API, so there's no reason why fields and templates can't be defined programmatically in modules that are subject to version control. I notice that some of the existing modules actually consist of several dependant sub-modules, bundled in a common folder, so it would be easy to set up something like this with git version control. Silverstripe automatically rebuilds database schema by using a /build URL, however it doesn't remove unneeded fields or tables after a schema change, whereas the Processwire API makes it fairly easy to both add and remove fields via a module. Processwire will detect changes to a module version, and run any update process automatically, so even though it bypasses the ease of use of the admin UI, developing your database schema programmatically in modules might ease collaborative development.
  2. Are you using the HTML5 srcset attribute to provide different sizes of the images for different screen resolutions? I've found about 60 quality is as optimised as is needed, so long as the images are the right size for the resolution they are displaying at. Even if you're only a few pixels larger than the screen resolution being rendered, I think Pagespeed insights can make a fuss. Also, in the core - can't remember the exact module, I think I changed the image resizing function to use progressive encoding, as that can result in faster rendering of jpgs as they can start rendering before they're loaded. I can't find where I did this now, and it would be nice for it to be officially part of the core to have the option for progressive encoded jpgs.
  3. The beauty of Processwire is that it doesn't predefine output of content, so there's no reason why you couldn't create a template that returns JSON and call it using an ajax request from the HTML template that you want to update. It does mean two templates for one page, although using URL segments it might be possible to have a single template that can return either HTML or JSON depending on the value of the URL segment, although you could do that with parameters as well.
  4. Good question. I'm not sure how good it is as it stands, but it is built on top of Processwire's form handling classes. I think it would be pretty easy to modify Form Template Processor. There's already a property 'skipFields' to list fields from the template that are not rendered, and this is checked at both the point of rendering, and before sending an email. It would be easy enough to add another property say 'hiddenFields' that are rendered but not output in email, and with a bit of CSS set up a hidden field that can be used as a honeypot.
  5. I just had an issue with a site where end users were pasting content from Word. There is a Paste From Word plugin, but that still leaves a lot of formatting and overrides the paste as plain text. To resolve this I did the following: Custom Config Options forcePasteAsPlainText: true Remove Plugins I added pastefromword to the end of the list already there.
  6. Forms are an essential part of most websites, and it's no surprise that there's an excellent premium module Form Builder but what if you're on a zero budget for whatever reason? It is possible to build forms quickly and easily by making use of a couple of free modules and the admin UI to give you a great deal of flexibility and speed of development, particularly if you need multiple forms on a website with different fields. 1. First you're going to need to install a couple of modules: Form Template Processor Fieldtype Select External Option 2. For each form that you want to display, create a template without a template file and add fields to it as you normally would. (eg I have formContact, formRegister etc) Tip: under the Advanced tab in the setup for each template, I add a tag Forms so that all my forms templates are nicely grouped together in admin. 3. Create a new field of type Select External Option and call it formTemplate In the section Create options from any database table select templates as the source table id as the Option Value name as the Option Label 4. Create a new template file and call it renderForm.php (or whatever else you like) Add an email field to this form - This will be the email address that forms get submitted to. Add the formTemplate field you previously created to this form. This will allow you to select which of the templates you previously created such as formContact, formRegister etc you want to render. Add any other fields as usual that you want to render on the page. Add the following PHP code to the template file. $recipient = $page->email; $form = $modules->get('FormTemplateProcessor'); $form->template = $templates->get($page->formTemplate->label); // required $form->requiredFields = array('contactName', 'contactEmail', 'contactMesssage'); //Optional: This can be improved by having a field in the page template with a CSV list of required fields eg $form->requiredFields = explode(',', $page->requiredFields) $form->email = $recipient; // optional, sends form as email. FormTemplateProcessor can also save forms to the database. $content .= $form->render(); //generate the form to display. Note: this doesn't actually render the form at this point, but you have it in the $content variable ready to output wherever you want in your template. Add any template HTML or other PHP code and echo $content; wherever you want to render the form. 5. Create a page using the renderForm template, and provide an email address, and select a form that you want to display. 6. Use CSS to style the form as required. 7. View your new page, and check that the form renders correctly. 8. You can modify the templates you created at step 2 or create new ones as required if your requirements for what fields forms display changes. Note: The Form Template Processor module can also save form input as pages, and the FieldType Select External Option can be set up with filtering, so this solution can probably be refined further.
  7. Apart from what I've already mentioned, in response to DaveP, I'm running on PHP 7.1 I noticed over in another thread here: https://processwire.com/talk/topic/17707-php-in-2017-rasmus-lerdorf-wearedevelopers-conference-2017/ The creator of PHP mentioned in the video that there's a big difference in performance between PHP 5.x and 7.x so that may be having some impact on performance too.
  8. I have to admit I like Umbraco as an ASP.Net CMS as it has a similar philosophy to Processwire where everything is customisable, and you can create templates with whatever fields you like out of the box. ASP.Net is both its strength and weakness though in that if you need an ASP.Net based solution, Umbraco is good, but most of the time a PHP based solution is fine. I think Processwire is easier for beginners without a lot of coding experience. I like Umbraco's permissions system better, and the separation between document types and templates is handy if you need multiple templates for the same data, but just creates extra work if you don't. I'd say Processwire's documentation is outstanding, and quite apart from the CMS itself is part of what sets it apart.
  9. Hopefully there will be some listings for the Wakamarina on there in future. I remember school camps up at Deep Creek. The old site was pretty ugly and I suspect that didn't attract members. Hopefully with the refresh, people will be more enthusiastic about the site and it will grow.
  10. When someone first introduced me to Processwire, I spent about 20 minutes reading the documentation and I knew enough to start building things with it. In contrast, I spent about two hours reading Wordpress documentation, and I still didn't find it incredibly clear if I wanted to build a site from scratch as opposed to just grabbing an existing theme and plugins. If you come from a CMS where you can just install ready-made themes and plugins, Processwire can seem a bit minimalistic, but once you work out how fields and templates work, you realise you can do what other systems can require multiple plugins for out of the box, built into the core CMS. There are modules (in place of plugins) that can speed up development. I found the SITE PROFILE EXPORTER module very handy, as once I'd built a few sites, I could duplicate much of the setup quickly and easily from an existing site if I really wanted to copy anything.
  11. Processwire's image handling is great for generating different sized images for the srcset attribute in HTML 5. It can make the initial page load a bit slow after an image is first uploaded, but it's fast after that.
  12. More than a year after I submitted a proposal, I finally was given the contract to build a new website for a regional promotion organisation, promoting a very sparsely populated part of NZ. https://www.pelorus.nz/ The original website I think was running CMS Made Simple, however it was not mobile friendly, and the organisation of directory listings into categories was unreliable, and edits required requests to the original developer. My brief was to make the site mobile friendly, and user editable, although I also ended up providing some of the photography as some of the site owners were slow to come forward with material themselves. I didn't rewrite content as that was beyond the scope of what I was asked to provide. Bootstrap 4 came out after I'd already started the project, so it's built using Bootstrap 3. Modules I used: Admin Restrict Branch (So owners of listings can log in and edit their own listings, but nothing more) AIOM+ - I found the LESS compilation handy, as I could work with the Bootstrap source files and adjust variables rather than overriding compiled bootstrap. Fieldtype Phone - so I could easily format phone numbers so that they would work both as URLs and display correctly. Social Share Buttons - although I created a modified colour set of icons. Jumplinks - to map URLs from old site to maintain SEO.
  13. Nice site. Saudades! I met my wife in Porto and loved the place even though it's almost the antipodes of where I live. Processwire certainly lends itself to redeveloping sites. I inherited a tediously slow Concrete 5 site some time ago and found it easy to convert to Processwire. I also had a lot of old sites I'd built with a proprietary CMS I'd developed myself from way back before Wordpress was a thing. I love the way Processwire gets out of your way and lets you build whatever site structure you want without imposing itself. It makes adapting existing sites easy.
  14. I'm having an issue with the module. When I add an additional field to an existing image field and try to edit the page I get an error like: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_headerImage.title' in 'field list' I get a similar but more verbose error on the frontend trying to view the page. Removing the additional field resumes normal behaviour for the page. I have other fields that I've added a title field to that work fine, so it's worked in the past, and image fields that already have custom fields have no problem, but I can't add more. I'm working with the latest build of PW (3.0.79)