Happay Mommay?

By Shamus Posted Thursday May 25, 2006

Filed under: Links 2 comments

So Technorati is going totally nuts and reporting links that aren’t there. For example, it tells me that this woman linked me twice today, which is a nice trick since she only posted once, and that post did not link anywhere. (This is clearly a fluke. I’m sure there are no links here from that site.)

But what’s REALLY freaking me out as I sit here in a 4a.m. insomnia-induced daze, is that the photograph on the left side of her site looks almost exactly like my son. It’s very odd to visit the blog of a total stranger and see a picture of my own son, looking the way he did about 18 months ago, wearing clothes he’s never owned.

I really should get some sleep.

LATER: I did. It still freaks me out.

 


 

Spins a web, any size

By Shamus Posted Thursday May 25, 2006

Filed under: Nerd Culture 4 comments

It is now about 4a.m. here and I can’t sleep for some reason. So, I’ve decided to inflict this on you:

Note that in the movies Spider-Man now has organic webbing. He doesn’t make it in a lab. It comes from inside his body. This means that when he webs you up, he’s covering you in his bodily fluids.

I just thought you should know that.

 


 

Lexicon WordPress Plugin

By Shamus Posted Wednesday May 24, 2006

Filed under: Programming 19 comments

This is a wordpress plugin I’ve made that will find certain words – which you define – and turn them into links which lead to your dictionary. The user can mouse over the word to see a short definition, or they can follow the link to see the full definition. This is handy if you have a lot of jargon on your blog which might confuse newcomers.

Example:

According to Steven Sempai, the TV series of Read or Die differs greatly from the OVA. Meganekko agent paper is only in the OVA, and contrary to common practice, the OVA has less fan service than the TV series. There is no ecchi, and most otaku will be glad to hear there isn’t a lolicon character, either. The cast is mostly female, but this isn’t a harem comedy. Agent paper is a sort of quasi-mahou shojou who can manipulate paper to form weapons and tools. There aren’t any mecha, and while agent paper is sometimes kawaii you won’t find any slapstick chibi humor here. The Seiyuu in the series are all excellent. I thought the story was silly, but some people liked it. If you did, then akanbe!!

In the above text, I didn’t create any of the tooltops or hyperlinks, I just typed the words and the plugin handled the rest. If I edit the post, I don’t have to deal with the dense clutter required to make all of that work. Editing that paragraph in HTML would be a nightmare, but with the plugin I just edit the plain text and the links happen as if by magic.

Installation:

Note that this plugin requires PHP5. If your webserver does not have this, the plugin won’t work!

First, download the plugin here. Unzip the files. You’ll need to edit lexicon.php (just a bit!) and then make your dictionary.

This plugin isn’t very advanced, and requires a little more setup than most plugins to get it working right. Deep breath, you can do it.

  1. Create the dictionary
    The first step is to create the dictionary file you will use, which is called dictionary.txt by default. You can see my dictionary here. There is an example dictionary included in the zip as well.

    For each word in your dictionary, there are 4 lines, the last of which is optional. Line 1 is the word (or even phrase) itself. Line 2 is a short definition that will be used as a tooltip. Line 3 is the full definition. Line 4 is optional, and can specify an image to use for the dictionary entry. Then you must have at least one blank line, and then the process starts over with line 1 of the next word, until the end of the file is reached. If you omit the last line (the image) then the entry just won’t have one. No biggie.

    For each entry in the dictionarty there are several lines:

    • Line 1 is the word itself.
    • Line 2 is the short definition used as a tooltip when the mouse hovers over the word
    • Line 3 is the full definition. Remember, it all has to be on one line!
    • Line 4 is the “see also”. Just put words seperated by commas and the dictionary will use them to cross-reference. Leave a BLANK LINE if you don’t want this.
    • Line 5 is the image, including path. Leave a BLANK LINE if you don’t want an image
    • Leave one more BLANK LINE before you list the next entry.

Note that you don’t need to sort the entries. The plugin will sort them into alphabetical order for you.

Note that if the word in your dictionary is defined in ALL CAPS, then it is treated as an acronym, and it will only turn into a link if it is written in all caps. If you do not define the word in all uppercase, it will be treated normally and any case combination of that word will become a dictionary link.

  • Add the dictionary to at least one post on your blog

    Make a new post. In this post add the following text:

    :LEXICON:

    That is a colon, the word “LEXICON” in all caps, and then another colon. The plugin will replace this word with the contents of your entire dictionary, complete with links and images. You can see mine here.

    Now edit the lexicon.php. If you don’t know PHP this might be a little scary. Be brave. Just a few lines down you’ll see:

    $ad_dictionary_url = "www.example.net/somepage";

    This is where you tell the plugin how to find your dictionary. Inside of the quotes, put the address of the entry you just created. If the permalink to that post is www.myblog.com/wordpress/my-dictionary/ then change the line to say:

    $ad_dictionary_url = "www.myblog.com/wordpress/my-dictionary/";

  • Place lexicon.php and dictionary.txt into your wordpress /plugins directory

  • Enable the plugin in the wordpress control panel

  • All done! Any of the words that appear in your dictionary will become links. You can add or change the contents of the dictionary at any time.

    Using Lexicon

    Dictionary words which appear inside of HTML tags are ignored. Words appearing after a < and before a < are assumed to be an HTML tag and the plugin won’t mess with them.

    If you do NOT want a word to become a dictionary link, preceed the word with a percent symbol. For example:

    Sempai!
    %Sempai!
    

    Would yield:

    Sempai!
    %Sempai!

    Note that you should do this if the word appears within a link! If you don’t, the plugin will still turn the word into a dictionary link, which will break the link you were trying to create and make a mess of the HTML.

     


     

    Anime Lexicon

    By Shamus Posted Wednesday May 24, 2006

    Filed under: Anime 1 comments

    Seems like every otaku does this at some point. There are already plenty of good anime dictionaries out there, but I wanted to make my own. I’m putting it here so I can link back to it as needed. I’ll update the list as I accumulate new words.

    This is also part of a wordpress plugin I’ve been working on, which I’ll talk about more once it’s working.

    :LEXICON:

    EDIT: I disabled this plugin on this site. It is really cool to have, but it needs a little work. I didn’t like the way it would hit EVERY instance of a word within a post, instead of just the first instance. It was also fond of seeing keywords within URLs and thus breaking links. This was a fun plugin to write, but it needs a little more polish before I can trust it to work without making a mess once in a while.

     


     

    Revenge of The Revenge of the Sith

    By Shamus Posted Wednesday May 24, 2006

    Filed under: Movies 5 comments

    If you’ve never seen it before, this spoof script for Episode III is hilarious.

     


     

    Someday’s Dreamers: Ending Thoughts

    By Shamus Posted Tuesday May 23, 2006

    Filed under: Anime 14 comments

    My wife and I finally got an evening together and finished off the last disc of Someday’s Dreamers.

    Someday's Dreamers - Yume

    The story takes the familiar “magical girl” theme and turns it on its head. Yume is a mage. Mages are rare. Unlike every other magical story I’ve ever seen, their powers do not lend themselves to combat. Mages don’t fly around, zapping bad guys with colorful energy blasts. Instead, they perform localized miracles. In the series, we see the girls repairing vandalisim, rejuvenating a worn old house, and (in a moment of foolish teenage passion) bending the Tokyo Tower.

    They don’t fight evil. There is no super-evil in this story. Instead, Mages work for the government. People apply for various miracles (Mage actions) and the Bureau of Mage Labor will dispatch a Mage to show up and attempt to solve the problem. In the series, Yume and her friend Angela are both mages in training, and are working towards their certification exam.

    As part of their training, they learn that there are rules about how they are allowed to use their powers. Mages are not allowed to use their powers to control life. Making someone younger, healing injury, or curing disease are all forbidden. They are also not allowed to do other magic that may cause trouble, such as creating money.

    Magic is hard to understand. In one episode we see Yume try to use her magic and fail. Every other time she tries she succeeds. We never come to understand what makes a particular action easy or hard. I don’t think we’re supposed to.
    Continue reading ⟩⟩ “Someday’s Dreamers: Ending Thoughts”

     


     

    Because food is good for you

    By Shamus Posted Tuesday May 23, 2006

    Filed under: Random 4 comments

    Not exactly geek culture, but my wife sent this out to a number of friends:

    Thank you to all who sent us post cards for our home school study of the states this year. We ended up with postcards for roughly half the states, which was very exciting to see. (When I get a chance I will send an email out listing those states we did not get, just in case anyone has a spare lying around.)

    We have developed the study further and are now looking for state specific recipes to try. If you have a recipe from a specific state or know someone who does we would love to have it and if we can we will give it a try. Furthermore, any information about why that recipe is specific to that state would be a plus.

    Example: A zucchini bread recipe and why zucchini bread is very popular in western PA. (zucchini grows too well in western PA which means that it finds its way into nearly every fall meal, what with everyone and their neighbor trying to give one free zucchini…in fact I still have some in my freezer. :))

    Please send all recipes to: [email protected]

    (Yes, there are lots of recipe books out there with state specific recipes, we have one sitting right here. However, we think it would be fun to see what other people come up with. )

    Please feel free to pass this on to whomever you think might be willing to help us out.

    Thank you for your time.

    God bless,

    Heather Young

    Now, I know most of my readers have recipes like, “Call Dominos” or “Open Bag of Chips”. That’s pretty much the extent of my culinary skills. But some of you have wives or girlfriends (or perhaps even mothers?) who may know about this sort of business.