I’ve done it! I’ve gotten the fortune plugin to behave exactly the way I wanted it to. Obviously there’s a ways to go on it – the randomization is not so random, it’s not as pretty as it could be (and I don’t know how it’d even look on another blog), there’s no custom fortunes file, there’s no toggle for offensive-fortunes, &c, but the structure is there. As timmmmyboy pointed out, this is close enough to full-baked for Google. Over the next Little While I’ll be rolling out the above-named improvements and adding features – and I hope you’ll tell me what you want in a plugin like this. Here’s what we have so far on the to-do list:
Here’s what this plugin needs to do:
Read from a fortunes file or files in the plugin directoryParse them into an array of stringsRandomly select one from the arrayDisplay it after the header displays- Have an options menu that allows the user to toggle offensive fortunes
- Also in the options menu, a list of the fortune files by subject (UNIX, Star Trek, &c are the traditional ones, but they can be updated for more modern sensibilities).
- Allow the user to add fortunes to their own custom file. Display the contents of the file on that options page.
What else, people?
Add a comment