/mili

How to Show List of Blogger' Labels in Our Server

If you use blogger system, you know it add label and categorizing feature for posts.
And if you use blogspot hosting you able to list all labels beside your blog, but if you have your own hosting just show label in each post. but as you see in my blog I have it !

<?
function get_labels($post_number=true,
$label_dir='/home/yourusername/public_html/blog/labels'){
        
$style[]='font-size:8pt;';
        
$style[]='font-size:11pt;';
        
$style[]='font-size:12pt;';
        
$style[]='font-size:12pt;';
        
$style[]='font-size:5pt;';
        
$style[]='font-size:20pt;';
        
$style[]='font-size:24pt;';
        
$ret='';
        
$d dir($label_dir);
        while (
false !== ($entry $d->read())) {
                if(
$entry=='.' or $entry=='..')
                        continue;

                
$ret.= "<a href=\"http://yourdomain.com/blog/labels/$entry\" style=\"".
$style[rand(0,6)]."\">".str_replace('.php','',str_replace('__','/',$entry))."</a>\n";
        }
        
        return 
$ret;
}
?>
I created it a few month ago and now just copy and past it ! so I don’t remember what is variable $post_number doing ! (surely don’t effect in this function)