Friday, December 08, 2006
Free Advertising for Your Blog
Second, you can reply posts in some popular newsgroups and forums. Include your blog's info in the signature of your replies.
Third, ask your friends to add the link of your blog in their homepage or blog.
The more web pages pointing to your blog, the higher ranking you can get in Google's search engine. To know the ranking of your homepage for some specific keywords in search engines, you can visit http://www.googlerankings.com/index.php. Now, it supports Google, MSN Search, Yahoo and Ask Search.
Friday, November 18, 2005
Obfuscate the Spammer's Robot
Do you know how a spammer get your email addresses? Actually, your email addresses may already be put on the Web which can be accessed by the public. For example, in web-sites of many companies, they put contact lists containing email addresses of its staff. spammers use a program, called robot, to automatically retrieve email addresses on the Web. The spammers' robots
However, sometimes you can't avoid it. So, it is suggested to post your email addresses on the Web in a obfuscated form. For example:
john [at] google [dot] comThe robot is a very simple program which can only recognize the email addresses in the form of "xxx@xxxx.xxx". Once the email address is transformed, the robot can't recognize it, but human can. However, it is not user-friendly. I suggest to use JavaScript to transform the the obfuscated email addresses back when mouse is over the email addresses. Here is a real example in my homepage: Contact. Such that, someone can copy and past the email address directly.
Monday, November 14, 2005
Comments Submission
After did some survey on the web, I found the most popular technology is BBCode. BBCode defines a set of tags in form of "[xxx]" which will be converted to HTML tags. For example, "[b]bold text[/b]" is converted to "<b>bold text</b>". There are several free BBCode parsers available. It is convenient to deploy this technology.
One disadvantage of BBCode is not user-friendly. Users need to learn a new set of code. I thinks it is better to have a WYSIWYG editor. Unfortunately, I cannot find any web-based WYSIWYG editor for BBCode.
On the other hand, I found some open source web-based WYSIWYG HTML editors. It is great! I have tried the Cross-Browser Rich Text Editor and it works well in both Firefox and IE.
However, it is not secure to accept all HTML tags. On server side, it should filter out some dangerous tags, e.g.
Saturday, October 29, 2005
GIF vs PNG
Fortunately, I find a workaround on the Web -- http://homepage.ntlworld.com/bobosola/. It has details about the problem and how to solve it. In short, it uses javascript to patch all <img> tag of PNG graphic's CSS using the "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" of IE.
Actually, PNG has some advantages over GIF.
- Max color depth of PNG is 24-bit but that of GIF is 8-bit.
- PNG has higher compression rate than GIF.
- PNG support alpha channel transparency but GIF only support binary transparency.
Related Links:
AlphaImageLoader Filter
PNG Offical Site
Monday, October 24, 2005
Designing My Homepage
In my past experience, using static HTML, there are many duplication parts among different pages, for example, the page header, page footer, menus.... This make the web-site difficult to maintain. If I need to changes the page header, I need to edit nearly all HTML pages repeatedly. In programming, we avoid code duplication by using functions. How about make web pages? I think
In my homepage, I decided to use PHP as the template language. (To avoid confusion with PHP scripts for dynamic pages, the extension of template files is ".tpl") The following shows a typical page contains header and footer in PHP:
<? include 'header.tpl' ?>.... the contents here .....
<? include 'footer.tpl' ?>
The "header.tpl" and "footer.tpl" are PHP scripts which generate the header and footer HTML fragments respectively. In PHP, the "include" function embedded the contents of the specific file in current pages, similar to the "include" directive in C/C++. In the homepage, every pages contains header and footer will be like the above example. If we want to change the header, we only need to change the "header.tpl" file once.
However, we need to convert the PHP file to HTML. For example, we have an "index.tpl" file which is a PHP script for generating "index.html". We can issue the following commands:
php index.tpl > index.html
For a complete homepage, there should be many ".tpl" files. I think nobody want to type the above command line again and again. GNU Make is a good utility to do this task.
Since I only have some experience to create a simple "Makefile", it is not enough for handling a complete homepage. I spent some hours to study the GNU Make and hope I can create a generic Makefile tomorrow.