keaglez

Hi! I'm Jeffri Hong, also known as keaglez, a 21 years old geek who love the web and comic.

Checking the current post type with is_singular function

Posted on Programming, Wordpress

The WordPress 3 introduce a new feature that let us easily make our own custom post type. This is really a cool feature that give more possibility to customize the WordPress powered website. However, I find that the documentation is not complete yet.

In the recent problem I got, it requires me to check the current post type, something like is_single for post and is_page for page. Luckily enough, the is_singular is now changed to accept a parameter, and that is post type. :)

In current codex page, it still not updated. However, now we can use this to check whether we are on our post type page or not.

if ( is_singular(“my-post-type”) )
// whatever you want to do here

Great!

CSS Captcha 0.1 beta

Posted on Programming and tagged with , , ,

With coming of the CSS 3, it is now possible to draw using merely HTML and CSS. After seeing some awesome work that can be done with CSS 3, one of my friend suddenly get an idea to create a captcha. Thinking that bot today might haven’t able to pass this kind of captcha, I created this, CSS Captcha. The captcha that didn’t use any image. It just simply using HTML and CSS to draw characters in your screen. I might be not the first one to create this though. :)

Click here for demonstration

Read more…

Moving Stick Figure with CSS 3 and jQuery

Posted on Designing, Programming and tagged with , , ,

With CSS 3, creating a stick figure is easy and fun. But it is even better if it can move. So here it is

Click here for the demo.

This currently worked on Google Chrome and Safari. However, in my test, Safari lagged a lot in the animation. So Google Chrome performed the best!

Enjoy… :D

Update: This is also submitted on Smashing Magazine CSS 3 Contest, you can preview and download from there too. :)

Pure CSS Dropdown with a Little CSS 3 Juice

Posted on Designing, Programming and tagged with , ,

Menu dropdown is one of the feature that almost every today webs have and it is one of the most popular feature used in the web. In past, such feature need Javascript event. Such as using onMouseOver or onMouseOut event. However, since CSS introduced, the new psuedo classes now have this ability. Also, this solution is work for all major browser, except, of course for the CSS3 juice added, which is currently only worked on web-kit browser such as Chrome and Safari. :)

Read more…

ZN5 Backup Tools 1.0

Posted on Programming, ZINE ZN5 and tagged with ,

Here is my ZN5 version of Backup Tools.

Even though it used the same name as my E2 version, the code is completely different. I rewrite the code to make sure it would worked well in my ZN5. This is written in Bash and requires showQ and showRadio. So any modded firmware should be able to run this. In addition, you need to have Mgx Box, MPKG Box, or similar software to install MGX.

I just added some basic features for the backup and restore. The backup file is stored in tar archive and the file name is generated by date. By default, the backup file is stored in /mmc/mmca1/backup, you can change it anyway.

It support backup and restore following data:

  • Contact, SMS, and other related data stored in /ezxlocal/sysDatabase/main.db
  • Menu Tree
    this should work only on the same firmware, so it is useful when you want to try a new firmware and then return to your old firmware, you restore this file and your menu tree will still the same as before you flashed
  • Web Profiles
  • Settings
    I would recommend you to restore this on the same firmware, although it might worked fine to use the backup for the other firmware

The best feature it has is it support multiple backup. So you can choose to restore backup from any date you want (as long as you have the backup). :)

Download

If the download didn’t work, try to right click and choose save link as (or other similar option in your browser).

Hope you find it useful. Cheers… :)

Any comments, suggestions and bugs report are welcome. Thanks.

Proudly powered by Wordpress