If you aren’t familiar with PowerGallery, it is a PHP web app that I created for WebAssist. Basically, you can upload your images and display them on your page with several built in gallery designs. When programming this product, one thing I wanted was easy extensibility so more designs could be added easily. The 1.1 release added 3 slideshows that were great.
I’ve created another design called Stack and you can download it for free below. To install it, just unzip the file and upload the stack directory to the galleries directory inside your PowerGallery installation. That’s it! Log in to the admin and you’ll see Stack a new choice on the Choose Design page.
This gallery was created using the ElementStack MooTools plugin. You can see a live demo here. Since PowerGallery uses MooTools 1.2, you can easily create galleries yourself and just drop them into the galleries folder for easy use.
I was working on a PayPal powered commerce website and for the checkout form, I needed to create a dropdown list of the countries that PayPal supports. I couldn’t find a list in the exact format that I needed, so I created a JavaScript array of JSON objects. Pretty straightfoward, but I thought it would be a good starting point for some of you if you need the same thing.
This list uses the countries listed on PayPal’s website. PayPal requires that you send the 2-character IS0-3166-1 code to their API. Below I have the name and code combinations. Continue Reading
Over the last few weeks, I have been learning CodeIgniter which is an open source PHP framework. It follows the MVC (model-view-controller) methodology, but allows you to utilize your existing PHP skillset. Overall I think CodeIgniter is great so far, but there are are few gotchas to look out for.
I found an issue today regarding the built in encryption library. Basically, the encrypted string might not be the same thing every time. For example, you might want to encrypt a user’s email address. The first time you might encrypt it on a sign up form. Now on the login page, I want to compare the value the user typed in with the database. The problem is, if I encrypt the email again, it most likely will not match even though the original string is the same!
Behind the scenes, CodeIgniter is basically rotating keys to produce different encrypted strings that decrypt to the same thing. It’s actually a really cool and secure way of handling the encryption, but for the purpose of comparing values (on a login form for example) it just doesn’t work.
Alternatives
So, if you need to do some comparisons using your encrypted data, you have a few alternatives. If you want to stick with PHP, you can make use of the mcrypt_encrypt and mycrypt_decrypt functions. If you want a MySQL solution, look into the encryption functions in their manual.
I have finally started diving into more HTML5 lately and have some good links to help get you started. The syntax itself is somewhat new, but the hard part in my opinion is knowing what browsers support what. The easy answer seems to be Chrome 5 supports the most, followed by Safari 5, then Firefox, and lastly Internet Explorer 8 (with almost no support, shocking!). I have moved to Chrome as my default browser now for quite a few months since it just supports so much more of the standards than the others.
The new syntax and tags make a lot of sense one you get the hang of it and see the reasoning behind it. The CSS3 and JavaScript enhancements are also pretty slick. Some of things MooTools offers are now integrated as native functionality. I still plan on using MooTools to ensure cross browser support though.
Adobe has released a Dreamweaver CS5 extension that adds in support for HTML5 (including CSS3). The WebKit engine itself has been updated to support the new tags and rendering needed to work with HTML5. Live view and design view have these engine updates implement. Also remember since live view runs WebKit, any -webkit css properties will render just fine. I know Dreamweaver doesn’t always produce the best code, but this extension still seems pretty cool and should be a great learning tool. Adobe also announced they will support VP8 (Google’s new open-source video codec) going forward in its Flash player.
As noted on Adobe Labs, here is what the HTML5 pack offers:
Introduces the Multiscreen Preview panel , allowing for Live View display on 3 different screen sizes, with Media Query support. (Window > Multiscreen Preview)
Adds code hinting for the HTML5 Tag Library with new tags, attributes, and properties.
Updates code hinting for new attributes and values in existing HTML tags.
Adds code hinting for the following CSS3 specifications: 2D/3D Transformations; Animations; Background and Border; Basic User Interface; Line Layout; Marquee; Media Queries; MultiColumn; Ruby; Text; and Transitions.
Updates Live View to support <video> and <audio>. (Requires Quicktime installation)
Improved rendering for CSS3 in Live View.
Adds HTML5 starter layouts to the New Document Dialog box.
Offers better rendering for new tags in Design View.
Here is a video that explains some more. It’s a flash video though, so that is sort of an epic fail.