Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Journal sootman's Journal: Slashdot for iPhone - as it should be 5

Reading Slashdot on the iPhone is not as good as it could be. The iPhone's workaround for non-mobile-opimized pages--the pan and zoom system--is fine for sites I only look at occasionally, but for something I look at as often as Slashdot, I'd like something a little better. So, I whipped up my own system. This doesn't replace the entire site, it's just for the front page. (Update: it now also works (kind of) for story pages.) It pulls the non-logged-in front page so it might not be the same as what you'd see if you were logged in.

I started with trying to style the RSS feed, but the feed (in my limited experience) seems to be often out of sync with the actual front page. So, I fell back onto Plan B: the brute-force method of downloading the actual front page and styling it for iPhone. I've got a PHP script that pulls down the page with cURL, then I use two methods to hack away everything I don't want: PHP's str_replace and 'display: none' in the style sheet. Then I add styling to the elements I want to keep. I also added some icons to jump up and down from one story to the next, to the top of the page, and a 'search' button since Mobile Safari doesn't have find-in-page. This is ugly and hackish and I don't know if it's really valid HTML (probably not) but for the most part it does what I want it to do so I'm happy with it. I'm happy to hear any suggestions for improvement.

Three common issues: 1) sometiems it'll show the headline but not the story, 2) sometimes it'll show an extra blank line between the headline and the story, and 3) sometimes you'll get weird stuff at the top, like --> or </script>'); dfp_tile++; //]]> -->. These come and go. No big deal. This isn't perfect but it's enough to give me a 'fix' when I'm standing in line somewhere. :-)

The source is out there so hack on it all you want. Go ahead and my page to your bookmarks or copy it to your own server and change it all you want--hide bylines, tags, comments, add other stuff back in, whatever you want.

More info:
PHP source:
Style sheet:

This discussion has been archived. No new comments can be posted.

Slashdot for iPhone - as it should be

Comments Filter:
  • Don't think I'll be using it though as I spend more time elsewhere on Slashdot than the front page. Have you tried contacting the devs to see if they've actually done any work towards optimizing the 'dot for mobile devices?
    • by sootman ( 158191 )

      Glad you like it. I haven't tried contacting the devs yet. I could. I might. I probably won't. The code changes rarely. On the front page of [], the most recent story is from June 2008. Scroll down to the bottom of the page (5 stories!) and you're in October 2006. The words "suggest" and "feature" don't appear on the page. The word "request" appears 3 times in one paragraph and it refers to server requests. The FAQ page about suggestions [] dates back to 2000-2003. Long story short, Slas

    • by sootman ( 158191 )

      Check it out: I've now got it so links from the main page get processed and shrunk as well. Not perfect--and I'd *love* for the dev's to offer an official solution--but it's good for a 'fix' while standing in line somewhere. :-) []

    • by sootman ( 158191 )

      No offense, but you've either not looked at the two sites on an iPhone, or you've got really low standards, if you think this [] is as good as this. []

Loose bits sink chips.