Between the full desktop version, the subscriber’s ad-free version, the normal mobile version (via autodetection), the very lite mobile version and the WAP version of OSNews, here is one more: http://osnews.com/pda . This version is built around our RSS feed and it’s geared towards cellphones (like the Motorola RaZR line) that can’t quite manage to render our normal mobile front page (28 KB overall) while the very lite or WAP versions don’t have enough information in them so they leave our readers with a bitter taste. Hence, we implemented this RSS-based middle-ground mobile version, like we also did for other popular sites yesterday (screenshots). The PHP source code that generates this mobile-friendly layout is freely available and ready to be deployed, courtecy of MoBits.com.
Yet Another Way to Browse OSNews
About The Author
Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker.
Follow me on Twitter @EugeniaLoli
2006-08-12 7:50 amEugenia Loli
Well, this new version is based on a static RSS file, so no equivelant comments page can be created. However, when you are actually visiting the site with a PDA or cellphone or other gadget, you are going to get the normal mobile version automatically, including the mobile version of the comments. So there is always a way to get a mobile version of the comments, even if this new RSS version doesn’t link to one specifically.
2006-08-12 10:00 amDolphin
Why use $handle = fopen(“$url”, “rb”); instead of $handle = fopen($url, “rb”);
The $url doesn’t need “”.
2006-08-12 9:59 amDolphin
Does it matter? It works…. PHP understands that $something is a variable almost anywhere you put it.
2006-08-12 10:05 amgothic
I know PHP and ofcourse that =) She knows what indentation is (http://en.wikipedia.org/wiki/Indent_style)? checking source, I don’t think so.
2006-08-12 5:18 pmEugenia Loli
I never use indentation, neither I comment my code. It’s just my style, although I recognize how usable they can make code. I never meant to release that code anyway. It just occured to me last night that some people might find it useful.
2006-08-12 7:30 pmbutters
Right on. Intentation and comments do not good code make. They are especially useful for open source, but this code is simple enough that anyone should understand it, especially if they have a good editor with syntax highlighting.
You should probably license this somehow, especially as you seem to want to preserve the MoBits attribution. The code comment saying you shouldn’t change the MoBits URL won’t hold up in court… MIT, BSD, or Apache (v1.1) licenses would be appropriate, in order of increasing attribution protection. If for no other reason, you probably want the “AS IS” disclaimer to protect you from frivolous lawsuits, should this code become widely used.
I have one, so I should know.
I have no mobile bits but cool – A big THX from the OSn & Digg communities I guess –
I can’t read on a screen that small: http://eugenia.blogsome.com/2006/08/11/tuxtops-mobile/
Text is too small, almost unreadable. I prefer to wait to be at home with my comfortable large screen.
Nothing against people who use PDAs though.
I’m not a “subscriber”, but I still get an ad-free version.
2006-08-12 5:44 pmEugenia Loli
You mean, you get this? http://www.osnews.com/demo.html
This version is not only truly ad-free, but it loads much faster because there are no nested tables in it.
2006-08-12 11:08 pmJoe User
OMG if you have a look at the source code of this page, it’s a real soup. It embedds all redundant CSS code inside the page and uses tables. You should optimize your CSS code a lot more than that, and put it on a separate style sheet. You shouldn’t use any table at all also. There is a whole bunch of unneeded code. You would save on bandwidth.
2006-08-12 11:30 pmEugenia Loli
Haha, you are funny. You think that things are the way they are because we are lazy, or because we strive to be COMPATIBLE? Make a guess.
2006-08-13 3:17 pmJoe User
It’s not necessarily because you are lazy. But I swear that you can make code that is compatible with any browser on any platform, including PDAs, using pure XHTML, CSS and tableless coding.
2006-08-13 6:24 pmEugenia Loli
Joe User, you are VERY, VERY wrong! I am doing mobile developement for 3 years now and I have access to most of these browsers. I know them in and out. XHTML/CSS does NOT work on the VAST majority of these mobile browsers. They CLAIM that they do support XHTML, but especially their CSS support is a pipe dream.
2006-08-13 11:28 pmJoe User
To tell you the truth, I know this works on the HP PDA that I have, and also on major browsers (IE 5.5, IE6, Opera, Opera Mini, Firefox, Konqueror). These are the ones I test. I am able to use just one style sheet. Now, maybe there are certain PDAs that don’t respect web standards, I don’t know all of them. Sorry then. But still, the style sheet may probably be included in an external file, this should work on all PDAs I guess.
2006-08-14 12:20 amEugenia Loli
There is no reason for yet another HTTP request to make things slower (especially on GPRS). The CSS I am using for mobile versions is only a few lines, usually 10 or 12 lines. It is more compatible and faster to have these few lines inline.
Also, you are only tested your mobile stylesheet with only two browsers from what I see. I usually test with 10 on about 15 devices and emulators. And from these 10, only 3-4 of them support CSS at all (IE, Netfront, Opera and Openwave), while only 1 of these 4 has actual *good* support for CSS (Opera).
Nice work OS News. It already looked great on my PDA but now it’s even more readable.
…and also I see the Digg project on Eugenia’s blog too. Excellent
I like it
But the comments…. they still appear old-school
Maybe a PDA version of those too? After all, the news we can find anywhere, but the awesome community is what makes OSNews what it is =D