Seinime asked about how to integrate the Melative microblog with Wordpress. There was a proper hook for this sort of thing, so I started a plugin which outputs Melative updates based on a given HTML comment (<!– URL –>). I’ve made some pages on this blog for Recently Watch and Recently Read titles. First, the plugin.
The plugin currently supports two URL types using the format <!– http://melative.com/username/category/title –> or <!– http://melative.com/username/item# –> Note: The examples below are fully dynamic (the content is not in the database, rendered on display).
Single Update
<!– http://melative.com/RyanA/13233 –>
So. @Seinime, check this output http://is.gd/3WS4P ... basic plugin output, just req adding into an entry ^^ Works for a single item, media category, or media-title ^^
Multiple Updates
<!– http://melative.com/RyanA/anime/Hayate+no+Gotoku!! –>
completed Hayate no Gotoku!!
Great lovecom in a number of episodes, damn. Over until more seasons are revealed. Good news is that I still have 20+ episodes of S1, but S2 is more focused than S1. D:
watched Hayate no Gotoku!! (episode 25)
The epic adventures, a day in the life of Hayate. PACKYVENTURES. The comedy of misfortune. Last episode of S2 D:
watching Hayate no Gotoku!! (episode 25)
Hina in Wonderland. lolstyle~ and Candy Charas... USAGEE word.
watched Hayate no Gotoku!! (episode 24)
Sakuya and Hina totally stole this one; both #amazing. Past two episodes have been really nice high points, feeling the quality lovecom, and it's so distinct from S1-type episodes.
watched Hayate no Gotoku!! (episode 23)
Splendid combination of LOL and DOKI. Blend was just #awesome, Sakuya mo!
watching Hayate no Gotoku!! (episode 23)
That OP is so fab. KOTOKO FTW.
watched Hayate no Gotoku!! (episode 22)
Seriously #hilarious, servicey, and even manages to accentuate 1<3Triangle, but Maria, oh Maria. Nice covering of bases to amp the laughs and enjoyment. More of this or haremette focus please.
watched Hayate no Gotoku!! (episode 21)
Tama! Pretty funny, though episodic. The main problem when this series goes episodic is that the underlying threads usually go untouched. Maybe that's a benefit, who knows?
watching Hayate no Gotoku!! (episode 21)
Nagi's definition of ninja is super-ultra-gorgeous GOKAI! FFFF. The reaction is floorworthy. XD
watched Hayate no Gotoku!! (episode 20)
Maids. Poor Maria. The ultimate joke was alright; expected. Perhaps it's just me, but the content is getting a little less juice, and coming off more like S1.
watching Hayate no Gotoku!! (episode 20)
Maria. Maria. Oh Maria. :| Oh. Fresh.
watching Hayate no Gotoku!! (episode 20)
Maids. SRSLY. Gotta hand it to Maria for representing so well.
watched Hayate no Gotoku!! (episode 19)
Much in the fashion of S1 (kinda random, broken ep). Maria was fab with her humming, and Sakuya is so troublesome XD rawr
watching Hayate no Gotoku!! (episode 19)
rofl, why is this so random... Sunday Box. Open ze Box. hahaha
watched Hayate no Gotoku!! (episode 18)
Well played Hinagiku; the art of hiding joy. Hayate's curse continues haha.
watching Hayate no Gotoku!! (episode 18)
Seems they put some effort into the new OP. KOTOKO, Fun.
watched Hayate no Gotoku!! (episode 17)
Pretty fab episode, but a tad choppy, and mystical. Early onsen bit was filled with plenty of kyaaness.
rated Hayate no Gotoku!! 11
OMG... yea. Melative Ratings. You can make your own standards.
rated Hayate no Gotoku!! 8
Goes but where's the library change.
watched Hayate no Gotoku!! (episode 16)
Gah, more to come. Very enjoyable episode, mixed with nice level of sentiment; Mothers :) Focus sort of shifted off the harem, but the players are there.
Notice that the title may be left out and then it would retrieve updates only in the ‘anime’ category.
Theming
I don’t recommend leaving the HTML naked, so here is the basic structure of an ‘event’ item.
<div class=”m-ev”>
containing div
<div class=”E”>
Event item
<div class=”L”><img /></div>
Left, contains a title’s img when present
<div class=”C”>
Content
<p class=”A” />
Action - usually the title ‘watching XXX (episode Y)’
<p class=”M” />
Message
</div> // end C
<div class=”meta”><a /><a /></div>
contains a tags
</div> // end E
</div> // end m-ev
It’s quite easy to style the items by using .m-ev .E CSS selectors. One special type of ‘E’ class has the class ‘thread’ which means the item above it is contains the same context (title). These items will not have an image output for the title. The content is generated via XSL transform after obtaining the API XML, so it is configurable if need be.
Issues/Future Updates
- Selecting a certain number of updates. 20 updates is default.
- Calls are cached by URL, and expire after 5 minutes; s/b configurable.
- Relative links are wrong in the A div
- Default CSS could be inserted into the header
With the current implementation, it will be easy to make other calls the the API, and one such call I want to do is that of a user’s Library. The library list holds a good deal of information including ratings and tags. Optimally, bloggers should be able to show their ‘lists’ to visitors on-site, and not require them to go to some other service. Plus there is full theme/styling control. It’s a win situation ^^
If anyone wishes to contribute, I’ll go ahead and make a Wordpress plugin page. Most likely it will be placed along side the melative-link plugin mellow_bunny has tweaked.



