This text is replaced by the Flash movie.

Archive for the ‘Coding/Programming’ Category

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.

PNG upload/resize trouble

September 25th, 2010
While updating a component I got from cakePHP (Image Resize/Upload) I found out that it was not for my current version of PHP - it has trouble uploading PNG type image, I'm getting "Warning (2): imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error" This error only occur on servers with PHP v5.1.x or newer... so the simple solution from the code...

from
imagepng($cropped,$filename,80);
to
imagepng($cropped,$filename,8);

The third parameter is for the quality of the image to be uploaded so for png it only supports from 0 - 9, above that it will cause warnings and errors.

PodCast Software

August 5th, 2010

A Podcast Desktop Application Software I created Last month for TsemachAdonai.org. It reads XML data for podcasting also can insert new data within it.

More Description:

1. Browse The Previously Added PodCasts.
Description 1

2. Adding New PodCast - Select the MP3 file and automatically upload it, also update the XML with the new entry.
Description 2

3. Channel Settings - Will update some portion of XML data.
Description 3

4. FTP Settings - Here where you are gonna set the settings for FTP for upload, and also where is the XML file it should be reading and writing. You can save your settings via registry or saving it on a file.
Description 4

5. About - NonSense part :D .
Description 5

I'm trying to create a Java version for this, since my client uses Mac now.