Yahoo Widgets 4.5

February 18th, 2008

A lot of time ago (about a year and a half) I worked briefly with Yahoo Widgets (previously named Konfabulator), as result I published a Small Widget: FangIT Server Stats. Unfortunately due lack of time I couldn’t finish some features I wanted to make on Yahoo Widgets.

In that time I remember some people were trying to allow Video (mainly FLV) on Widgets or even HTML Content. I left without checking Yahoo Widgets for some time, recently I remember this and checked to know what improvements were done it. When I see the ability to draw on widgets without thinking I downloaded the new Versio: 4.5

I have to say that the features are amazing, among them: Flash Embed, HTML Content, include of XMLHttpRequest, Drawing and even SQLite. I started ‘porting’ the old widget to a new version using this great features.

The widget is almost done and I hope on the next weekend I will release with great features, but meanwhile you surely will want to check Yahoo Widgets and if you’re a developer you will really like it more.

Mysqli small fix for allowing socket in Zend Framework

December 31st, 2007

As this site is running on ICDSoft hosting, they allow to use MySQL 5 or MySQL 4, but they provide different sockets for each version.

In MySQLi extension, the following host string doesn’t works: localhost:/tmp/mysql5.sock (or localhost:/tmp/mysql.sock), this because they separate the socket from the server host string.

In Zend Framework in the MySQLi Adapter, they don’t use the socket optional parameter, so I made a small fix to allow this [Zend/Db/Adapter/Mysqli.php]:

if (isset($this->_config['port'])) {$port = (integer) $this->_config['port'];

} else {

$port = null;

}/* new block */

if (isset($this->_config['socket'])) {

$socket = $this->_config['socket'];

} else {

$socket = null;

}

/* end of new block */

// Suppress connection warnings here.

// Throw an exception instead.

@$this->_connection = new mysqli(

$this->_config['host'],

$this->_config['username'],

$this->_config['password'],

$this->_config['dbname'],

$port,

$socket //new

);

This allow you to use the socket name, this was for enabling my new showcase example: Google Maps and GeoIP Location, you can see the full code here: http://blog.danguer.com/files/Zend_Db_Adapter/Mysqli.phps

Security Policies in Flash Player 9

December 20th, 2007

I recently had a problem with Security Policies with flash player; I suggest you to read the official documentation specially if you want to know what to do in several versions of Flash Player.

WhatI learn is too simple about loading a crossdomain.xml from a server:

  1. If you load the crossdomain.xml from an http request. Example: Security.loadPolicyFile('http://www.danguer.com/crossdomain.xml'). The flash player sandbox will only allow to you swf to connect to ports over 1024
  2. If you want to load ports below this, you need to read the crossdomain from a port below 1024, for example: Security.loadPolicyFile('xmlsocket://www.danguer.com:100')

Of course the most important about the last is that you can load from any port below 1024 and you’re granted to access any port on that server; you can use classes like Socket or XMLSocket for connecting to other ports; so you can have a server listening to information from Flash, but in another to serve the policies. You can do for example a small server in PHP5 for example: http://devzone.zend.com/node/view/id/1086 which shows you to use this great feature in PHP5.

Hope this help you.

Links:

New Showcase - Javascript and Flex

December 14th, 2007

Showcase by Danguer, Javascript and Flex IntegrationI’ve uploaded a new example in my showcase, this works using Flex technologies that makes the interface more easy to use but only with javascript are impossible to do.

I’ve used a download example, with normal javascript you cannot check the progress of a downloading into your computer. Of course, as this example could be not seen as of great use (but of course can simplify a lot the usability when your download links are not very clear, or in case of video, etc), this can be extended easily to upload and this is a feature very need on several sites.

Flickr for example uses a Flash uploader tool (along other sites) on a similar way, so you can upload a bunch of images/files and see the progress, making this using pure javascript only can be achieved patching the PHP sources with File Upload monitors, which is not easy and also not allowed on shared hosting, this example it can be used without problems with any normal PHP Server.

Go to example: Javascript and Flex Integration

Web Dragons: Inside the Myths of Search Engine Technology

December 3rd, 2007

This book is an excellent introduction not only about Search Engines and how works, but all which is around it, mainly internet from the view point of find information.

The book also handle information about copyright, future and past of internet development.

Even the authors recommend to start reading on the half, surely you should start from begining ;), since all the information is clearly explained and easy to read.

If you want to read this book searching for SEO techniques (like I though when I read the title) you won’t find anything here, well it talks about what is considered SPAM and several SEO ‘companies’ still doing like cloaking or hidden text. But the book handles very well every concept, even the Information Retrieval which sometimes can look obscure and only for rocket scientists, here this topic is clearly explained (of course the concepts) to learn how the Search Engines works.

Web Dragons: Inside the Myths of Search Engine Technology (The Morgan Kaufmann Series in Multimedia Information and Systems)