Category Archives: Web Applications

PayPal HTML Header Surprise

I just opened up the source for PayPal’s new login page, the one with the HTML5 video in the background, as I was curious as to what method they were using to achieve it.

I was a little surprised when the first thing I saw in the HTML header was a big ASCII PayPal logo and the text “Now hiring @ http://jobs.ebaycareers.com/search/paypal-jobs”

PayPal Login Source

 

It’s certainly an interesting spot to advertise that you are hiring. That said, I guess it depends what type of person you are looking for!

Handy Magento Upgrading Links for 1.5 to 1.6

English: Magento Commerce Logo
Image via Wikipedia

When upgrading Magento, it doesn’t hurt to have some handy resources. I’ve pulled up a few for doing the upgrade from 1.5 to 1.6:

Some other handy links for upgrading that aren’t specifically relevant to 1.5-1.6 upgrades:

And if you are running Magento on a Hostgator server, this may be handy for upgrading with SSH: How do I get and use SSH access – Hostgator support portal.

Enhanced by Zemanta

Upgrading Magento Community Edition Through Magento Connect

I’m still experimenting with Magento, and there has been a new version released. As I am going to put this experimental site into production once I’m happy with it, I figure it’s best to keep it up to date and to make sure I know how to update it.

It took me a little bit to work out the best way to do this though. With Drupal, you just download the latest files and upload them to the server, overwriting the old files (more or less anyway), WordPress now has an update button that handles it automatically. Magento I thought should have something in Magento Connect about it, but I couldn’t find anything.

After a bit of hunting around, I found Inchoo’s guide to upgrading, but the extension key he provides to use in Magento Connect simply doesn’t work. It turns out that this is because it is a Magento Connect 1.0 key. The version of Magento I have installed uses Magento Connect 2.0 though, so I needed to find that extension key. I did a little bit of hunting but ended up just modifying another extension key to:

http://connect20.magentocommerce.com/community/Mage_All_Latest

I put this in Magento Connect and off it went, happy as Larry.

For reference though if you are using Magento Connect 1.0, the extension key is:

magento-core/Mage_All_Latest

Running a remote backup of cPanel automatically

I’ve been looking for a way to automatically backup individual cPanel accounts to a remote server that don’t necessarily have root WHM access. In particular, I want the MySQL databases, but I would also like to get entire site backups if possible.

I’ve found a few posts about it that I’m going to have to have an experiment with when I get a chance and see what works. For reference though, and if anyone else is looking for this, the sites that look the most promising are:

Installing Drupal on Windows Server 2003 – Relevant Links

Recently I have needed to setup a Windows 2003 IIS server to run Drupal, the catch though is that it already runs an ASP.NET website and does not have MySQL, PHP, or even FastCGI installed. So, it must not affect the existing website at all. Working on a development server, I’ve been trying to get this to behave correctly. It is out of my area of expertise, so I’ve been doing a lot of reading up on it. The links I’ve used are mostly all below, mainly for my future reference and for anyone else that may need to do the same:

The easiest way to set Drupal up on Windows should be with Microsoft’s installer. It uses their WebMatrix with the Web Platform Installer and looks like it should automate the process and configure everything that needs to be configured. The problem with it though is that it uses IIS Express, which can’t run alongside IIS, and the installer cannot run with IIS, which means I can’t use it for this situation.

So far, I’ve tried the IIS Aid PHP installer, which seems to work for the most part, however, I’m having FastCGI errors left right and centre with it crashing constantly. Unfortunately the IIS Aid installer doesn’t seem to work when using ISAPI instead of FastCGI, so I’m not up to installing and configuring PHP manually using FastCGI, and if it’s still unstable, ISAPI.

Another option is to look at running Apache on a different port to IIS, but I would rather not go down this route if I can avoid it.

It’s a real pain. If you have any experience with this, tips or advice would be appreciated!

Applying Patches to Drupal or Modules on Mac OS X

I’ve had to run a number of patches to Drupal modules before, and I’ve always done them on my Windows machine simply because that is what has the most instructions available to do so. At the moment though I am away on holidays and only have my Macbook Pro, so when I needed to run a patch I debated going to the effort of doing it through a Windows virtual machine that isn’t set up for it, or set up Eclipse and run it through their software. After much debating, I decided to look up the instructions again and see if there was a recommendation. While I was hunting around, I noticed two very, very useful things:

  1. Apple’s Xcode suite allows you to run Drupal patches.
  2. You can patch files using the OS X terminal without any need to install special software such as what I needed to do to run patches through the Windows Command Prompt. You don’t even need to have Xcode installed!

I already have Apple Xcode, as does every Mac user (if they choose to install it from their OS X disc), so that seemed like it would potentially be the easiest option, then I saw the instructions to patch a Drupal module using the OS X Terminal. It is so easy I can’t believe I didn’t start patching on my Mac sooner!

The process to patch a Drupal module on Mac

  1. Place both the original module file and the patch in the same folder.
  2. Make sure that they have the same name, with different extensions, so you would need my_module.patch and my_module.module.
  3. Open up the Terminal application. Either search for Terminal in Spotlight, or go to Applications > Utilities > Terminal.
  4. Navigate to the folder containing your files using the Terminal cd command. By default Terminal will start in your user directory, so if your files are in a folder called patch/my_module inside your user directory, you would type: cd patch/my_module. A little trick here to save yourself some trouble is just type cd and then drag the folder into the Terminal window. OS X will auto-fill the folder path for you.
  5. Run the patch using the patch command: patch < my_module.patch

That’s it! Simple as that.

If you would like to take a back up of the original patch file, type: patch -b < my_module.patch and a backup file will be created for you entitled my_module.module.orig

If you are patching Drupal core, the process is slightly different, you need to use the -p0 attribute to stop patch from asking you what file to patch, so you would do this as: patch -p0 < my_module.patch

Those are probably the main things you’ll use, but for more information, here are some other references:

One other thing to note is that if your .patch and .module files don’t have the same name, then Terminal does sometimes have issues with it. I’m not sure why exactly.

Hope that helps! If you’ve got any other tips for patching on OS X I’d love to hear them!

Using the GMap Module with Drupal’s Private File System

If you use the GMap module with your Drupal installation, something you may not realise initially is that a file is created in your Drupal file system called gmap_markers.js.

By default this file goes in sites/default/files/js/gmap_markers.js and is not the same file as the gmap_marker.js file in the Drupal module directory.

When the Drupal private file system is enabled, you cannot directly access a file in the sites/default/files directory, this means that when the the gmap_markers.js file is looked up, Drupal doesn’t allow access to it. Fortunately, GMaps provides a way around this.

Change the location of gmap_markers.js

The first thing you need to do to resolve this issue is to change where the gmap_markers.js file is located. The next thing you need to do is to tell GMap where to find it.

  1. Pick a location outside of the Drupal file system. For example, files/js/gmap_markers.js instead of sites/default/files/js/gmap_markers.js
  2. In your Drupal administration section, go to your GMaps settings and below the “Google Maps API Key” text box, there will be an option to specify the path to gmap_markers.js from the Drupal root directory.
  3. Enter the path.
  4. Save the changes.
  5. Click the “Regenerate” button in the “Regenerate Marker Cache” section.

Your cache should now be rebuilt in the new location using these settings. This should resolve any private file system issues relating to the GMap module in Drupal 6. Drupal 5 may vary a bit and I have not tested this, but I suspect it should still resolve the problem, for the most part, but you may need to use a different directory than what I suggested.

Good luck, if you have any issues or other tips, such as for Drupal 5, I’d love to hear about them in the comments.

What I’ve been Doing – Yahoo Pipe Feed Aggregation

For KIB216 I have created a pipe which takes an RSS feed from numerous sources where I post blogs and updates, including:

It then lists them in chronological order:

Find your Latitude and Longitude

While I was experimenting with Yahoo Pipes for the Flickr photo display mashup I made the other day I found another mashup which could potentially be very useful.

It is simply called “Find Latitude and Longitude” and does pretty much exactly what it says.

You are shown a big map which is pulled from Google Maps and you can subsequently navigate the map just like on Google Maps. The latitude and longitude of your cursor is shown below the map, and if you click on a location, that latitude and longitude is stored below the map along with the address until you click on another location.

The interface for locating a latitude and longitude on http://www.findlatitudeandlongitude.com/
The interface for locating a latitude and longitude on http://www.findlatitudeandlongitude.com/

This makes it very quick and easy to find the latitude you are looking for. Unfortunately, it doesn’t have an address search option, but if you know where it is and how to use Google Maps, you can quickly navigate to the locatino you are after and grab the latitude and longitude for it.

Uses

This is something that has a lot of potential use for in web site development for determining geocodes for the geolocation tags of a web site. An option, such as a copy to clipboard button that copies the longitude and latitude in a single string could be a nice extra feature for this purpose that isn’t currently available.

Obvious other uses are mashups such as the Flickr mashup I mentioned earlier which I used the latitude and longitude for.

Aside from that I’m not sure that there are a significant number of other uses, aside from just general curiousity or needing to know the latitude and longitude of places for planning say a hiking expedition.

Final comments

The interface is very simple but effective, the design could perhaps be spruced up a bit to make it a nicer site, but I don’t think it’s really necessary.

I think adding the extra clipboard functionality would make this tool tremendously more valuable than it already is, and it isn’t something that would take that much more to add I don’t think, after all the information is already being printed, it’s just a matter of some JavaScript on a button to store it in the clipboard, ready to be pasted.

What do you think? What else could you or do you use it for?

Triplify – Search Google, Yahoo and Bing all at once!

The Triplify search box
The Triplify search box

Triplify is a mashup that is highly useful to me as a web site designer, especially when looking at search engine optimisation.

What does it do?

Triplify is a search engine front end that takes your search query and then passes it on to Google, Yahoo and Bing. Those 3 search engines return the search results to Triplify, and it collates and displays them to the user.

By default it sorts the results based on their position in the results of each search engine which is great for quickly seeing where a web site is ranked in each search engine without having to go hunt through them all separately. If you aren’t in the first 16 results though then you are out of luck as Triplify does not currently appear to have paged results available and so only 16 results for each search engine are given. So what you get is something like this:

The first 6 results in a Triplify search for "brisbane web designer"
The first 6 results in a Triplify search for "brisbane web designer"

What do the colours mean?

Google is shown in blue, Yahoo in Red and Bing in that yellow/green colour. I’m not sure that these are the best colours as they don’t really symbolise those search engines. I was thinking while I was using it that the colours aren’t the best choices, in my opinion, Yahoo should be yellow and Bing should be blue and Google red. I’m not entirely sure why though, after all, the Yahoo logo is Red and Google uses blues as well as reds. Blue seems to better suit Bing, after all, blue is very much a Microsoft and Live colour, and Bing is related to both of them. The others I’m really not 100% sure about though. I associate yellow with Yahoo, and I’ve been trying to figure out why for a while now. I think it’s because of the smileys that used to be on their home page in that strong yellow colour that were part of the Yahoo Instant Messenger branding. I used to use YIM quite regularly, so that may be it. Upon thinking about it further, the colour choices are good, they are just not the colours that I associate with each of those search engines.

What else can it do?

If you only want to show the results from two of the search engines, or even only one, just uncheck the boxes below the search box of the ones you don’t want and voila, they are gone! Need them back? Just check the box again and they will reappear.

If you want to sort the results by search engine, or any of the other column headings (though search engine seems to be the only other particularly useful one to me), just click the column heading, for example, click “Title” and the search results will be shuffled into alphabetical order. Click “Engine” and the results will be grouped by search engine.

There is also a handy “Add Triplify to your browser” link at the top of the page which, if your browser supports this feature, will add Triplify as a search option to your browsers search box.

Quirks and nuisances

Unfortunately at the moment, there doesn’t seem to be any way to sort in descending order rather than ascending, this isn’t a big thing, but it would be nice!

The main issue I have is that the sorting is affected by whichever sort you used previously. This can be a handy feature, but it can result in unexpected behaviour. For example, if you are viewing with a position sort, then you sort by search engine. The results will be shown in order of their search engine ranking. Now sort by title, then sort by search engine again. They are now sorted by search engine, but in alphabetical order instead.

Perhaps some explanation of how this works would make it clearer to understand to the new user, it took me playing with it for about half an hour before I realised that it sorted by both the current and previous sort option. My initial assumption was that it should sort Title, Description and URL alphabetically, then search engine should show pages in their ranked order, not in Title, Description or URL order. I do admit, it is useful, but unexpected.

In hindsight, the motto “Search, compare and sort!” does actual indicate that you should be able to do some sort of advanced sorting such as what is available, and if you go to the about page it does explain how the search sorting works, but the about page is hidden in tiny text down the bottom of the page and isn’t exactly the first thing you think of when trying to figure out how to use it. Maybe a more prominent link at the top of the page, such as “Help” on the right hand side underneath the existing tools navigation box that is there.

Final thoughts

I think Triplify is something that is going to play a very important part in my future search engine optimisation efforts. I don’t see any particular appeal in it from a general search point of view because the search results are not as easy to understand as they are in any of the search engine interfaces, but it will save a lot of time determining if a web site is ranked in the top 16 results or not and checking on it’s progress.

It is only in beta, so no doubt the things that are unclear may be cleared up once a 1.0 version is released.

Have you found an interesting use for Triplify? Share it in the comments!