Update to Lithium Bootstrap

Posted 2 years ago by Tom Maiaroto.


I've made some updates to li3_bootstrap. Some important ones. First off, I've replaced TinyMCE with CKEditor and plan to add file/image upload support in there soon. This will be on li3b_core so any other library can hook into it. Of course this is biased and will use MongoDB. Some work will need to be done to get it to work with MySQL...Namely, disabling the feature and re-building it to work by uploading to disk.

I'm making a lot of hard decisions on the direction here and will not support MySQL personally. That's not to say you couldn't get it working, but I decided that I don't want to have to worry about changing schema, SQL injection, file storage on disk, etc. MongoDB makes things easy with it's schemaless design and GridFS.

One huge change made was the inclusion of a few submodules. I do want to keep these to a minimum, but I felt it was really important to include Twitter Bootstrap and Font Awesome in the core and do so as submodules so they can be updated with ease. Of course to do this a less compiler is required and so I've included lessphp as another submodule. I've also created a new li3 bootstrap command called "bootstrapUpdate" which will allow you to update (it'll run a git update) and re-compile Twitter Bootstrap with Font Awesome by default, but you can flag that off if for some reason you didn't want those awesome scalable icons. Now, the system is super simple to keep up to date on that front.

I've also switched syntax highlighters from Rainbow to highlight.js. Though I left all the options and files for Rainbow in case you prefer it. You can simply adjust template overrides accordingly. With the change from TinyMCE to CKEditor, there's also a new insert code snippet plugin that I created by modifying another insert pre plugin. This is better than TinyMCE as you can now actually see the code in the CKEditor window. TinyMCE really worked hard to escape everything so I had to encode the output. It was ugly, bad, didn't work. This is a lot better now and CKEditor's styles match Twitter Bootstrap nicely. I also grabbed the codemirror plugin and enabled that by default too. So you can edit the source of your blog posts, etc. with ease.

That's about it for the most part. I will continue to work on things and get the file manager support as soon as possible. Once there's the ability to upload images for use in blog posts on the spot, then I think the entire package will be a lot stronger. What more could you want? Syntax highlighting, file/image upload support, awesome clean UI, a bunch of nice li3 commands to keep yourself up to date, and naturally an entire application foundation built on the lovely Lithium Framework. It'll be all ready for you to build whatever you may need.

Here's a sample of the new syntax highlighting:

namespace awesomeness;

class Amazing {

    static $foo = 'foo';

    // Some comment
    public static function bar() {
        echo "Doesn't this look so awesome? Code does not line wrap either. It's selectable and copies and pastes well.";
        // More to come...

        return static::$foo;
    }

}

 


Filed under
comments powered by Disqus

Search for Posts

Popular Labels

social media virality score general internet web development reviews and opinions php web tools hosting lithium web design

Recent Posts