If you are using nicEdit on content editable areas instead of the iFrame method, then you may have run across the FireFox bug that prevents you from changing the text alignment on the first line of a content editable element.
As a work around, change the nicCommand method in nicEdit.js (Line 610 or so), to be this:
nicCommand : function(cmd, args) {
if ((cmd == 'justifyright') || (cmd == 'justifyleft') || (cmd ==
'justifycenter') || (cmd == 'justifyfull')) {
try {
document.execCommand(cmd, false, null);
}
catch (e) {
//special case for Mozilla Bug #442186
if (e && e.result == 2147500037) {
//probably firefox bug 442186 - workaround
var range = window.getSelection().getRangeAt(0);
var dummy = document.createElement('div');
//To restore the range after collapsing for triple click bug...
var restoreSelection = false;
dummy.style.height="1px;";
//find node with contentEditable
//Triple Click selection Problem in mozilla, the selection contains the content editable div, which creates a problem for some reason, so we collapse the selection to the end, and then re-select everything...
if(range.startContainer.contentEditable == 'true'){
window.getSelection().collapseToEnd();
restoreSelection = true;
}
var ceNode = window.getSelection().getRangeAt(0).startContainer;
while (ceNode && ceNode.contentEditable != 'true')
ceNode = ceNode.parentNode;
if (!ceNode) throw 'Selected node is not editable!';
ceNode.insertBefore(dummy, ceNode.childNodes[0]);
document.execCommand(cmd, false, null);
dummy.parentNode.removeChild(dummy);
//RestoreSelection if we changed it...
if(restoreSelection){
window.getSelection().addRange(range);
}
} else if (console && console.log) console.log(e);
}
} else {
document.execCommand(cmd, false, args);
}
}

Uniserver on Windows REQUIRES the .htaccess file to have the “Options +ExecCGI +FollowSymLinks” line in it… Or else you get a 403 forbidden on every page you try to access.
To Start with, setup your application with these instructions: (Insert link here).
Receiving Facebook Posts
You FBML application will receive information from Facebook in the form of a signed post. To determine if a post from facebook is authentic, there is an algorithm described here.
I have written a class I use that looks like this:
require_once('config.php');
class Joey_Facebook{
public static function getFacebookParams(){
if(!isset($_POST['fb_sig'])) throw new Joey_Facebook_Exception("No Facebook Signatore Parameter");
$parameters = $_POST;
if(self::authenticatePayloadFromFacebook($parameters, FACEBOOK_APPLICATION_SECRET)){
return $parameters;
}
else{
throw new Joey_Facebook_Exception("Parameters Do Not Authenticate!");
}
}
private static function authenticatePayloadFromFacebook($parameters, $application_secret){
ksort($parameters);
$payload = '';
foreach ($parameters as $key => $value) {
if ($key != 'fb_sig') {
$payload .= substr($key, 7) . '=' . $value;
}
}
if (md5($payload . $application_secret) == $parameters['fb_sig']) {
return true;
}
else{
return false;
}
}
}
class Joey_Facebook_Exception extends Exception{
public $msg;
public function __construct($msg){
$this->msg = $msg;
}
}
Once you have authenticated the request, you can now use the data in it. The important data (to me) is…
When a user has granted your appliation basic permissions, the $_POST['fb_sig_user'] is the facebook users id. Your application can use this to store and retrieve database records, display customized content, etc…
If your application is viewed via a profile tab, the profile owner’s fbid is in $_POST['fb_sig_profile_id'].
With these two basic pieces of information you can essentialy embed basic web applications into Facebook. You can gather much more information from the post, and also use Facebook’s API (btw… It does need to be de-mistified…) to gather more information about the user and add more social features to your application.
Getting a user to “Add Application”
To redirect the user to the basic add application page, view the details on this page.
oEmbed is an open standard that allows you to pass a url to an oEmbed provider and get back information about that resource.
i.e. Pass a hulu url to hulu’s oEmbed service: http://www.hulu.com/api/oembed.xml?url=http%3A//www.hulu.com/watch/20807/late-night-with-conan-obrien-wed-may-21-2008 and you’ll get back a json object with details of the video (thumbnail size and url, etc..) and on some oembed services the html needed to embed the video.
For more information, check out this page: http://www.oembed.com/
If you are a serious web developer that wants to ride the wave into the next decade, you MUST integrate with Social Networking / Media in your apps. Fortunatly, facebook just released a new API that is a piece of cake to use. WAY WAY WAY easier than their old one.
Check out the video about it’s features here: (The best stuff is half way through the video)
http://www.facebook.com/f8
I’ve used phpMyAdmin for a while, but I find it to be a little heavyweight at times. Sometimes I just want to run a simple query. The MySQL client is obtuse to use sometimes. So I went on a search for alternatives.
I now use phpMiniAdmin almost exclusively. It’s extremely light weight, fast and has LOTS of neat features. It provides everything I need 99.9% of the time. And it’s easier to configure then phpMyAdmin.
I watched this talk on You Tube by Mary Meeker who is the Managing Director for Morgan Stanley (A Big Wall Street Company, A Good One). It is extremely informative and filled with facts.
httpv://www.youtube.com/eventsatgoogle#p/u/8/X1w1FvgdZnE
At work Shawn Lonas sent this out to all of us, it’s a really good concise overview of some html5 features.
http://apirocks.com/html5/html5.html
Some say that Magento is horrible to work with. I say they are wrong. Magento is one of the most well designed pieces of software I’ve ever seen. Complete inversion of control. Awesome extendability. Sweet seperation of concerns. Proper use of classes, it’s all there.
But… It’s under documented, and it has a few core concepts you have to understand before it makes sense.
Recently I need to make a new shipping method for myhomefurniturestore.com. Fortunatly for me, magentomagick had a great article that had instructions start to finish (except for two details that are mentioned in the comments) for just such a task.
This is so so easy… Every site on the web should have one of these…
All you have to do, is paste the code from here: http://www.facebook.com/facebook-widgets/share.php
Onto your site…
See: Share with my friends.