I'm saos@ngmo

Archive for December, 2007

Hàm tạo URL thân thiện tương thích với tiếng Việt

by saosangmo on Dec.13, 2007, under Nice Scripts

Như bạn có thể thấy, các permalink đến các bài viết trong blog tớ đều ở dạng ten-bai-viet thay vì ?p=xxx như mặc định của WordPress. Để làm được điều này khá đơn giản, chỉ cần host bạn đang dùng hỗ trợ .htaccess, mod_rewrite và bạn thay đổi Customize Permalink Structure trong mục Options > Permalinks là xong.

Ở mỗi bài viết, nếu bạn không trực tiếp sửa đổi permalink thông qua tùy chọn Post Slug, mặc định WordPress sẽ chuyển tiêu đề bài viết thành dạng có dấu gạch ngang, ví dụ Welcome to my blog sẽ biến thành welcome-to-my-blog một cách tự động. Tuy nhiên, điều này chỉ tiện với các tiêu đề tiếng Anh, bởi nếu bạn dùng tiêu đề tiếng Việt, các nguyên âm mang dấu sẽ bị đổi thành dạng %xx rất khó chịu. (continue reading…)

Leave a Comment :, , , more...

13 Awesome Javascript CSS Menus

by saosangmo on Dec.10, 2007, under Giao diện - đồ họa web, Nice Scripts

Every web designer tries to be creative when it comes to designing the main navigation of the website. Now we present you with 13 awesome Javascript CSS menus that will be very handy and easy to modify to suit your needs.

Lets take a look at recent examples of these … (continue reading…)

Leave a Comment more...

Code kiểm tra google page rank

by saosangmo on Dec.08, 2007, under Nice Scripts

Trong khi tìm kiếm thuật toán để kiểm tra google page rank của 1 trang web, mình sưu tầm được bài viết trên diễn đàn mobileread.com

Đoạn mã này được xây dựng bởi Alex Stapleton, Andy Doctorow, Vijay “Cyberax” Bhatter, và 1 vài thành viên khác của mobileread.com.

Nội dung:

<?php
/*
This code is released unto the public domain
*/
(continue reading…)

Leave a Comment :, , , , more...

Code PHP để check alexa rank

by saosangmo on Dec.07, 2007, under Nice Scripts

<?php
function alexaRank($domain)
{
$ch = curl_init(‘http://alexa.com/data/details/traffic_details?url=’.$domain);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, “Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1″);
$curl_ret = curl_exec($ch);
curl_close($ch); (continue reading…)

Leave a Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!