You are hereBlogs / Dark Siren Sally's blog / Rar, fail!coding.

Rar, fail!coding.


By Dark Siren Sally - Posted on 04 October 2008 in Links, Online Games, Programming, Roleplaying, Website

So I've continued working on my bbpress stuff.

Found out about WURFL and specifically Tera-WURFL which is basically a centralized database of all mobile phones and browsers. I'm using it to determine whether the browser viewing my bbpress forum is on a mobile phone or not. It works like a charm, so I'm happy about that!

I also found a mobile friendly layout... I'll link it later, it's the "1col_fixed" layout out of a series of basic themes made to be bases for bbpress themes.

However, it's taken more work to actually figure out the second step, which is to actually switch to a mobile friendly theme when a mobile phone is detected. Figuring that out has led me to the world of writing Wordpress-style plugins. I've been using this bbpress reference to help me figure out where to put my plugin hooks and actions and such. I even had to remind myself how to set cookies in PHP.

But I'm still very newb at plugin writing, and I've hit a snag because of a little niggling detail. Right now, my plugin stores the name of a mobile-friendly theme in a cookie, which is accessed only when a mobile phone is detected. However, in the case when the cookie has yet to be generated, the page just shows no theme at all until it's reloaded. And I'm trying to figure out how to trigger my plugin code earlier so it'll load the right theme right away.

I might have to just code in an auto-refresh... or I might try to dissect another bbpress plugin I have (the theme selector I think I mentioned earlier.) I dunno.

It's really nagging at me to finish, though *sigh* it's what I spent my entire day on, except for a brief stint of PSU (which was still fun... Jon, Clark, Jon and I ended up getting to Phantom Fissure, which is one of the special free missions on Neudaiz. We got some *great* drops.) Oh and a little bit of RPoL posting, too... ugh, I still need to finish my D&D 4e character!! It's half done, but I've just been so focused on the coding.

Meh. I hate how programming for little projects like these makes me feel like I'm wasting all of my time. Even though, conceivably, it isn't really a waste 'cause I'm learning about things like making sites mobile friendly and coding with plugin APIs. All I can think of is how it's always the little things that I have to agonize over the most, and it frustrates me to no end. =_=

I do really like the mobile stuff though. Maybe I will make more mobile friendly sites or even convert darksiren.net to be mobile friendly, later. We'll see!



Announcements

Current Status

Feeling: Fatigued :O
Playing: Etrian Odyssey 2, mostly.
Roleplaying: RPoL, soon more Wardragon and Dark Heresy :D
Working: Tweaking Tower forum, pondering my next project (either Bellabird or Caduceus revamp)
Writing: Tower RP info. New posts for Outcastes 'n Five Coils.

Recent comments