This text is replaced by the Flash movie.

Archive for December, 2010

bash_profile in 10.5.8

December 30th, 2010
Well I'm a Mac Noobie but I know some UNIX console commands, I was trying Zend Framework with MAC OS 10.5.8, I got stuck when I'm trying to find the bash_profile thing...

open ~/.bash_profile

to add some alias

alias zf=/usr/local/ZendFrameworkClient/bin/zf.sh

so I tried to use grep with profile keyword to search "ls -a ~/ | grep profile" and it shows this file .profile so I tried to edit it and add the alias for zend command, and it work perfectly.

ZendFramework PublicPath

December 10th, 2010
Solution - in this forum http://stackoverflow.com/questions/2003101/zend-and-htaccess

So I won't forget how to fix this. when I encounter the problem again

Flex Compare Validator

December 7th, 2010
Looking for Flex Compare Field Validator?

Well these custom classes could help you.

A Simple Form Field Comparison Validator for Flex
Flex CompareValidator custom Validator



Flash required


You can download the sample code here along with the Package classes.

Joomla 1.5 Article Trash

December 4th, 2010
While debugging the component I created I noticed that the query was returning some articles I didn't knew existed. I found out that these articles are just trashed.

The simple way to separate article trash from active articles is to get the state datafield of the table #__content equals to 1.

1
2
3
4
5
6
7
8
9
10
11
$query = "SELECT a.*, n.*, t.*, n.link as linkThisPage"
. "\n FROM #__componentnews_news AS n"
. "\n LEFT JOIN #__content AS a ON a.id = n.pr_id"
. "\n LEFT JOIN #__componentnews_types AS t ON t.id = n.type_id"
. "\n WHERE ( a.state = 1 )"
. "\n AND ( a.publish_up = " .$database->Quote($nullDate) 
. " OR a.publish_up <= " . $database->Quote($now) . ")"
. "\n AND ( a.publish_down = " . $database->Quote($nullDate)
. " OR a.publish_down >= " . $database->Quote($now) . " )"
. "\n ORDER BY $orderby"
. "\n limit $skip," . $count;

Where in this query . "\n WHERE ( a.state = 1 )" should do it.