ProcessWire weekly #13

Core updates, forum highlights, new ProcessWire projects and a brand new site of the week. Read on!

Our 13th weekly news splash starts with a summary of latest core updates, once again curated by Ryan Cramer, lead developer of ProcessWire. From there we'll continue to introduce the latest and brightest additions to ProcessWire's ecosystem; projects, modules and more.

This time we're also including some special content in the form of a mini-tutorial for installing CKEditor plugins using latest core additions. This is something we haven't included so far but we're hoping that it'll be useful to you folks. Enjoy!

Summary of the latest updates to ProcessWires development branch

Content for this section is brought to you by Ryan Cramer, lead developer of ProcessWire, with some additional edits done by yours truly.

Upgrades to CKEditor

We've made several upgrades to our CKEditor Inputfield in order to make it easier to customize, configure and add plugins. As you may know from a past edition of the Weekly, CKEditor is now a core module in ProcessWire, located in /wire/modules/Inputfield/InputfieldCKEditor/.

However, we've made several additions this week to make it more customization and plugin friendly by adding support for a customizations directory /site/modules/InputfieldCKEditor/ – have a look at that link for the defaults, now included in the default site profile.

Here's what's in there by default:

  • plugins/
    Directory to place additional CKEditor plugins in. You can then activate them from your CKEditor field settings (see the short tutorial below).
  • contents.css
    Example CSS file for the admin editor. To make CKEditor use this file, go to your CKEditor field settings and specify /site/modules/InputfieldCKEditor/contents.css as the regular mode Contents CSS file.
  • contents-inline.css
    Same as contents.css but for the inline mode editor.
  • mystyles.js
    Optional configuration for the CKEditor Styles option. This enables you to set what appears in your "Styles" dropdown menu. To use this file, go to your CKEditor field settings and set the Custom Styles Set to be this file (mystyles:/site/modules/InputfieldCKEditor/mystyles.js). Then enter "Styles" somewhere in your toolbar definition. Now you have selectable custom styles in your editor.

While we were putting in these updates, we also updated the CKEditor version to the latest. Of the items above, the most exciting is likely the plugins directory. That's because previously you couldn't install custom plugins without putting them right in CKEditor's core plugins directory.

Read on to see how to use it…

Mini-tutorial: how to properly install a plugin for CKEditor bundled with ProcessWire

This is how installing plugins for CKEditor works with the latest core additions in dev branch. Because the plugins are now installed under your /site/ directory, they persist through core upgrades, which is exactly what you want – read on to learn how to handle things properly!

  1. Download a plugin from ckeditor.com.
    We'll use the Wordcount plugin as an example: http://ckeditor.com/addon/wordcount. Click the "Download" button to download the ZIP file. Extract or upload the contents of the ZIP file to /site/modules/InputfieldCKEditor/plugins/wordcount/.
     
  2. First, edit field settings.
    We'll assume that you want to add this plugin to a CKEditor field called "body". In that case, in the ProcessWire admin, go to Setup > Fields > body > Input. Scroll down to the "Plugins" section and check the box for the "wordcount" plugin. Save.
     
  3. Now go and edit a page that uses this field.
    You should see a running word count in the lower right hand-corner. Cool – you're almost done! But lets say that you wanted to see a running character count too…
     
  4. Go back to edit the field settings (Setup > Fields > body > Input).
    Scroll down to the "Plugins" section and open the "Wordcount settings" box. The website you downloaded the Wordcount plugin from outlined some optional settings that we'll use now. Paste following into the settings to make the plugin show both a word count and a character count:
    showWordCount: true
    showCharCount: true					
  5. After saving the field, go back to edit a page using this field. Now you should see both a word and character count.
    That's it. Congratulations, you've just installed CKEditor plugin in a way that makes it both functional and safe from upcoming core upgrades!

This request appears to have been forged

Chances are you've seen that message at some point or another. Our CSRF protection has been a bit aggressive in the past; if you edited one page, and opened another page editor before saving the first, you'd encounter this error message when you tried to save the first.

We've put in an update this week that makes that behaviour less annoying. Now you can edit multiple pages without having to worry about what order they are saved in.

New module installation options

Since ProcessWire 2.4, you've had the ability to install modules in your admin simply by pasting in the class name for the module you want to install from the Modules Directory.

As of today (on the dev branch) ProcessWire now gives you two more new module installation options:

  • Upload a module ZIP file
  • Specify a URL to a module ZIP file

These options should be particularly handy with modules that aren't already in the modules directory, and for your own custom modules. As they've not yet had a lot of testing, please let us know if you run into any issues with these new upload options.

Change to how you add pages

Usually when you add a new page in ProcessWire, it is initially in an unpublished state. There is an exception: when you add a new page that has no fields (other than a "title" field) it publishes immediately.

This is the way it's always been. The thinking behind it was that there's really no need for an intermediate unpublished state on such pages, since there's not really any content to consider.

However, some people found this confusing. As a result, we now have separate "Save" and "Publish" buttons when adding a new page – though you will only see the "Publish" button in cases where there aren't any fields to consider other than Title.

GeoWire is an open source web mapping application powered by ProcessWire

GeoWire DemoIf you want to see how ProcessWire was able to fulfill the needs of a large-scale web application, check out the video presentations about how web mapping application GeoWire works and what it's backend looks like.

GeoWire is currently being discussed at the forum. Should you choose to adopt it for your own (local or online) use, it's available for download from geowire.org – where you'll also find helpful installation tutorial.

New module release: Publish Date by Philipp Nowinski

Once again we're reminded that good ideas don't have to be huge; quite the opposite! Most of the time small yet thoughtful and properly executed ideas are the best ones.

Latest addition to ProcessWire's modules directory is ProcessWirePublishDate, tiny module that makes Pages aware of their publish date by adding new field $page->publish. Simple, functional – and surely useful for quite a few projects!

Cool site, bro... but is it ProcessWire?

Is it ProcessWire?Is it ProcessWire? answers one simple question: "is this site built with ProcessWire?"

ProcessWire is as much a framework as a CMS. While not particularly complicated, this project is another example of making ProcessWire do something quite different from your "average website".

With ProcessWire your imagination truly is the limit. Whatever you can dream up, it's made doable by ProcessWire

Highlights from the support forum

Here's a small collection of recent ProcessWire support forum discussions you might find interesting:

  • Mama, Weer all HTTPSeee now! – the topic discussing recent change by Google to their search algorithm that gives slight edge to HTTPS enabled sites. Not strictly ProcessWire specific, but such changes affect us ProcessWire users too.
  • Customizable, installable and easily switchable themes have been a hot topic recently (see this thread for details), and now Nico has posted a project he's been working on, titled WireThemes, providing a concrete example of this concept in action.
  • Finally, here's a topic discussing promoting ProcessWire for "business use" with some interesting opinions from various points of view. Being enterprise-friendly isn't as easy as it may sound..

Finnish ProcessWire subsite launched

This week a new ProcessWire subsite for Finland was launched! This makes a total of three country-specific subsites to date: fi.processwire.com for Finland, de.processwire.com for Germany and it.processwire.com for Italy. Primary task of such subsites promote the use of ProcessWire in specific countries and keep up a list of local ProcessWire experts.

Since we don't want to split our community to small pieces, they don't have their own forums. ProcessWire has a global community working together for a common goal and in this context nationality doesn't matter at all (though we do insist on everyone using English in our forums, just to keep things manageable).

If you want to read more about the country site concept, this is the thread that started it all.

Stay tuned for our next issue

This issue had more content than we've ever had in single weekly issue. That's partly because of the tutorial, which is something entirely new for us, but also because certain things have kind of piled up.

Hopefully you've enjoyed our weekly news splash and will be following us next week too. In the meantime you should follow @processwire at Twitter for real-time news and visit ProcessWire support forums for healthy discussion about timely matters.

Our next issue will be out 16th of August. ProcessWire newsletter subscribers will receive it a few days later via email. Until then, happy hacking with ProcessWire!

This post has 5 comments:

diogo on Saturday 9th of August 2014 13:09 pm

Hey Teppo, great birthday present! Thanks :)

Adrian on Saturday 9th of August 2014 17:29 pm

Happy birthday diogo !

Another great edition teppo - you definitely have a way with words and knack for making these all a great read - already looking forward to the next one!

Teppo on Sunday 10th of August 2014 12:53 pm

Thanks, Adrian.. and congratulations, Diogo! :)

Peter on Thursday 14th of August 2014 4:41 am

Hi Teppo! Thanks for these newsletter. Previously I have to check all the commit logs etc but this is way faster now :D

Jeff on Tuesday 19th of August 2014 20:35 pm

Thanks so much for the newsletters!!! Always looking forward to the next one!

Post a comment