tr.im returns

I was sad to see that tr.im was shut down, quite unprofessionally, back in early August. And since then, the world moved on without them and everyone forgot they ever existed in the first place. In fact, if it wasn’t for a random twitter post by them yesterday, I would’ve never learned that they apologized:

Everyone involved at Nambu would like to apologize again for the hastiness in which we acted last Sunday, announcing the shutdown of tr.im by the end of the year.

…they regrouped, and are now transitioning to being open source and community-owned.

…and you have Eric Woodward‘s personal guarantee that he’ll take care of shortfalls in funding to ensure that tr.im never goes offline again.

Make any image into Google Maps, with UMapper

I’ve been following the success of UMapper (formerly GMap, provided by the good folks at AFComponents.com) since a client of mine asked ERA404 to build a dating search with results based on proximity around a geographic area. And while the site has taken a slightly different direction since then, UMapper piqued my interest. In their latest newsletter, they cited creating Google Maps-style widgets from any image. And sure enough, it works!

I started to think of all the useful applications this could have for my companies and clients. For instance, Lyrek CEMS, which manages our clients’ contacts, events and venues, could plot their contacts on a world map. Clients seeking geographic searches (such as the dating site, previously mentioned) could now brand and custom design their national or global maps. Game developers and Facebook Application developers could use this functionality for GeoDart Games and MapWikis. And who is to say that the map has to be a geographical representation of land? Any application where a user would want to plot points of interest/note on a 2D plane would work: It could be a hi-rez scan of an organ or anatomical figure for physician studies, or a zoomed micro electron slide of pond water for biological research. The possibilities are endless.

And with AFComponents/UMapper’s analytics tools, you can also create surveys, questionnaires, tests/quizzes, census studies and a whole host of other information-gathering applications.

Watch their video, here:

Apple gives up…sorta

Over a year ago, I posted about ZDNet’s 10 Most Annoying Programs on the Internet, where Apple was ranked #2, forcing users to install Quicktime with each upgrade of iTunes and also pre-selecting that the user wanted to install Safari and Mobile.me onto their computers as well. I’m a strategic marketer, so I understand the logic behind it. More than half of the users probably just click “Continue” without reading what they’re installing. It’s the same guiding principle behind bundling installers with Yahoo! and Google browser toolbars. Read more

Facebook announces Fanboxes

fanboxFacebook and site developers/promoters as well as those keen on social networking for their business/band were excited to learn of the launch of “fanboxes” to drive traffic directly to their Facebook professional service page. Now, people wishing to take advantage of their social network and drive traffic to become their fans have a much simpler/easier process for doing this. In the past, you had to say “Log-in to Facebook, search for [company name], and from the results look for the one that has our logo and says ‘professional service’ below it.” Next Monday, Facebook will remove the restrictions on adding usernames to Pages. But Wednesday, they’ve announced the Fanbox:

Over 8 million users become fans of Facebook Pages every day to connect with their favorite public figures and organizations and get updates directly in their streams. Now, users can connect with brands, musicians, celebrities, businesses, and more, whether they’re on or off Facebook.

Today, we’re excited to launch the Fan Box, a Facebook Connect-enabled social widget that Page owners can add to their websites to allow users to fan and view the accompanying Facebook Page stream. With the Fan Box, brands can bring content from their Facebook Page into their website and help convert website visitors into Facebook fans. Users can view the most recent posts from the Page, see a list of other fans (including their friends), and, most importantly, become a fan without leaving the site. Additionally, if a user visits the site and isn’t logged in to Facebook, the user can log in and become a fan directly inline as well.

I’ve been tinkering with the idea of putting together a tutorial to teach [d]online readers how to implement a Fanbox into their site. If this is something you might be interested in reading, please drop a few comments and I’d be happy to oblige. If there isn’t much interest, I’ll go to Coney Island instead. Ta!

Flash File Uploader

Uploader Screenshot

Flash File Uploader V3.2 (Allow All Filetypes)
Looking for a Flash File Uploader that allows you to set a custom directory and allows all filetypes? Click here.

I was getting tired of upload scripts timing out in Flash and talked with Mike a little about creating an AJAX uploader. Unfortunately, AJAX has a difficult time updating a progress meter while an upload is running and it still cannot prevent browser requests from timing out on some servers. Granted, you still can use AJAX to do this and I’d recommend reading up on a number of online tutorials that offer solutions. However, up until the advent of Flash’s FileReference Object, programmers had to rely on server-side Perl scripts to manage these uploads and as Zeh so eloquently put it, “I love Flash’s upload. It’s so much better than the extremely crap HTML upload.” Using the new FileReference Object, I put together this handy-dandy Flash File Uploader to manage files with variable file limits. I have to be honest and say that the idea came from YouTube‘s “Upload Video” feature and may owe a little credit to them. The FLA is perfectly skinnable and can easily be adapted to restrict to filetypes (Images, Text, Audio, Video, etc.). This one is pretty standard as I’ll be creating the limitations on a per-use basis, depending on the application. Also, you’ll still need to have PHP running on your server and have access to change file/folder permissions, specifically the repository for uploaded files (default: /files/) I should also mention that NO security scripting has been included in the PHP file. upload.php simply copies the newly-uploaded file to a directory without performing any virus protection at all. So here’s my disclaimer.

Disclaimer: If you intend to use this script, you should be wary of people uploading viruses to your server. By downloading these source files, you agree to indemnify me of any damage from malicious attacks.

That being said, here’s what you’re getting:

1. uploader.fla Fully-skinnable Flash Source file (FLA) that enables browsing to a computer, selecting the file to be uploaded, initiating the upload and watching a progress meter, and completion. 2. upload.php Simply PHP file for moving the newly-uploaded file to a specific directory (default: /files/) 3. index.html HTML page which includes (by way of the Deconcept SWFObject) the uploader.swf, and parameters for php handling and file size limit. 4. SWFObject I included the JS file for your convenience. If you have questions about how to use the SWFObject, please see my previous tutorial, Activating an ActiveX Control’s Interface through Javascript. 5. Files Directory This is an empty placeholder directory for your uploaded-file storage. Make sure it is writeable!

This Page can help you to limit types of files that are being uploaded and I urge you to refer to your favorite PHP tutorial site for instructions on adding security to the upload.php script. Restrict to File Type (hard-coded): Here’s an easy upgrade to the above Flash File Uploader if you’d like to restrict uploads to specific file types (in this example, images and text files).After importing the FileReference Object:

import flash.net.FileReference;

Enter the following code to create a file type array:

var allTypes:Array = new Array();
var imageTypes:Object = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
allTypes.push(imageTypes);var textTypes:Object = new Object();
textTypes.description = "Text Files (*.txt, *.rtf)";
 
textTypes.extension = "*.txt;*.rtf";
 
allTypes.push(textTypes);

Then, simply modify the browse method

file.browse();

to only use the new Array’s file types:

file.browse(allTypes);

Restrict to File Type (dynamic): Now let’s make it a bit more interesting. Add the below variable to your SWFObject:

fo.addVariable("types", "image|text|audio|video");

Remove the hard-coded AllTypes array (above) and enter this instead:

if (_root.types != undefined) {
var typesArray = _root.types.split("|");
var allTypes:Array = new Array();
var len:Number = typesArray.length;
for (var i:Number = len; --i>=0; )
    switch (typesArray[i]) {
    case "image" :
        var imageTypes:Object = new Object();
        imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
        imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
        allTypes.push(imageTypes);
        break;
    case "text" :
        var textTypes:Object = new Object();
        textTypes.description = "Text Files (*.txt, *.rtf)";
        textTypes.extension = "*.txt;*.rtf";
        allTypes.push(textTypes);
        break;
    case "video" :
        var videoTypes:Object = new Object();
        videoTypes.description = "Video Files (*.avi, *.flv, *.mov, *.wmv)";
        videoTypes.extension = "*.avi;*.flv;*.mov;*.wmv";
        allTypes.push(videoTypes);
        break;
     case "audio" :
        var audioTypes:Object = new Object();
        audioTypes.description = "Audio Files (*.aif, *.mp3, *.wav, *.wma)";
        audioTypes.extension = "*.aif;*.mp3;*.wav;*.wma";
        allTypes.push(audioTypes);
        break;
    }
}
}

Down by the browse statement, change the browse method to this:

browse.onRelease = function() {
    if (allTypes != undefined) {
        file.browse(allTypes);
    } else {
        file.browse();
    }
;

Republish your Flash file and experiment with changing the variable in your SWFObject to change the file type restrictions. Show only images:

fo.addVariable("types", "image");

Show only text files:

fo.addVariable("types", "text");

Show only video files:

fo.addVariable("types", "video");

Show only audio files:

fo.addVariable("types", "audio");

Show all:

fo.addVariable("types", "image|text|audio|video");

Pretty nifty, eh? For questions, feel free to submit a comment. Enjoy!

May 30, 2008 – Added script to Flash and PHP to stripslashes which in previous versions broke Javascript functions.
August 18, 2007 – Suppressed the “A script in this movie is causing Flash Player to run slowly” browser alert (Thanks to Matt Kull, Zeh and Pete).
June 17, 2007 – Mike updated the PHP files to enable caching of auto-generated thumbnails, preview mode (prior to upload) and fixed some security issues.
Download Flash Uploader v2.0 (ZIP) Includes: All the Flash and PHP project files with step-by-step instructions for installation on your site.
Download Flash Uploader v3.0 – Custom Dirs (RAR) Includes: All the Flash and PHP project files with step-by-step instructions for installation on your site.
Download Flash Uploader v3.1 – Details Bug Fix (RAR) Includes: Complete FLA, PHP and source files with options for Custom Dirs, File Name Rewrite.

Download Flash Uploader v3.2 – Allow All Filetypes (RAR) Includes: FLA, PHP and source with Custom Dirs, File Name Rewrite, int’l characters and “Allow All”.