Considering how regularly new versions of Firefox now come along, that's quite some bug fix list in version 10! http://t.co/K3I2vLpW 1 week ago


27th
Feb 08

Google Maps revisited



I blogged recently with a simple script for adding a Google map onto your site. I’ve since written an enhanced PHP script, so thought I’d share it.

First of all, you’ll need to download the following 2 PHP scripts…

map_head.php map_head.php

map_main.php map_main.php

The first file must be added into the HEAD section of your HTML in the following way…

<?php
include('map_head.php?key=xxx');
?>

You need to replace xxx with your Google Maps API key.

Now, in the BODY of your code, where you wish the map to appear you will need the following code…

<?php
$width="700px";
$height="400px";
$border_col="#808080";
$options="1YYY";
$xcoord="-1.218501";
$ycoord="52.927571";
$zoom="2";
$popup="Name Here<br/>Address Here<br/>Another line<br/>Another line";
include('map_main.php');
?>

Replace $width and $height with the size that you require the map to be. $border_col is the colour that you want the map border to be. $xcoord and $ycoord is the, you guessed it, x and y co-ordinates of where you want the map pin (and the centre of the map) to go. $zoom is the starting zoom level. $popup is the contents of the popup message that appears next to your pin – lines should be separated by the <br/> command.

Finally, $options indicates whether certain options are in use or not. Use “N” to switch off any of these.

The first flag is a number between 1 and 3. Depending on which it is, the following map option is switched on…

  1. GLargeMapControl – a large pan/zoom control used on Google Maps. Appears in the top left corner of the map by default.
  2. GSmallMapControl – a smaller pan/zoom control used on Google Maps. Appears in the top left corner of the map by default.
  3. GSmallZoomControl – a small zoom control (no panning controls) used in the small map blowup windows used to display driving directions steps on Google Maps.

The second flag should be set to Y to be switched on and displays the map scale.

The third flag should be set to Y to be switched on and displays buttons that let the user toggle between map types (such as Map and Satellite).

The final flag should be set to Y to be switched on and displays a collapsible overview map in the corner of the screen.

Now, the code I’ve supplied has no error checking in it, so supplying the wrong parameters will give unpredictable results. Or it will just break.

If you have any problems or questions about it, feel free to contact me.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly



25th
Feb 08

TotalEdit


TotalEdit

Download from… http://www.codertools.com

Download size… 5.65MB
Installation size… 12.93MB

It isn’t often I try out a new code editor and get excited. But TotalEdit is doing precisely that.

Let’s see what it’s got…

  1. Resizable word wrap
  2. Line numbering
  3. Ability to easily add multiple browser launch
  4. Correctly syntax checks PHP embedded within HTML code
  5. Work on a USB stick
  6. It’s quick to launch
  7. Remembers previously opened files

What isn’t there? Well, there isn’t much else, including plugins. My current editor, Notepad++, has those and I don’t use them. It’s also rather bloated compared to others. But, then again, I’m putting it on an external USB drive where space isn’t an issue.

But, there is ONE issue. It isn’t much but that’s all it takes for a product to go from being the best one to being “nearly there”. Whenever I close the program and restart it the explorer toolbar resets back to the root directory structure. It’s remembered the files I was editing, but not the matching folder structure (and as I have my web development files neatly on a USB drive under lots of sub-folders, this is laborious).

Shame, otherwise I may have been switching editors.

I’m going to contact the authors and see if there’s a solution (I can’t find anything in the preferences)… I’ll wait until I get a reply (or not) before I give this software a final score. My hope is that there is a solution.

Update (27/02/2008):

I received a rather speedy reply yesterday from the authors of the software. There is no facility to do what I was after, but they were already looking at modifying the under-used project facilities to do something similar – as in, link the project to a specific folder. The current version was to include this but it didn’t make it in. They’ll hopefully now include it in a later update.

So, I’ll keep an eye out and re-check the program once the update occurs. In the meantime… the software gets 4 (out of 5) stars. So nearly there, but I’m sticking with NotePad++ in the meantime.

Update (09/09/2008):

Version 5 has literally just been released (after some beta testing, which I got involved with) and one thing that’s changed since that earlier review is my preference for editors that I can put on a USB key. Well, thankfully, TotalEdit has a portable version.

Unzipped it comes in at a shade over 11 MB, but this includes 4.5 MB for the spellchecker. In comparison, NotePad++ is a mere 4.5 MB, including a number of plugins that are included, but this doesn’t include a spell checker.

In use, it now has everything I need. It runs swiftly from my USB drive, I can get the display just how I like it, it remembers my previous file usage and, more importantly, the directory structure at the side remembers where I last was too – meaning I can return to exactly where I was everytime. You can even turn off the annoying “long line marker” off easily from the menus (most editors have one, but many have no way of turning them off, other than specifying a column that’s way off the screen).

Like many other editors, it’s been designed for any kind of coding and not just web development (although there is an HTML menu which has tidying options, as well an internal preview feature). Therefore there are no options to launch the current file in an external browser – however, you can create your own tool options. There are two things that now let it down – first of all, it’s not obvious how to do this without turning to the Help (for example, clicking in a blank area to add a new tool, rather than pressing an “add” button, for example). This extends to the shortcuts you can specify as parameters – even the Help isn’t very helpful, and a few examples wouldn’t have gone a miss. Secondly, and only minor, but you don’t get icons for any new tools that you add (picking up the icon from the .exe you specify, I wouldn’t have thought, wouldn’t be too difficult). Having said that, there appear to be a bug where sometimes the existing tools icons don’t appear, so at least it then appears consistent ;)

To launch the current page, say, in Firefox is

Command: firefox
Arguments: "$FilePath"
Output Capture: Dos Prompt / Run Externally

$FilePath is the entire path to the current document, including filename. $FileName, though, is just the filename. I was expecting $FilePath to be just that – the path of folders, hence my confusion. This is where I say some examples would help clear things up a little. Also note the quotes which are required.

Configuration wise, the whole editor is highly changeable (thankfully, in the portable version of the program it’s obvious which files contain configuration data, and therefore shouldn’t be over-written). However, you can’t assign keyboard shortcuts to the tools you create yourself. But otherwise, excellent.

There is a project facility, but this isn’t an option I use (I prefer to use folder structures on my drive as projects) – never-the-less it’s very welcome to have. The same goes for macros – again something I don’t use but it’s welcome to have.

One quick tip… I’ve changed the code font to Consolas, a TrueType monospace font which, if you’ve not got it already, can be downloaded from Microsoft for free.

Summary of TotalEdit

So, what do I think of it overall? Well, I said in my earlier review that it might usurp NotePad++ as my editor of choice if it remembered the folder structures. It now does. So it has.
Star Star Star Star Star

Reviewed by David Artiss on 25th February 2008.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly



4th
Jan 08

LopeEdit Lite


LopeEdit LiteLopeEdit Screenshot

Download from… http://www.lopesoft.com

Download size… 3.2MB
Installation size… 4.6MB

LopeEdit is a nice looking editor. It displays line numbers, word wrap indicators and, importantly, wraps correctly (i.e. re-wrapping as the windows resizes, rather than to a fixed screen position).

I tried the free version (as that’s the grand total of how much I wish to pay) but there is a “pay for” version with extra facilities. In this case, however, none of these extras were ones that I was looking for (ftp updates, file comparison, etc., are all available separately and probably a lot more powerful too).

But, as with most editors there are a couple of cons. First of all there’s no facility to launch the current page in a browser (as I’ve said before I’m surprised this isn’t missing from more editors as most are trying to be generic coding editors rather than web-specific). Secondly, this falls into a trap that others do when it comes to syntax highlighting – PHP scripts are assumed to be pure PHP. That means any HTML within them are not displayed correctly (and in the case of LopeEdit, it often gets confused). As most of my pages are HTML with a smattering of PHP within them, this means they highlight badly. Other editors assume both, others have seperate options (i.e. PHP or HTML/PHP).

Summary of LopeEdit Lite

Decent rounded code editor, not web specific, which is where its weaknesses lie.
Star Star Star Star Star

Reviewed by David Artiss on 4th January 2008.

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly