The 150th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
For our 150th issue we have a whole bunch of topics to cover: the latest core and Admin Theme Uikit updates, a collection of tutorials and other online resources, an original recipe of the week, and a great new site of the week.
I should probably say something special about us reaching the 150th issue milestone, but to be honest I can't think of anything right now. I'm just happy that you folks have stayed with us all this time, and since there's still plenty of stuff to cover every week, it doesn't seem like we'll be closing down anytime soon – quite the opposite, really.
Here's for the next 150 issues!
Thanks to all of our readers for being here with us again, and as always, any feedback is most welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!
Latest core updates: ProcessWire 3.0.57
The latest post at the processwire.com blog may be short, but the bundled screencast more than makes up for the lack of words and provides a very nice summary of the layout options included with the latest iteration of the Uikit Admin Theme:
You can give these new features a try as soon as you grab the latest version of Admin Theme Uikit from GitHub. Note, though, that you'll also need the latest dev version of ProcessWire – also available via GitHub.
If you have any comments related to the latest admin theme updates, feel free to leave your comments either via Ryan's latest blog post, or through the support forum thread dedicated to this weeks post. Thanks!
Weekly forum highlights, tutorials, and other online resources
Here we've got a new collection of support forum highlights and other useful and/or interesting resources. As always please let us know if there's anything important we've missed so that we can include it in one of our future issues.
- The first item on our list this week is a tutorial by Szabesz: Install ProcessWire in a subfolder on shared hosting (cPanel). This is the first post in a series, and walks the reader through the steps necessary for setting both the environment and ProcessWire up, providing enough detail for anyone to keep up. Great stuff!
- Our second highlight is also a blog post, but one with a pretty different point of view: in A Better CMS: Part 1 - Security Peter Burlingham discusses some of the main points of web content management system security, and explains exactly how ProcessWire differs from some of its competition in this regard.
- Moving on, our next highlight is not a post, but rather a project: ProcessVue is a ready to install sit eprofile that combines ProcessWire 3.0 with Vue.js for those of you interested in Vue.js SPAs – single page apps. Definitely worth checking out!
- Last but not least, a project we've covered before, but wanted to mention again in case any of you managed to miss it in our issue #143: ProcessGraphQL, a GraphQL implementation for ProcessWire. If GraphQL is a strange concept, you may want to start by checking out the screencasts.
If you're interested in ProcessWire news, discussions, and updates, there's always something going on at the support forum. Since we're only able to include a tiny selection of all that in our weekly updates, head down to the forum for more.
Recipe of the week: embedding posts feed from WordPress on your ProcessWire site
While ProcessWire can definitely fulfil most – if not all – of ones website related needs, sometimes you really need an easy way to integrate it with another platform – such as WordPress. In this recipe we're going to show you how to fetch data from a WordPress site and embed it on a ProcessWire site without even breaking a sweat.
The problem
You've been tasked with fetching a feed of recent posts from a WordPress site and displaying them on a ProcessWire site. While RSS is an option, if does not provide all the data you require, and thus you're looking for an alternative approach.
The solution
We can probably all agree that WordPress isn't exactly known for its technological merits, but it does provide a very helpful feature for those cases where you need to fetch data from it and reuse it somewhere else: WP REST API.
In this example we're going to make use of the /posts/
endpoint to fetch a bunch of rcent posts from an external WordPress site. Just to make sure that we won't slow our own site down or inflict unnecessary strain on the source site, we'll also cache said posts using ProcessWire's built-in $cache API variable:
<?php
// attempt to fetch an array of posts from cache; if there's no data in the
// cache, fetch fresh data directly from the source site and then cache it
$posts = $cache->get("wp-posts-feed", function() {
return json_decode(file_get_contents("https://www.angrybirds.com/wp-json/wp/v2/posts?per_page=5&orderby=date&order=desc"), true);
});
?>
<?php if (count($posts)): ?>
<ul>
<?php foreach ($posts as $post): ?>
<li>
<a href="<?= $post['link'] ?>">
<strong><?= $post['title']['rendered'] ?></strong><br />
</a>
<em><?= date("j.n.Y", strtotime($post['date'])) ?></em><br />
<?= $post['excerpt']['rendered'] ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
To be fair this example won't work right away, since www.angrybirds.com only exposes a REST API to "real browsers". While we could get past this limitation easily by providing a fake UA string, that's really not the point of this recipe. That being said, the code above should work with most out-of-the-box WordPress setups without any dirty tricks.
Something you may also run into is fetching images along with text content. This would require a bit more work: you would need to query such media separately from the REST API, using a path like this: /wp-json/wp/v2/media/<?= $post['featured_media'] ?>
.
If you've got a recipe of your own that you'd like to share with others, feel free to submit it at ProcessWire Recipes. Also, big thanks to all of you who have already shared your knowledge with us – keep up the good work!
Site of the week: Notanotherdotcom
Our latest site of the week belongs to an UK based company who specialize in web design, app development and online marketing: Notanotherdotcom Ltd.
Even if the name of the company doesn't immediately ring any bells, the name of their director probably will: Peter Burlingham, whom you may know as the admin of our support forum, the man behind the developers directory, and the author of the popular XML Sitemap module – just to mention some of his many contributions.
The new website of Notanotherdotcom, first introduced last Tuesday on the showcase area of our support forum, is powered by ProcessWire (obviously) and the Uikit front-end framework. Some of the most notable modules on the site include ProCache and FormBuilder, both commercial modules built and released by Ryan.
Some of the things we particularly enjoy on this site are its clean and beautiful design, usability, and performance. Although the numbers we got when checking the site with Google's Page Speed Insights were nothing out of ordinary, in real use the site feels blazing fast – and at least some of that speed is no doubt thanks to ProCache.
Big thanks to Pete for sharing this site with us, and congratulations – we would very much like to see more of your projects and read more of your blog posts in the near future!
Stay tuned for our next issue
That's it for the 150th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 1st of April. As always, ProcessWire newsletter subscribers will get our updates a few days later.
Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!
Charles Stevens on Saturday 25th of March 2017 14:20 pm
Congrats on your 150th issue. This is and continues to be a great resource for information about ProcessWire. You are to be commended for your dedication in producing the ProcessWire Weekly.
Pete on Saturday 25th of March 2017 14:43 pm
Thank you very much for the mention and thanks for all the work that goes into producing ProcessWire Weekly! Even when I don't have time to visit the forums, I make sure I keep in the loop at least a little by reading these posts.
Funnily enough I've just been working with a designer whose base templates score a solid 100/100 on mobile and desktop on Pagespeed Insights, so you may see more sites soon with much higher scores if all goes well.
AndZyk on Sunday 26th of March 2017 13:41 pm
I also would like to congratulate for the 150th issue. :-)
Ivan Gretsky on Saturday 1st of April 2017 0:10 am
Is it 150 already? Still exited to get every new edition like it is brand new. And it is. Thanks, Teppo! Can' t really think of any other opensource software related media being as consistent in quality and shedule. You are one of the people making PW such an exciting ride!