February 2009

PHP: Generating Summary Abstract from A Text or HTML String, Limiting by Words or Sentences

On index or transitional pages, such as homepage or category pages of WordPress, you don’t want to show the full texts of your deep content pages yet but just a content snippet of the first few sentences or words as a summary with a read more link to the actual article. This is generally good …

PHP: Generating Summary Abstract from A Text or HTML String, Limiting by Words or Sentences Read More »

CSS: Double Border

In pure CSS solutions, a double border can be achieved via either a combination of single borders or a single double border style. 2 single borders The HTML: <div class="wrap-1"> <div class="wrap-2"> </div> </div> The CSS: .wrap-1 { border:1px solid blue; padding:1px; /* how far away 2 borders are drawn, remove this line to make …

CSS: Double Border Read More »

CSS: Difference between opacity:0, visibility:hidden and display:none

If you are going to make part of the page totally transparent, there are essentially 3 CSS ways to achieve element transparency: opacity:0 (needs 2 more hacks for different browsers) visibility:hidden display:none Bob, the man! Let me take the example of Bob sitting in a chair to explain how these styles are different from each …

CSS: Difference between opacity:0, visibility:hidden and display:none Read More »

CSS: Styling File Upload / Select Input Control <input type="file" … />

Let’s face it, the native implementations of file uploading control of HTML form is ugly, throughout most of the browsers, and not consistent at all. Plus, <input type=”file” … /> just doesn’t play by quite a few of the CSS input styling rules such as border and background, making it a even bigger challenge. Now …

CSS: Styling File Upload / Select Input Control <input type="file" … /> Read More »

Log Walking – Walk through your website logs and be in the shoe of a visitor

Well, just came across a rather insightful post by ronburk at Webmaster World, which by the way, is probably the most resourceful place for any veteran webmaster. Consumer behavioral analysis is one of the most important part of any marketing campaigns in any industry. The better you get to know your customers, the better you …

Log Walking – Walk through your website logs and be in the shoe of a visitor Read More »

JavaScript: Show & Tick a Specific Local Time Clock (Fixed Time Zone) instead of Client Time

When I’m coding for a new sub site where I need to show the local time of mine and my developers’ wherever the visitors are. Things get a little bit more tricky. Time basics in JavaScript and PHP To offset time zone differences in calculation, both JavaScript and PHP specs have time stamps representing the …

JavaScript: Show & Tick a Specific Local Time Clock (Fixed Time Zone) instead of Client Time Read More »

Scroll to Top