daily gadgets, computers, and electronic news
20/04
2005

My first plugin: CA-Weton

Sponsored Links

I’ve just finished my first WordPress plugin :d Not quite perfect yet, stil have one minor problem. But beside that, it works fine :p

The plugin is called CA-Weton. It will display the Javanesse Weton day for specific date. You can use it for current date, post date, and custom date. Somehow, it doesn’t display the correct Weton for comment date :( , but I’ll try to support comment date in the next release :) Now also support comments date.

In addition, since I’m Indonesian :d , this plugin also have ability to display the Indonesian weekday name for specific date. Same as above, comment date currently not supported.

Automatic Installation
CA-Weekday supports automatic installation through WP Plugin Manager. Click here for more info.

Manual Installation

  • Download the plugin from here.
  • Extract the file and upload ca_wp_weton.php into your WordPress’ plugins directory (../wp-contents/plugins)
  • Activate the plugin from Admin’s Plugin page
  • Modify your theme pages with the syntax below to display the weton.

Usage Syntax

  • function ca_weton_pasaran($before, $after, $tipe, $print, $current)
    • Purpose:
      Display Javanesse weton/pasaran name
    • Parameter:
      • $before: Text displayed before weton/pasaran
      • $after: Text displayed after weton/pasaran
      • $tipe: Type of input date. Default is 0 (0 = current date | 1 = post date | 2 = comment date)
      • $print: Boolean (true/false). If true, output will be print directly to screen. If false, output is returned and must be print manually. Default is TRUE.
      • $current: Specific date input in UNIX time-stamp format. You can use mktime function to create one.
        Example: $cur = mktime(0,0,0,2,16,2005);
        Default is NULL (you don’t need to input anything, plugin will handle it automatically based on $tipe parameter)
    • Usage:
      Display weton/pasaran for current date
      [php]< ?php ca_weton_pasaran('(',')'); ?>[/php]
      Display weton/pasaran for post date (put inside The Loop)
      [php]< ?php ca_weton_pasaran('(',')',1); ?>[/php]

Version History

  • v0.3: Support for comments date
  • v0.2: Remove ca_weton_hari
  • v0.1: Initial release

To Do

  • Comment date support
  • Admin interface to customized weton/pasaran and weekday name

See a working demo right on top of this page, under the post’s title :d

My first plugin: CA-Weton is written by cosa and posted under Programming, WordPress , , . If you like it, you might consider subscribing to our feed, follows us on Twitter, or receive our latest posts via email. Or else, you could also or store it to your favourite social bookmark sites. Further information about this article can be found.

3 Comments »

  1. 1
    WP Plugins DB » Blog Archive » CA-Weton says:

    [...] Visit [...]

  2. 2
    [DGN] Our Best Picks - April 2005 | Funponsel Network says:

    [...] and installing other people’s plugins, I did create my own plugins as well. For example: CA-Weton, CA-Weekday, CA-Credits, and [...]

  3. 3
    Frank Lucas says:

    Why do you say, “See a working demo right on top of this page, under the post’s title :d” when no demo displays there?

Leave a comment