Forums

New Plugin: Shire Reckoning (22 posts)

  1. allyngibson
    Member
    Posted 4 years ago #

    I've written my first WordPress plug-in.

    Once installed, the plug-in generates a date in Shire Reckoning, the calendrical system in use in the Shire in Middle-Earth during the late third age. I've done this before, but as a BASIC program. Now I've rewritten the program in fairly simple .php code.

    Interested parties may download the plug-in here.

    How does one call the plug-in? I inserted the following code into my sidebar.php file:

    <?php shire_reckoning(); ?>

    The function can also take arguments in the order (month, day, year). The default is to generate the current date.

  2. carthik
    Member
    Posted 4 years ago #

    Cool! Want to add it to http://dev.wp-plugins.org and http://wp-plugins.net ?

    You can also add it to an appropriate page at http://codex.wordpress.org

    Interesting plugin, this. Don't know if I'd use it though :)

  3. vkaryl
    Member
    Posted 4 years ago #

    This is nifty. I'll let you know how it goes with installing....

  4. jennmiller
    Member
    Posted 4 years ago #

    Love it! Thanks a bunch.

  5. TechGnome
    Moderator
    Posted 4 years ago #

    I'm geeky enough, I just might give it a try....

    Tg

  6. splunk
    Member
    Posted 4 years ago #

    I have no clue what it is, and I doubt my friends do either...but it's on my site!

  7. mdawaffe
    Member
    Posted 4 years ago #

    This is just about the coolest thing I've ever heard of.

  8. bloom
    Member
    Posted 4 years ago #

    I can't wait to use this on my site...I totally geeked out when I saw this!

  9. vkaryl
    Member
    Posted 4 years ago #

    Very cool. Had to tweak a few things to use with the Quentin template, but still very easy to use - thanks for a truly nifty plugin! It's great for those of us who read Tolkien (beginning with The Silmarillion and going on from there) a couple of times a year.

  10. mcangeli
    Member
    Posted 4 years ago #

    mdawaffe, I love your layout.

  11. oriecat
    Member
    Posted 4 years ago #

    How did you get that on this day part on yours Allyn? That's awesome! :)

  12. mdawaffe
    Member
    Posted 4 years ago #

    mcangeli: for the CSS, I can take credit only for a few tweaks. It's a design by Douglas Bowman.

  13. allyngibson
    Member
    Posted 4 years ago #

    Oriecat--it's not finished, but it's something I'm working on. I'm trying to work the chronology from Appendix B into the plug-in. I feel that the plug-in as releasd is complete in and of itself, but the Tolkien fan in me had to go another step or three.

    I'll make a post when/if the "On this date in Middle-Earth history" is ready for mass consumption. :)

  14. maesterkinoc
    Member
    Posted 4 years ago #

    cool plugin I'm a tolkien freak

  15. vkaryl
    Member
    Posted 4 years ago #

    Allyn, how did you get the moon phase icon on your page? Is that a plugin from somewhere?

  16. vkaryl
    Member
    Posted 4 years ago #

    Ah - nev'mind, I see that it's a part of the calendar function in the theme you're using....

  17. allyngibson
    Member
    Posted 4 years ago #

    Users who would like to download the "On this date in Middle-Earth history" may do so now.

    The .zip file contains two files.

    shire.php, which generates the date only and which was released a few days ago.
    shire2.php, which generates the date and also lists important happenings on that day in Middle-Earth history.

    The updated plug-in is called in almost the same manner.

    <php shire_reckoning2(); ?>

    The Shire2 plug-in can take four arguments (month, day, year, info). The fourth argument, info, is either true or false, and determines whether or not you want the historical information listed.

  18. tgrisier
    Member
    Posted 4 years ago #

    Ok, I love this plugin but how do I turn off the bullets?

  19. allyngibson
    Member
    Posted 4 years ago #

    Open the .php code in a text editor and strip out the [li] tags, and replace the [/li] tags with maybe something like <br>. If you want to try this file, I've made that change.

    Sorry, I should have thought of something like that. I wrote the plug-in so it would look nice with my own set-up, not realizing that other set-ups are different.

  20. jennmiller
    Member
    Posted 4 years ago #

    Got it working on both my sites. Thanks for the bonus!

  21. vkaryl
    Member
    Posted 4 years ago #

    That's great, Allyn! I capitalized the day and month names, and added a break tag and some square brackets around the info sentences - makes it display better in Quentin.... Thanks for this truly nifty additive!

  22. tgrisier
    Member
    Posted 4 years ago #

    Thanks a million, Allyn. Works like a charm.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.