Google Chrome Frame Version History

Known Issues

  • None

Planned Features

  • Ability to apply CSS styles to inline prompt
  • More flexible prompt activation — e.g. when user clicks a button
  • Prebuilt prompt options

Release Notes

(All releases are also available on Magento Connect)

Version 0.1.0 - Decadentwaste_Chromeframe-0.1.0.zip

  • Initial Release

Complete Guide to Magento + Media Temple Dedicated Virutal (dv) — Part 2: Setting up Subversion and Development Workflow

You want to use the power of Magento for an e-commerce solution. You want to use the reliability, performance, and flexibility of Media Temple's dedicated virtual hosting. You've come to the right place. In this tutorial series, I walk you through the complete process — start to finish — of getting Magento set up the right way on your (dv) platform. We'll set up a development/production environment, get Magento installed and running, and configure SVN to make it dead simple to test changes and publish them to production when you're ready. And we'll look at other tips along the way to make your Magento install run in tip-top shape. Ready? Let's dive in.

Note: for this tutorial series I am using Magento Community Edition 1.5.0.1 and (dv) 4.0.

In this series:

  1. Part 1: Configuring your Server and Installing Magento
  2. Part 2: Setting up Subversion and Development Workflow
  3. Part 3: Make your Site Better, Faster, and Stronger (coming soon)

Set up Subversion (SVN) version tracking and deployment

Installing Subversion

Media Temple's (dv) does not come with Subversion preinstalled, but luckily there are three ways of installing it easily.

The simplest way: (dv) Developer Tools

Installing the (dv) developer tools is the simplest way of installing Subversion; all you have to do is click a button. However, there are some drawbacks. You will be getting an older version of Subversion (at the time of this writing, 1.4.2) that does not have some of the features and security/speed/stability fixes that newer versions of Subversion have. You'll also be installing a host of other packages that you may never use. While it certainly won't hurt anything to have these tools installed, it's a lot of extra crud on your server that you may not want.

That said, this method is as simple as logging into your Media Temple AccountCenter, choosing Root Access & Developer Tools for your domain, and clicking Install.

UPDATE: According to the (dv) 4.0 Developer Tools package list, Subversion is no longer a part of the developer tools as it was in 3.5. If anyone has tried this and can confirm or deny Subversion's inclusion, please leave a comment.

The easy way: YUM package manager

All (dv) servers have the YUM (Yellow dog Updater, Modified) Package Manager installed, which will make installation a breeze. The drawback to this approach is the default repositories have an old version of Subversion (1.4.2 at the time of this writing) that may not have all the features you want or perform as well as newer versions. Whether or not you need the latest release is up to you.

Log in with SSH and type su root to log in as the root user (we'll need root permissions for the install.) Now type yum install subversion to have YUM find the Subversion package and determine its dependencies. You'll get a table of software that needs to be installed, as well as the total version size. When YUM asks if you want to continue, type y to install.

The best way: YUM package manager with RPMForge

Not afraid of the command line? Great! You can install the latest version of Subversion using YUM with a package from RPMForge. However, if we simply add the RPMForge repository, YUM will find all sorts of updates for your installed software that aren't in the official CentOS repo. If this is what you want, you can skip steps 4-8. Otherwise, we'll use yum-priorities to install packages from RPMForge only when we want them. (Note: it seems that with CentOS 5.5 and later, all core packages were moved to rpmforge-extras, so this is no longer the case as RPMForge-Extras is disabled by default. However, I still feel using yum-priorities is a good idea to avoid unexpected or unwanted updates)

  1. Download the RPMForge release:
    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
  2. Verify the downloaded package:
    rpm -K rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

    You should see OK at the end of the output

  3. Update with the downloaded release:
    rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
  4. Install yum-priorities:
    yum install yum-priorities
  5. Make sure yum-priorities is enabled:
    vim /etc/yum/pluginconf.d/priorities.conf

    and ensure it says:

    [main]
    enabled=1

    (If you've never used vi or vim before, type :q and press enter to exit. There is a good vim tutorial here.)

  6. Edit each of the .repo files in /etc/yum.repos.d/ (there should be 3 now: CentOS-Base.repo, CentOS-Media.repo, andrpmforge.repo). Add a priority setting to each of the sections by adding priority=X where X is an integer between 1 and 99. The important thing is that the RPMForge numbers are larger (lower priority) than the CentOS ones. Here are the settings I recommend:
    [base], [addons], [updates], [extras] : priority=1
    [centosplus], [contrib] : priority=2
    [c5-media] : priority=5
    [rpmforge], [rpmforge-extras], [rpmforge-testing] : priority=10
  7. Run yum check-update . You should see a line that says
    ### packages excluded due to repository priority protections

    If so, yum-priorities is working correctly! If not, ensure that yum-priorities is installed and your priority settings are correct.

  8. The problem now is that because of yum-priorities, searching for Subversion packages to install will still show the older CentOS packages, as those are of higher priority. So we need to tell yum-prioriites to ignore the CentOS packages for Subversion only. Modify CentOS-Base.repo again, and add exclude=subversion to the [base] and [update] sections. We also need to enable the RPMForge-Extras repo, where all packages that override core packages are stored. Edit rpmforge.repo and change to enabled=1 under[rpmforge-extras]. Now, YUM will look to RPMForge and RPMForge-Extras for Subversion packages, and you'll always have the latest versions when you use YUM to update.
  9. Install Subversion:
    yum install subversion

    Ensure that the version YUM finds is the right one before you installed. If you added RPMForge, it should be 1.6+, otherwise 1.4.2.

  10. Don't forget to log out of the root account! Type exit to go back to your regular account

If you're looking for more information on this process, see the following:

Set up Subversion repository

Subversion's set up and ready to go. Now we need to create a repository which will store all the versioning information for the files you'll be creating and modifying.

Create the repository

Log in to your server with SSH if you aren't already. Gain root acccess. Run the following:

svnadmin create /var/www/vhosts/domain.com/magento-repository

You can make the path any writeable directory you want. I like to keep all domain-related files in the root folder for that domain, so that's where I'm putting mine. Now we need to create branches, tags, and trunk folders as per standard version control structure. Run:

svn mkdir -m "Repo structure" file:///var/www/vhosts/domain.com/magento-repository/yoursitename
svn mkdir -m "Repo structure" file:///var/www/vhosts/domain.com/magento-repository/yoursitename/branches
svn mkdir -m "Repo structure" file:///var/www/vhosts/domain.com/magento-repository/yoursitename/tags
svn mkdir -m "Repo structure" file:///var/www/vhosts/domain.com/magento-repository/yoursitename/trunk

The -m flag indicates your comment for the commit. If you do not include it, subversion will open the default text editor and ask you to provide a comment.

Import Magento?

You may be tempted at this point to import your entire Magento directory into SVN. But this is a bad idea for a few reasons. Firstly, you will be importing a lot of binary files (images, mostly), which requires huge overhead for Subversion to track. Subversion is really meant only for text files. Secondly, importing core Magento files will make upgrading more difficult. Imagine what will happen when you download a new version of Magento and then update from your repo. Bam! All those shiny new Magento files will be overwritten. If you're lucky, you'll just downgrade. If not, you'll break your site.

Instead, I suggest creating the folders you need as you go along. Magento's structure is nice in that you don't need to modify any core files to make changes to your store. For design/layout, the only folders you need to be concerned with are

skin/frontend/package/skin
app/design/area/package/skin

where package is a name that should relate to your company or site, and skin is either default (for the default) or some kind of special theme, e.g. a holiday shopping theme. area is the area of the site your files affect, most likely frontend. The other options are adminhtml or install, but chances are you don't need to style those. Magento will load files in this order

base/default
base/skin
package/default
package/skin

with each subsequent directory overriding the next, like with CSS. You need include only the files you want to override.

Permissions

If you've been following along thus far, you'll have a repository that only the root user has access to. We want to be able to use the repo with user accounts other than root. While logged in as root, run:

/usr/sbin/groupadd svn

which will add a user group named svn. Now, add your main shell user to the group:

/usr/sbin/usermod -a -G svn username

To enable users in the svn group to access your repository, run

chgrp -R svn /var/www/vhosts/domain.com/magento-repository
chmod -R g+w /var/www/vhosts/domain.com/magento-repository

This will give the svn group write access to your repository.

Checkout

On your development machine, launch whatever Subversion client you'll be using. It could be the command-line tool, a Windows GUI client like Tortoise SVN, a Mac GUI client like Versions, or anything else. You'll want to checkout the following to your local development machine:

svn checkout svn+ssh://username@domain.com/var/www/vhosts/domain.com/magento-repository/yoursitename

Now, any changes you make to your checkout will get saved to Subversion when you commit. You also need to checkout on your server. Why? So you can run svn update on the server and have the latest changes go to your staging site. Assuming you're in your domain directory on the server, run:

svn co --force file:///var/www/vhosts/domain.com/magento-repository/yoursitename/trunk/ stage/

Which will checkout the trunk folder "in place" to your staging folder. Now anytime you want to update your site, just navigate to your stage folder and run

svn update

Note that the first time you do this after adding a folder to SVN (such as the app or skin folders you'll be working with, subversion will complain that "an unversioned directory of the same name already exists". To add your files without needing to remove the existing ones, run update with the --force flag:

svn update --force

If I remember correctly, this does not work with Subversion 1.4. So if you want to avoid the hassle of copying your unversioned files elsewhere, updating, and then copying them back in, revisit the "Installing Subversion" section and follow "The Best Way".

Publishing to Production

When you're satisfied with the changes you've made and you're ready to send them to your live site, the svn export command will make this trivial. Whether you're FTPing files onto your staging site willy-nilly or you've used svn update to keep it in sync with your repository, you'll want to make sure you have the same revision on your staging site that you want to push to production. Once you've done this, cd into the root level of the staging site and run:

svn export --force /path/to/svn/checkout /path/to/production/site

Careful using the --force option, as it'll overwrite any existing files with whatever happens to be in the repo. So for this to be effective, you need to be very diligent that everything you modify on your site is under version control. If you keep up with it, however, this method gives you a great way of updating your production site only when you're ready, and prevents all those pesky .svn folders from showing up all over the place on a live site.

Build your Theme

Choose a starter theme

To save yourself the work of starting entirely from scratch, you'll probably want to use one of the default Magento themes and customize it. Log in to your Magento backend and go to System->Configuration. Once there, choose Design under the General category. You'll see "default" listed as the package name. You'll want to change this to your own package name soon, but leave it be if you want to see which default theme to start with. Change the "default" setting in the themes section below to one of the default themes, which as of this writing are default, modern, blue, default, as well as german and french (themselves just translated versions of the modern theme). I usually go with blank, as it gives you minimal CSS and a nice wireframe layout to work with.

Create your package

Create a folder in the skin/frontend folder with your custom package name (at the same level as base and default). Inside this folder, create another one named default. This will be where all of your theme-specific files will go. If you wanted to make a variation on your theme, you'd create another folder inside your package folder with the variations. For now, copy the css and images folders from the default theme you chose into yourpackage/default. If you're using SVN, all of this is under version control. You'll also want to create the yourpackage/default folders inside the app/design/frontend directory. Layout (xml) and template (phtml) files will go in here. Now, go back to the Magento design configuration and change the package name to your custom package name. If you changed the "default" theme, set it back to default again.

Get Designing/Developing!

Now comes the fun part! You're all set up to start developing your own theme and/or custom modules. If you're new to Magento, you may want to take a look at the Designer's Guide to Magento or the Magento for Developers series. My main piece of advice is to make all of your design changes in "local" files, meaning local.xml for layout and local.css for CSS. To have the latter work, you'll need to add this to your local.xml file:

<default>
	<!-- add the local stylesheet -->
	<reference name="head">
		<action method="addCss"><stylesheet>css/local.css</stylesheet></action>
	</reference>
</default>

Making changes using this better way to modify Magento, rather than editing the default files, will save you a lot of headaches (and a significant amount of time) when you update to future versions of Magento. If the default files change, rather than having to merge all of your changes back into a new set of files, you can just tweak your existing "local" files to cope with the changes. It may be a little more work now, but it's absolutely worth it in the long run.

Subversion (SVN) on GoDaddy Shared Hosting

If you're using GoDaddy shared hosting, no doubt you appreciate the SSH access to your server. If you're like me, that fact alone has you itching to run a Subversion client on your server for all sorts of version management fun. GoDaddy doesn't provide SVN by default, nor is there a compiler to allow you to build it yourself. Install the right binaries, however, and you're good to go. Here's how. Note: Big thanks to Erik Fantasia's Subversion on GoDaddy shared hosting, which I have blatantly ripped off. I wrote this version to add a few things as well as provide a newer version of SVN (1.6.16) for download.

Get the Binaries (or skip this and use the ones I posted)

You'll find that GoDaddy servers run a version of CentOS (at the time of this posting, 5.5). To find out yourself what version you're running, login via SSH and run:

cat /etc/*release*

I grabbed the latest CentOS-compatible command-line client from CollabNet, and used the rpm2cpio tool on another Linux machine to unpack it:

rpm2cpio CollabNetSubversion-client-1.6.16-1.i386.rpm | cpio -id

If you do this yourself, you'll get an opt folder with CollabNet_Subversion inside. Change this with:

mv opt/CollabNet_Subversion svn

Now tar this file to make it easy to upload to GoDaddy:

tar -cvzf godaddy-subversion-1.6.16-i386.tar.gz svn

If all the instructions above are mumbo jumbo to you, download this tar.gz file I created with everything you need.

Install onto GoDaddy server

Now, follow these steps:

  1. Upload it to your home folder (the one right outside your html directory), or cd into that directory and run:
    wget http://decadentwaste.net/wp-content/uploads/2011/04/godaddy-subversion-1.6.16-i386.tar.gz
  2. Unpack the archive:
    tar -zxf godaddy-subversion-1.6.16-i386.tar.gz
  3. If you're using the version I provided, and you don't already have a .bash_profile file in this directory, run:
    mv bash_profile .bash_profile

    Otherwise, append the following lines to your existing .bash_profile:

    export PATH=$PATH:$HOME/svn/bin
    export LD_LIBRARY_PATH=$HOME/svn/lib

    so that bash knows where to find the svn files.

Now, exit bash and log in again. Run svn --version to make sure everything is working.

Additional Notes

  • As pointed out by Alin on Erik's original post, GoDaddy blocks SVN connections other than HTTP/HTTPS. So your svn+ssh:// repositories will unfortunately not work.
  • The CollabNet package also includes some documentation, install/configure files, and man pages, which I have removed. If you need these files, I suggest downloading a package yourself from CollabNet.
  • When trying to check out a repository with a password (hint: use --username=yourusername if you don't want to use your GoDaddy bash username), you'll get a warning that your password will be stored to disk unencrypted. AFAIK, SVN can only store encrypted passwords on Linux systems using the GNOME keyring or KDE kwallet. So say yes unless you want to get one of these working on GoDaddy (good luck!)
  • I do not know if GoDaddy's servers are 64-bit, but I had trouble getting the 64-bit SVN binaries to run.

Use Google Page Speed 1.10 with Firefox 4 for Mac

You've updated to Firefox 4 for Mac and trying to run Google Page Speed in Firebug. But you get an error:

Unable to run Page Speed.

Your browser or operating system may not be supported. Please see Page Speed Compatibility for more information. Page Speed Copyright © 2010 Google Inc.

"Curses!" you think. "When will Google support Firefox 4?" Turns out, it already does.

If you look at the Page Speed download page, you'll see that Mac OS X (x86 only), Firefox 3.6+, and Firebug 1.5.3+. So far, so good, right? Take a gander at the Page Speed Compatibility page and you'll find that "64-bit Firefox is not supported." Guess what? Firefox 4 is now 64-bit by default on Mac OS X. So until Google makes Page Speed 64-bit compatible, use the Finder to Get Info on Firefox and check "Open in 32-bit mode." Reopen Firefox, and Page Speed will be working again!

Use QuickLook for Easy and Beautiful File Thumbnails

Wouldn't it be great, to use the gorgeous icon previews that the Mac OS X Finder creates as thumbnails? Read on to see how a system tool called qlmanage can create previews from PDFs, images, text, or documents in Pages, Numbers, Keynote, Word, Excel, PowerPoint, HTML, and more!

Read More

The U.S. Government should take cues from Apple

Picture this: instead of immediately condemning the WikiLeaks cable, the Pentagon issues a press release stating "The United States Government issues many false versions of critically important internal documents and will not comment on the authenticity of this particular cable." What terrorist organization is going to expend all of its time and effort chasing after targets that are, in great likelihood, merely a red herring?

Read More

Rockin' Desktop: Set the G-Force music visualizer as your desktop background

The iTunes music visualizer is a really cool way to experience your music. But it requires a lot of screen space to show its stuff, and that makes it pretty impractical to get work done at the same time. In this tutorial I'll show you how to use G-Force, the killer visualizer on which the stripped-down "iTunes Classic Visualizer" is based, as your desktop background.

Read More