How to present the blog mobile?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: How to present the blog mobile?

Post by blog.brockha.us »

Have a look at the IPhone output.. It doesn't make much sense to display more than titles with this template.
If you want to have more, the IPhone template has to be changed, too.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled »

blog.brockha.us wrote:Have a look at the IPhone output.. It doesn't make much sense to display more than titles with this template. If you want to have more, the IPhone template has to be changed, too.
I just did check out your blog (using an emulator) -- and while you might be right for the iPhone 3, this is way different on an iPad, and probably on the iPhone 4 with it's high resolution display as well. :) On the iPad (the emulator I'm using offers both iPhone and iPad) it looks incredibly stupid now, because the iPad (resolution: 768x1024px) gets the same layout as the iPhone (3, resolution: 320x480px). Maybe Don can take a screenshot of it on his iPhone 4? I'd be really interested in how it is there.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: How to present the blog mobile?

Post by Timbalu »

Hi
In this case, maybe some of these might be helpful
http://perishablepress.com/press/2010/1 ... a-queries/

Ian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers »

Screenshot of his site from iPhone 4:

Image
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled »

Timbalu wrote:In this case, maybe some of these might be helpful http://perishablepress.com/press/2010/1 ... a-queries/
It is really more of a question of how to get this into the existing plugin, but basically, yes, that's what we're aiming at. In my humble opinion, there are better sources for this topic, but media queries are most definitely the way to got, especially since very few browsers actually use older mobile techniques like media="handheld".

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled »

Don Chambers wrote:Screenshot of his site from iPhone 4:
Well, at least it doesn't look shabby. Hm.

YL
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: How to present the blog mobile?

Post by blog.brockha.us »

Okay, I think I'm done with the mobile output plugin.

I added some meta infos to the templates, now I'm able to detect, if it is an old Pelle template (that merged body and extended) or a new one. It is done with an extension to the templates info.txt file.

I also added an auto template installer. No more hassle about downloading and installing mobile templates. I added them to the plugin and the plugin will copy them into the template folder, if not already found there.

I have added the plugin for testing. I will put it to spartacus soon, if nobody finds problems with it and nobody wants to contribute some template beatifying :D
Attachments
serendipity_event_mobile_output.zip
Plugin mobile output V.1.01
(352.13 KiB) Downloaded 244 times
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled »

blog.brockha.us wrote:I will put it to spartacus soon, if nobody finds problems with it and nobody wants to contribute some template beatifying :D
Hohum, I wonder who that could be. :wink: Don't hold back putting it into spartacus on my account -- we/I can always add or fix templates later. I probably won't find the time to even check this out before my xmas break.

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers »

I downloaded it, and will get it installed somewhere for testing in the next day or so. Great job Grischa! Nice to have you back!!!
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers »

Plugin now installed at my blog. My only mobile option is to view it with an iPhone 4.

I started with the default options, but I did say "yes" to "show images". All other options set to their default values. Here are some quick observations:
  • Images within my entries do not show.
  • No comment form - is that intentional?
  • Want option to display/hide serendipity logo. Or perhaps replace with an alternate.
  • here is an entry on my blog that includes blocks of text wrapped in <pre> tags. That text runs beyond the page (ie, well past the right margin). This could just be a smarty or stylesheet issue, I did not have time to check.
  • If I use the "next page" link, my iPhone's Safari will not return to the previous page if I use Safari's "back" link. Probably because of this:

    Code: Select all

    <a id="backButton" class="button" href="#">{$CONST.BACK}</a>
That is all the time I have for now, but it is a start! Great work so far guys! Thanks for your contributions to this plugin!
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled »

Don Chambers wrote:Plugin now installed at my blog. My only mobile option is to view it with an iPhone 4.
Does not display a mobile layout in an Opera Mobile on a Symbian phone, BTW. iPhone3 (emulator) looks fine despite the issues you mentioned already. iPad (emulator) looks ridiculous since mobile layout is used.

YL
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: How to present the blog mobile?

Post by blog.brockha.us »

Well okay, I released this version into spartacus. As Don said: I think it is a good starting point.

Don: I guess the problem with the images not showing up is related to the scaling / wurfl stuff. This is code done by Pelle. I don't use this, as it is not working on my server. It needs extra libraries and I guess I don't have them there.

What's still missing: A button for letting the visitor choose to switch back to the normal blog template. This would solve the problem for IPad users i.e.

IPhone template and comments: Yes, Pelle didn't add commenting options to his templates. But I added this to the my new Android template (and was to lazy to add this to the other templates, too)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Re: How to present the blog mobile?

Post by mattsches »

Grischa, after I read that you added Android support to the plugin, I gave it another try. Had to fix some issues with file permissions, but those were the result of manually tinkering with it, I guess.

But I might have encountered the same problem as Don: My images weren't showing :?

So I fired up my Netbeans and XDebug ... Thing is, I tend to save my images in subdirectories of /upload, e.g. http://www.numblog.de/uploads/People/caribou_live.jpg

In the plugin, there is two places where basename() is used, which results in cutting off the name of the subdir. My quick solution might not be perfect, but it works for me :wink:

In mobile.class.php

Code: Select all

197c197
<     		  $imgUrl = $imageScriptURL.'?i='.base64_encode(basename($imgFile)).'&s='.base64_encode($size[0].'|'.$size[1].'|'.$width.'|'.$height.'|'.$size['mime']);
---
>     		  $imgUrl = $imageScriptURL.'?i='.base64_encode(substr($imgFile, strlen($serendipity['serendipityPath'] . $serendipity['uploadPath']))).'&s='.base64_encode($size[0].'|'.$size[1].'|'.$width.'|'.$height.'|'.$size['mime']);
In i.php

Code: Select all

6c6
< $img = basename(base64_decode($_GET['i']));
---
> $img = base64_decode($_GET['i']);
In both cases I got rid of the basename() function call. Maybe this helps to solve Don's issue, too.

Best regards,
- Matthias
Bla
Regular
Posts: 25
Joined: Sat Feb 03, 2007 7:42 pm
Location: Germany
Contact:

Re: How to present the blog mobile?

Post by Bla »

I did a clean install (erased the plugin folder and mobile templates), but the mobile css files are not used by mobile clients (the other files are used, e.g. the s9y-logo in iphone.app). Used as a main template, the three mobile templates work, but just for normal clients too. In no case the mobile css files are shown up in conjunction with this plugin. On my installation.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to present the blog mobile?

Post by garvinhicking »

Hi Bla!

So which version of the plugin are you using? What are your plugin settings exactly? What's your URL?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply