swemoney.com

  • Random
  • Archive
  • RSS

A couple fixes.. Some news..

I finally went ahead and whipped up a quick hack for mephisto to allow me to keep my twitter status and last.fm status updated without killing mephisto’s great caching features. Previously, I was using Dan Webb’s lastfm plugin for mephisto, and my recent modification to the same plugin to make it fetch twitter information instead of lastfm information. This works, to a degree, but the problem comes from the fact that this plugin uses a liquid tag that embeds the xml information on the page. What this means, is that mephisto will cache the page with the current status or lastfm list and recent updates won’t appear until the cache gets flushed. I know there’s a ‘setting’ in dan webb’s plugin that allows you to change the time in which mephisto will auto flush the cache and try to update the page, but it never worked for me.

What I did was create an Ajax request at the bottom of the page that updates the twitter and lastfm information on the fly. This means that the page that mephisto caches will always stay the same. The updates to twitter and lastfm will happen behind the scenes and update the page w/ javascript. Sucks for those of you who don’t have javascript enabled, but works for me. x=)

I want to whip up a versatile plugin for mephisto with this functionality, but that might take a little bit of time for me to pull off correctly and all. I just started a new job serving at a comedy club in the area, so that’s going to take some of my time in the near future, but I promise that as soon as I get some time and figure out how I want to do it, I’ll get this out in a plugin form. It won’t be a plugin just for twitter and mephisto. I want to make it so you can parse any xml file and update any element on your page with that information on the fly so you can keep dynamic content on your site without killing the caches. Stay tuned for more info on this.

    • #ruby on rails
    • #twitter
    • #mephisto
    • #life
    • #last.fm
    • #My Stuff
  • 5 years ago
  • Comments
  • Permalink
  • Share
    Tweet

Recent comments

Blog comments powered by Disqus
← Previous • Next →
iOS application development, video games, random thoughts, apple. These are a few of the wonderful things you'll catch on my blog.

Pages

  • Projects
  • Apps
  • Secret Browser

Elsewhere

  • @swemoney on Twitter
  • Facebook Profile
  • tehdnite on Youtube
  • dnite on Digg
  • swemoney on Rdio
  • swemoney on github

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr