Home Codex

Twiners Codex

Web Hosts

Lunarpages.com Web Hosting
Codex

The Twiners Codex features lessons we’ve learned while working with the web.   Here we offer various code snippets or thoughts on techniques which you are free to use as you see fit



Localhost Development with Mac OS X v10.5.5

You may have noticed that some things have changed in regard to localhost development on Mac OS X Leopard (10.5.5)

Namely, with the switch to Apache2, the configuration files are in new places...   this article will discuss what the new settings are and how to fix your configuration to support the new paradigm.  More than that, we’d like to share with you how to set up your localhost development so that your Parallels Windows instances will be able to see the sites you’re working on.

There are a lot of variations on this technique out there... some people use Bonjour, while others go into their windows configurations and edit subnet masks and the like.   I prefer this way of doing it because it touches the least amount of files, it’s simple, and it works.

Read more...
 
Backup Address Book From iPhone

The iPhone is great and so is Address Book, yet as we all know data loves chaos and there are times when things don’t work as expected...  Namely, what happens if you've been forgetting to make backups of your Address Book and you one day discover that, for whatever reason, your Address Book suddenly goes empty yet you still have all your contacts in your iPhone?  Basically, what if you want to use your iPhone’s data as your backup?

There’s no clear way in iTunes to make sure that your iPhone will over write your Address Book to restore it...  in fact, you may well find (as we did one time) that the iTunes sync procedure will overwrite all the good data on your iPhone, leaving you empty handed on both fronts!  Indeed this very thing happened to us while on an Apple tech support call, and it was little consolation that the support rep felt very sorry about what had happened.

This article discusses a way to get around this problem...  it’s a bit of a work-around, but unlike other solutions which require messing around in Terminal (a moving target for various reasons), we’ve encountered great success with the following approach.

Read more...
 
Tiny MCE Error

For those of you using TinyMCE in your Joomla 1.0.x install, you may find that there's an error that occurs when you're trying to create a link or add an image.  Basically, the issue presents itself when TinyMCE needs to load a popup window, and it manifests itself by showing a blank window and issuing the following error:

uncaught exception: Permission denied to get property Window.tinyMCE

 ...followed by a couple of complaints stating:

tinyMCE has no properties

This problem is caused by the TinyMCE javascript files residing in a different domain or subdomain than the admin site.  If you want to know why it occurs, Mozilla discusses it under the topic, Same Origin Policy.  Their fix is to enter:

document.domain = "domain.com";

... which would be implemented by editing the tiny_mce_popup.js file (inside the TinyMCE folder) and adding the line at the top of the init block -- so that it's the first line inside init.

In the case of our Joomla install, this did not work and we ended up with a different error... because the issue had to do with the live site variable inside configuration.php.  We recommend, therefore, not editing tiny_mce_popup.js, but rather editing your configuration.php file to show 'www' in your $mosConfig_live_site variable.  Like so:

$mosConfig_live_site = 'http://www.yoursite.com';

It worked for us, and we hope that it works for you!