BookStack is a simple, free, open-source, Laravel-based, wiki software organized into a hierarchy of bookshelfs, books, chapters, and pages. Check out their website and demo to learn more. Though installation on shared hosting is not currently recommended by the developers, it is certainly possible and works well in my experience. With just a few extra steps you’ll be filling those BookStack shelves in no time. [Read more…]
Preserve your MySQL Databases Between Destroy and Up with Vagrant + PuPHPet on Windows
Have you ever run
vagrant destroy on your box before you realized you wanted to keep the MySQL databases? Well I have, last night actually. Thankfully I use the wonderful and free Veeam Endpoint Backup to backup daily and was able to restore the old VMDK, connect it to a VirtualBox VM, use Ubuntu recovery mode to gain access, and then backup the databases to a shared folder. So that was an exciting learning experience. [Read more…]
Custom WordPress Dashboard Widgets with Configurable Content
After working with WordPress dashboard widgets in a recent project I wanted to present a complete example with arguments and usage of the control callback for saving widget options. Using the code in the Gist below you will be able to configure custom content for this widget with the native WYSIWYG editor. When you hover over the widget’s title bar the “Configure” link will be revealed – you must be an Administrator to configure the widget. [Read more…]
EventDispatcher Component Usage Example
As I was browsing through Composer packages on Packagist I came across the EventDispatcher component from the Symfony framework, which can be used independent of Symfony (I believe all components of Symfony are now modular).
The EventDispatcher component allows you to adopt the observer pattern – events/listeners, events/observers (Magento and others), actions/hooks (WordPress), etc. They all follow the same basic pattern but have different implementations.
Once you run
composer require symfony/event-dispatcher in your project’s directory you’ll be ready to try it out. If you’re not familiar with Composer, get acquainted now. I don’t think we’d be having a PHP revolution without it.
I’ve put together a simple but complete example of how it can be used in the following Gist:
Note: Adjust the path to
autoload.php as needed.
- Next Page »