Jump to content

Kiwi Chris

Members
  • Posts

    266
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Kiwi Chris

  1. Welcome to Processwire! I inherited a club website built in Concrete 5, and it was so slow that page loads were taking over 20 seconds. The way the site had been structured wasn't particularly intuitive either. I'm not sure if it was a Concrete 5 issue or poor implementation, but after I converted it to Processwire, I had a dramatic improvement in page load times, and found the page editing was far more intuitive to the point I could hand over day-to-day editing to non-technical users, whereas the previous webmaster, even with several years using the system and some technical knowledge, still ended up making mistakes on Concrete 5. Processwire passed my '1/2 hour test', ie by looking at the documentation for no more than 1/2 an hour, I was able to have enough of an understanding of the system to start customising sites. As a developer, a 2 minute install is nice, but if it then takes hours to understand the structure of the system to start customisation, then it's not great.
  2. This is quite an old thread, but I've just come up with a requirement for similar functionality. This would be hugely useful functionality to have. Any update on this, and compatibility with Processwire 3? I've had a look in the modules directory under field types and can't see anything?
  3. Same. I've been looking for the support forum, but this is the closest I've got.
  4. I have added an additional field called price, which starts with a $ symbol. Every time the page is saved, whether or not there is an output formatter set, an additional \ is added in front of the $ symbol, so if you save say five times you end up with \\\\\$
  5. On PW 3.0.92 on my production server with Maria DB 10.2.12 I get the following error when trying to save a page with the fieldtype, even though all the fields have been filled out. Error saving field "businessHours" - SQLSTATE[HY000]: General error: 1364 Field 'data' doesn't have a default value On my WAMP setup with mySQL 5.7.14 it does work. I managed to create a workaround by manually editing the table design in phpMyAdmin and setting a default value for the data field to 0.
  6. That would be a good model. If only people with a certain level of contribution could post comments, that would likely prevent new users coming along and posting questions on the documentation site. Stack Exchange uses reputation based management to restrict some activities and responses I think, and the model works well there.
  7. I think one way possibly to encourage more unified documentation would be to allow user comments on official documentation like PHP documentation or MSDN. Currently it appears that there's no way to comment on official documentation, and that encourages fragmentation, as you either have to post in the forums or on another site. I understand moderation might be an issue, as questions belong in the forums, not in the official documentation, but user contributed examples and tips would make sense as comments with the official documentation. Comments allowing links could also refer to relevant threads in the forums or external articles to avoid having to reinvent what's already available. The official modules directory already allows comments, so presumably it wouldn't be too hard to add something similar to documentation?
  8. It would be nice if the installer treated site profiles installation like module installation. Currently it will pick up any profiles in the appropriate directory, and I use the export site profile module to create my own for reuse. Modules work this way too by scanning the modules directory, but also offer the option to install by providing a module class name to download from the official modules directory, a URL, or an upload. Of course modules are installed like this after the base Processwire installation is already configured, whereas site profiles need to be chosen at install time, however if functionality were similar for site profiles, this would allow for both offline and online installation, and allow the included profiles to be kept to a bare minimum.
  9. I watched that video posted in another thread, and afterwards made sure that all my sites were running on PHP 7.1 It seems to have made a significant improvement to performance.
  10. I haven't used Atom personally, but looking at the documentation, the PHP plugin looks like an early release and it doesn't mention debugging, but VSCode seems to support full debugging. Someone who's used Atom may be able to comment regarding debugging.
  11. @szabesz any progress on this? Decimal is a fundamental data type of most dialects of SQL for the reasons that have been outlined in this thread. Over three years and it's still not in the core seems to be a rather long time for what should be a standard fieldtype. It's great someone has done a third-party module, but it would be nice if it were in the core.
  12. If you want a free IDE with code completion and conditional breakpoints, it might be worth trying Visual Studio Code. It's considered more an editor than a full blown IDE, but it supports intellisense (Microsoft's version of code-completion) and It's cross-platform, and unlike Netbeans, it does support Xdebug's conditional breakpoints and quite a bit more. I think the full-blown Visual Studio supports PHP debugging too, but Visual Studio is a bit of a monster and Windows only, so you probably need to be using it for other development already to justify it.
  13. Unfortunaely no. Netbeans integrates with Xdebug which does support conditional breakpoints, but somehow it hasn't made it into Netbeans yet even though it's been a feature request for years. It seems like yet another open source project mismanaged by Oracle. Perhaps now Netbeans is moving to Apache there might be some progress on this.
  14. I'm not sure if it's the 'best', but I use Netbeans, although the way Processwire is structured, some possible code completion isn't available, eg if you select a variable like $page, it can't give you a list of page fields, as they're defined in the database rather than in code. With some other CMSs where you have to define a page class for the equivalent of each template in Processwire, you'd get access to those properties. It's not a biggie, as I generally know what fields I've defined for a template. Netbeans has PHP documentation built in which can be handy.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. 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.
  24. 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.
  25. 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.
×
×
  • Create New...