Posts made in January, 2011

PHP-function convert html special character code back and forth

Posted by on Jan 24, 2011 in Blog, PHP Code | 52 comments

It is about another feature in “Laura Ann” project. In the wysiwyg text editor, it was recommended to save the page update in both “View” mode and “HTML” mode so that users can update after changing format or changing actual html code in the editor. “View” update is implemented as default setting. The problem was occurring when trying to update page in “HTML” mode. The updated the page shows all HTML tags code instead of formatted text. I discovered that the reason is that update took all converted html tags constructed by “<” and “>” that were actually put into special HTML code as...

Read More

To embed videos using JW Player

Posted by on Jan 17, 2011 in Blog, Web Plug-in | 3 comments

Needed to finish up a web project for my client. I was asked to embed videos with various format types including “wmv”, “mov”, “swf”, ‘flv”, “f4v” and etc. And some requirements are to show play controller, to auto-start. wmv and swf can be easily done by coping and pasting some code to embed the video files. After some research, I found JW Player is a very well-written Javascript library to support video embedding on the web. It covers all five media types I need, and it also can play mp4, 3gp and etc. The player interface is also user-friendly. The best thing is that it is very easy to be used and customized...

Read More

Handy PHP Simple HTML DOM Parser

Posted by on Jan 11, 2011 in Blog, Web Plug-in | 56 comments

I found this little PHP library fileĀ  is very useful. It can read through the whole HTML file through DOM object. And user can also read part of HTML file by using div id + class. Once file is read, HTML tag element can be located, and tag attributes and values can be found as well. It also supports to change the tag attribute value so that user can use this library to update and change HTML file properties dynamically. ======================================= How to get HTML elements // Create DOM from URL or file $html = file_get_html(‘http://www.google.com/’); // Find all images foreach($html->find(‘img’) as $element) echo $element->src ....

Read More

Hello world!

Posted by on Jan 8, 2011 in Blog, etc | 0 comments

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Read More