Jul 7

Moving a WordPress site from one domain to another is not a very difficult task. In fact the switch can take between 10 to 15 minutes. It all depends on your connection speed and the size of your database. The fastest way to move your site could be accomplished by following the next steps:

  1. Backup your database
  2. Download fresh copies of the plugins you want to use in the new server (if your blog is only a few months old you might be able to skip this ste
  3. Export all posts from database (you can use phpmyAdmin or similar)
  4. Export all comments from database (use same tools as above)
  5. Install fresh copy in new domain
  6. Import posts from previous database
  7. Import comments from previous database
  8. Upload and activate plugins.

Thats it, now the tricky part for me was that I have been posting on my previous server for 5 years and I didnt want to loose those 2 or 3 current readers so I wanted for them to have a smooth transition as well. One option was to forward all the posts to 301 (Moved Permanently).

That is an easy solution but I had a dilema. I want to keep bloggin in my current blog and make sure that I dont loose visitors or search engine ranking. So in order for me to do that I had to basically forward every one of my current posts to the new domain, but that would mean that I had to go and make a very long .httaccess with a list of each one of my posts for the past 5 years.

[THE PLUGIN SOLUTION]
Another idea was to use a plugin that would forward any post from my “old” blog to the “new” blog. Again this could have been good but now ALL posts would be forwarded, even the new ones or even typing the original site would send me to the new site, sot that was a big issue as well.

[THE LETS EDIT THE TEMPLATE SOLUTION]
The other option (which I partially implemented) was to add a statement on the template to make sure that if the user hit a post with a certain date before the date the new site went live, they would be sent to the new site. That worked for a bit until I realized that pages, categories, archives, back and forth buttons were causing some issues.

[THE 404 SOLUTION]
So the last solution was to trigger a 301 on a 404. That means that if the user goes to:
http://www.helmutgranda.com/page-that-doesnt-exists
They would get sent to the new site:
http://www.superloaded.com/page-that-doesnt-exists

So now I have the best of both worlds, I am not sure at this point for how long I have to keep forwarding my users but I will leave the option for at least couple of months and then just throw a “we’ve moved” message with a referral to the new site.

The option of using a date to forward users was a nice idea and I am considering to create a plugin out of that but not sure at the moment.

May 20

If you are creating a Silverlight document in a MAC be aware that if you create a ZIP file from the Finder context menu “Create Archive of…” every time you try to access the files inside the ZIP file with Silverlight it will fail. Why? Not sure but I would assume something to do with the way MACs compress files compared of how PCs do. One way to get around this issue is by creating your ZIP files with “DropZip”, you might be able to create ZIP files with a different program that will run fine with Silverlight.

May 20

I am doing some testing with Silverlight (I know right!) and I kept getting error #2207 without really getting a detailed description. Well the issue -in MY case- was hat i was trying to download a file cross-domains, and with most plugins it was a no-no. So I just needed to change the source to local file.

JavaScript:
  1. Good:
  2. downloader.open("GET", "image-4.jpg");
  3. Bad
  4. downloader.open("GET", "http://www.helmutgranda.com/images/image-4.jpg");

May 7

For the longest time I was having issues with this Adobe Air Error and its description, the main issue is that the "details" for this error are "null". We do get the description that the database is locked but no details on file name where the error occur or line number.

If you do a search in the Adobe documentation you will get a pretty blank line after the error:

3119 Database file is currently locked.

To solve the issue once and for all what the error means is that you have a connection open to make changes to the database and you have opened a new connection to make more changes to the database. So there are 2 solutions

1. Use the first connection to make your second updates
2. Close the first connection and then you can use the new connection

Read the rest of this entry »

May 1

If you need to create a directory from Air and you dont know how, mostlikely you will use the Adobe Air Documentation and use something as the following:

JavaScript:
  1. var directory = air.File.documentsDirectory;
  2. directory = directory.resolvePath("AIR Test");
  3.  
  4. air.File.createDirectory(directory);
  5. air.trace(directory.exists); // true

it all looks nice and makes sense but in the real world it wont work, you would get an error like this:

Type Error : Value undefined ( result of expression air.File.createDirectory ) is not object.
# of your code error.

The problem with this approach is that the createDirectory method doesnt take any parameters, if you try to pass values directly to the method you will get this error:

Argument Error : Error #1063: Argument count mismatch on flash.filesystem::File/createDirectory(). Expected 0, got 1.

Once i was able to get this error I realized that the docs were wrong, or at least on this specific section. So looking at a different sample I figured out this works:

[js]
var directory = air.File.documentsDirectory;
directory = directory.resolvePath("Air Test");
directory.createDirectory();//no parameters necessary, Air knows where we need the new directory.
[/js/]

By first "asking" Air if the directory exists then Air knows where to create the new Directory rather than passing the property directly to the method.

This applies to Adobe Air SDK 3.0 and using Javascript

Tags: , , ,

May 1

The Open Screen Project is working to enable a consistent runtime environment – taking advantage of Adobe® Flash® Player and, in the future, Adobe AIR™ -- that will remove barriers for developers and designers as they publish content and applications across desktops and consumer devices, including phones, mobile internet devices (MIDs), and set top boxes.

Adobe - Open Screen Project

Tags: , , ,

Apr 30

I started creating an Adobe Air application with Adobe DreamWeaver and it works great, but I am so used to doing development with TextMate that I ended up using DreamWeaver just for previewing and compiling the application and TextMate for development. Fortunatelly for us Matthew Reed has created a Bundle to test and compile your Adobe Air Applications in just 3 steps:

- Download Source in Matthew Reed's site
- Install Into Textmate
- Use it! Control + Return

Thanks for this bundle!

Source: Adobe Airâ„¢ TextMate Bundle

Note: He recommends to install (or have) the SDK inside "Applications/AdobeAir" and the bundle works as expected. But if you would like to change the location where the Bundle makes reference to you can do so by looking under:

Bundles>Bundle Editor>Show Bundle Editor

Tab to:

Air> Package Preview
Air> Package Self-signed

and you will find the following lines:

export PATH=$PATH:/Applications/AdobeAir/bin
export CLASSPATH=/Applications/AdobeAir/lib/adt.jar
adl "$TM_PROJECT_DIRECTORY/application.xml"

Change /Applications/AdobeAir/ to the location of your SDK.

Apr 29

Bill Gates offers some insight on their rationale behind trying to acquire Yahoo... and everyone is talking about that. What i found more interesting is their approach to provide their software for free to students. Now that is a move that I believe it is going to help them greatly. If you are a student you might not be able to afford $400+ USD software, even some professionals have a hard time gathering the cash to buy the software. Some packages cost as much as $2,000+ USD. So providing Microsoft products for free to students -I believe- it is the right move because those same kids that will spend hours using the software right now, tomorrow will shape the stability of what software is being used at that moment.

In an interview with CNET News.com's Ina Fried, Microsoft's chairman explains why the company is giving away its developer tools to students and offers a glimpse at the rationale behind the Yahoo bid.
Source

Tags: , ,

Apr 21

New stage rendering core in Flash 10
* Live video playing in author time (meaning you don't have to compile your movie to see how your video will be displayed)
* New timeline, similar to After Effects (or Director as some people have pointed this out)
* No more keyframes
* Transfer objects between Tweens.
* Bones
* Runtime Inverse Kinematics
* And more....

Disclaimer: Not all features listed in demos actually make it to the final release

Apr 15

This error is produced in Safari for MAC and you can't view it unless you are looking at the Activity window AND you are trying to load the same file at the same time.

For example note the following:

Actionscript:
  1. loadFile1();
  2. loadFile1();
  3.  
  4.  
  5. function loadFile1() {
  6.     load("file1.swf")
  7. }

I know this is too ovious to go un noticed, but if you have a large project you are working on there might be the possibility that you might be trying to load the same file twice and thus Safari tries to load the file twice and the error is produced.

This is what "i think" its going through Safari's little mind.

Load file1.swf
...loading
Load file1.swf
...loading .... Wait?! its the same file
STOP loading the file and trow and error!
Throw Error WebkitErrorDomain error 203
Load file1.swf

« Previous Entries