what the blog?

{upgrade in progress..}

WordPress Howto retrieve top parent category ID from the post

Add the following code in your theme functions.php

1

Resolving jQuery conflicts

I’m a newbie on jQuery… when i integrate tons good wordpress plugin, it’s always a nightmare because there is always had var conflicts, so there have a function call jQuery.noConflict(); for solving such kind of conflicts, you just modify the control script to jQuery(foo) instead of $(foo), cool?

NextGEN Gallery i18n gallary tags issue

I found that “nggtags gallary=” not yet support i18n tags, however “nggtags ablum=” did, is it include in future release or current version have bug? i don’t know… And then i tried to fix it using following mod.

horde/imp display gb2312 character interim solution

While too many gb2312 character in horde cannot converted as UTF-8, to give it a quick workaround, I’d just enforce horde to treat gb2312 encoding to gbk which is more compatible for chinese double-byte character. Replace the lines in lib/Horde/String.php from if (!$output && String::extensionExists(‘mbstring’)) { $output = @mb_convert_encoding($input , $to, $from); } to if […]

MS-DOS executable (COM) file is actually chinese email

#>file mytest.txt mytest.txt: DOS executable (COM) reported a chinese email message as a DOS executable file Workaround: Comment out the line in /usr/share/file/magic #0      byte            0xe9            DOS executable (COM) #>0x1FE leshort         0xAA55          \b, boot code #>6     string          SFX\ of\ LHarc  (%s) and then rebuild it #> rm /usr/share/file/magic.mgc #> cd /usr/share/file/ #> file -C magic […]

useful sophos scripts

When you brought a “Enterprise Product”…….. how come there has no automation tools solve your panic…… they give you the binary, “services?”… but nothing provide to you… why you still buy it…….

Perl smtp mailer script

If your server doesn’t have SMTP or maybe you have sendmail relay problem, also if you’re reporting the problem about mail service. This script allow you send out your message through SMTP insead local sendmail. Script Usage: echo “Hello! Perl script” | /path/to/mailer.sh “Subject” “Receiver_Name_1” “Receiver_address_1” “Receiver_Name_2” “Receiver_address_2” <script> | /path/to/mailer.sh “Subject” “Receiver_Name_1” “Receiver_address_1” “Receiver_Name_2” […]

addusers in shell script

Add a user one by one. #!/bin/bash usage=”Usage: Enter password and username – addusers.sh username password group comment homedir shell ” sample=”Example: ./addusers.sh myname mypassword group1 ‘My Name’ /home/myname /bin/bash”


Fatal error: Call to undefined function griffin_pagination() in /u01/mydream.com.hk/wwwroot/blog/wp-content/themes/griffin/index.php on line 23