The New Myth family: SprintPHP Bonfire Practical CodeIgniter 3

New Myth Media Blog

Serving the New Myth Media Family.

Practical CodeIgniter 3 Released

My new book about making the most of CodeIgniter 3 is out!

Posts Filed Under “Bonfire”

At long last - 0.7!

After way too long, we're thrilled to bring you the 0.7 version of Bonfire. This one contains some of the largest changes that we've done to date and might prove challenging to upgrade 0.6 sites (and will definitely require some time on your part, so be warned). Among the many changes are:

  • New Bootstrap 2.x based theme in the admin area
  • Passwords secured with phppass now for better security
  • Site restructuring for even better security for web apps.
  • Much more flexible and powerful MY_Model, adding Observer methods for easier customization, and moving data validation to the Model, where it belongs.
  • Splitting of the MY_Controller into Base_Controller, Front_Controller and Admin_Controller that area autoloaded, leaving MY_Controller alone for you to customize for your site.
  • Simpler, cleaner, front-end theme based on Bootstrap 2
  • New docs system in place to help you distribute docs within your application and modules. It's a bit basic at the moment, but that does mean that every download of 0.7 comes with all of the docs that we have and the docs are always up to date in the repo.
  • Lots and lots bugfixes.

We apologize that it took so long to get this point. I know that, for a number of you, we've probably caused you to lose a little faith in the project. For that, we are truly sorry. We are here, though, and there are some grand plans for the future that are already in the works. More information on that will be coming soon.

Now Collecting Stats

Just to make sure this is clear from the start - all installs of Bonfire 0.7 and later will report back some anonymous statistics about the environment you're installing in. We don't collect anything personal and are just collecting stats that help us to know what types of environments it's been installed in so that we can better support it and develop with those targets in mind.

Also, there's times when the forums are quiet and you wonder if anyone is actually using this thing anymore. Then you hear about a developer who has built over 80 sites on it over the last 3 years. Or a hosting provider that built their user are on Bonfire. Things like that and you realize that we are making a difference in developer's lives here. And that's the whole reason that we do this anyway. So throw me a line at lonnieje@gmail.com and let me know how you're using Bonfire. I'd love to be able to add to the (single) testimonial that I currently have on the site and hear how it's impacted your lives and careers.

What's Next for Bonfire?

Now that 0.7 is in the wild, we can take some time to streamline the code and move portions of it that don't really need to be in every install into separate modules that can be easily dropped in through Composer. The goal here is to make Bonfire a simple, streamlined package that can be used for all of your development needs.

Tentatively, here's the plans for the next few point releases:

  • 0.7.1 - New, lighter, menu system and driver-based auth library. Work on both of these is already underway. Both will also be easily used in straight CodeIgniter projects.
  • 0.7.2 - Better localization/language support and timezones
  • 0.7.3 - still in the air... :)

At some point during these releases we'll likely see Bonfire adopting a new modular code library that provides much enhanced routing support and treats module like the "packages" they are. Work has also begun on that, but it is still too early to say how long that will take.

Oh, yeah! A New Website!

Since 0.7 was such a huge change, and included the docs system, I had to rebuild the site from the ground up. This seemed like a great time to refresh the look of the site a touch also. There's still more work to be done, but we're getting there.

This also gets us ready for some of the more exciting ideas I have in store for the community. Not just the Bonfire community, though definitely that, but the CodeIgniter community at large. And that's all I'm saying on that front for now.

Enjoy the new release and, as always, please let us know if you run into any issues by reporting an issue or submitting a pull request with new changes.

Thanks for sticking with us, everyone.

Happy coding!

We just pushed a completely revised version of the installer to a new branch over at GitHub. We'd love to have you test the new installer just to help us verify if it works like we hope. Docs still need to be updated, but here's a quick overview:

  • From a fresh Bonfire install, you need to manually setup your Database config file (application/config/database.php).
  • Once this is done, simply go to your site root. This brings up the file and folder write check, and compares PHP versions, etc.
  • Click Next.
  • Wait a few seconds while your database is populated.
  • You're done.

At this point, Bonfire installs a default admin user and will show you the email and password needed to login. You should change that before you go live. :)

So please, download the latest code and give it an install in your typical system. If you run into problems, please let us know.

Work on the next release of Bonfire is well under way and we have some exciting things in the process. Today I want to highlight 3 of the largest changes that are being made since they will affect anyone who decides to work off of the latest develop branch. Note that because of these changes, upgrading from earlier versions is difficult, at best. It is recommended that this version be used on new projects.

New Folder Structure

To better aid in security and ease of upgrading, we've implemented a completely re-arranged folder structure for Bonfire. It separates out the core Bonfire as much as CodeIgniter will let us, and keeps your application separate from Bonfire. This makes upgrading Bonfire in the future much simpler since it's all contained in its own folder.

We've also moved the core, your application and modules out of the webroot for the enhanced security that comes with making your files harder to get to. It's a small thing, but we think it helps keep your apps even more secure in the long run, which is good for everyone.

You can find the details over at the wiki.

More secure passwords

Keeping with the theme of security, we have moved the Auth library and all users to use phpass for the password encryption. This provides a much more difficult to hack password encryption scheme on a number of levels.

Note that during an upgrade of a site, all users are set to have their passwords reset on their next login. The guts are in place on this, but we're actively working on the process for the user during the login to actually detect that it needs to be reset and prompts them to reset it. That should be in place shortly.

Better Admin Theme

While Bonfire has always looked alright, I've never been overly happy with the design. It never held that polish and shine of a pro app. We're getting ready to change all of that. After I made a comment asking if we had any designers in the house, Bogdan Lazar stepped forward and has graciously offered his help to come up with a new look for the Bonfire admin area. The goals are to create something clean and professional that is even more well-suited to putting a professional face on your web applications. We're just in the beginning stages of the design, but I am very excited about the possibilities. Keep an eye out for screen shots in the next few weeks.

While you will see changes to the theme in the current develop branch, they are not the final theme. They were what I was working on when I got an offer from Bogdan to work with us so kindly ignore that for now. :)

Smaller Things

Cronjobs

Work is nearly completed on a new Cronjobs module that allows your modules to easily create cronjobs that can be scheduled to run just like a typical Unix-style cronjob. Note that you'll still need to setup the full cronjob to run Bonfire's module, but that single cron will trigger all of your site's cronjobs, when necessary throughout the day. Besides being very flexible, this helps overcome restrictions on the number of cronjobs that can be ran by a number of hosts.

More robust installer

The installer has had a number of new checks added to it and made a little clearer and more usable. We know there's still more to do there, but we're getting closer.

More thorough language support

Many loose strings have been hunted down so the site can be even more localized. We also have a French translation in the works, now.

Database independence work

Much work has been made in removing any MySQL specific code to use CodeIgniter's ActiveRecord for more database independence. We have found some limitations in CodeIgniter's support for other database features. For Example, while the installer supports setting you up with a MySQLi driver, the driver doesn't support creating backups so that feature is now broken when this driver is used. We're looking at ways to get around this or even help CI upgrade their driver, but it's going to take a while.

And more...

Many bugfixes have been done and are being hunted down. Documentation is still getting written. Work is always continuing on the project, so if you'd like to get involved and help with either of those areas, we'd love to have your help!

As of today, all documentation for the 0.6 branch on will be hosted on the GitHub Wiki.

Why are we doing this? Because we'd love to see more complete, accurate documentation, just like you would!

There have been a couple users recently contribute to documentation in our "old" repo and that is awesome. But we recognize that forcing you to download another repo, install PieCrust, make the changes, submit a pull request, then wait for us to integrate and push to the live site is... whew! a lot to go through. It is our belief that moving the documentation to the Wiki will allow any of our users to correct out-of-date information, add new pages, etc so that Bonfire's documentation can continue to grow and support the best CodeIgniter-based kickstart to your project around.

Don't worry, though, this doesn't mean that we're going to stop contributing to the documentation. Instead, this makes things easier for us to do it, also.

Future Releases

We've also created a new folder within the wiki called 0.7 that, surprisingly enough, holds the revised documentation for the 0.7 branch, that is just getting started. When you add a feature, or modify an existing feature, and your pull-request has been approved and integrated, please help out by taking the time to update the 0.7 documentation.

We are looking into simply providing the files as part of the repo, and would love to hear your thoughts on that. I think it might make getting pull-requests with documentation updates even simpler for everyone involved. What do you think?

It’s been a long slog to get here, with the team ebbing and flowing between busy jobs and new team members, but the Bonfire Team is thrilled to announce that version 0.6 is ready for the prime time.

However, we couldn't have done it without the awesome commits that have come in from the community as a whole. This project isn't just ours... it's building a tool we all can use to make our lives easier. And you all have done a fantastic job of helping to make that tool better. Thank you so much for everything.

Ch-ch-ch-changes

The new release brings a massive truck load of changes, both under the hood and visually. So let’s take a quick look at some of the bright new shinys that you’ll get to start your projects on now.

When we started working on this release one theme seemed to keep coming back to us: If it’s going to be changed, let’s change it now and get it set the way we want it so that we have an awesome base to build on. We believe we’ve managed to do this and create a much more flexible, powerful base for your new applications. As we’ve built more apps based on the current code, changes keep getting made to make those projects not only possible, but a delight to work with. We hope you like it.

Facelift

Whlie the old UI of the admin area had it’s own type of charm, we felt it was time for something new. Something that had taken the development world by storm and was a library that has many of the things you need for a brilliant site already built in.

Say Hello to Bootstrap.

Twitter’s Bootstrap library has been used in both the default and admin themes, bringing a whole new look and feel to your apps. It’s something a bit more traditional-feeling than what used to be there. Moving to a whole new look does make upgrading your 0.5.x-based sites pretty tough, we realize that. But we think it’s worth it.

Settings

It used to be that a lot of settings existed in the application.php config file. While that worked for many instances, it was a bit of a pain when it came to securing your application and forcing you to keep the config file writeable. So we removed a number of those and put them into the database where they’re much easier to get to from the user’s view point.

That meant that a new way to access your settings were needed. Enter $settings_lib. This new library is modeled after CodeIgniter’s Config library so you should feel right at home.

Code Builder

In previous versions we had the Module Builder. And it worked great to build a starting point for a new module very quickly. We realized, though, that it’s not enough. It could do more. This release features the first baby steps in expanding the possibilities and introduces a new Context Builder that makes creating a new context a very simple thing indeed.

In future releases we plan on modularizing the Code Builder even more so that it’s easy to drop in new ‘Generators’ that plug right into the UI and can be used to build things we can only imagine right now.

User Enhancements

Users have seen a lot of attention this go around, and get a big boost in two main areas: registration and meta fields.

  • When a new user signs up at your site, you can now require that they activate their account via either email or by having an administrator approve them.
  • You can set the requirements for the strictness of user’s passwords right in the settings page.
  • Built into the user_model, you can now store and retrieve custom fields for users, like address, phone number, shirt size, or whether they think Hans shot first.

Translation Utility

We know that Bonfire is used around the world and have had a number of users do partial translations in the past. Unfortunately, the rate of change makes that difficult for volunteer translators to keep up with. So, we thought we’d make things a bit easier for you and built a translations UI that makes it simple to translate every string in every module (including your own modules!). You can even export them for other users or just for a backup.

But wait, that’s not all!

This short list highlights the major changes to the app, but doesn’t come close to telling everything. There’s been many small bug-fixes and improvements, a slew of security enhancements, and little helpful methods scattered throughout the libraries that make them a bit easier to use in your own code.

We’re thrilled to be able to release this today and get it in your hands. I can’t wait to see what you are going to create with this! (When you do, drop us a line. We’d love to post an short interview with you about it.)

What are you waiting for? Grab your copy today and get building.