How to present the blog mobile?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
User avatar
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 » Wed Dec 01, 2010 4:15 pm

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/

User avatar
yellowled
Regular
Posts: 7110
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled » Wed Dec 01, 2010 5:54 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

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

Re: How to present the blog mobile?

Post by Timbalu » Wed Dec 01, 2010 6:01 pm

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

Ian

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers » Wed Dec 01, 2010 10:50 pm

Screenshot of his site from iPhone 4:

Image

User avatar
yellowled
Regular
Posts: 7110
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled » Wed Dec 01, 2010 10:59 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
yellowled
Regular
Posts: 7110
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled » Wed Dec 01, 2010 11:00 pm

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

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
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 » Fri Dec 03, 2010 8:28 pm

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 127 times
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
yellowled
Regular
Posts: 7110
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled » Fri Dec 03, 2010 11:20 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers » Fri Dec 03, 2010 11:43 pm

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!!!

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to present the blog mobile?

Post by Don Chambers » Sun Dec 05, 2010 3:46 am

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!

User avatar
yellowled
Regular
Posts: 7110
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to present the blog mobile?

Post by yellowled » Sun Dec 05, 2010 12:23 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
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 » Sun Dec 05, 2010 12:51 pm

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/

User avatar
RobA
Regular
Posts: 317
Joined: Wed Apr 27, 2005 5:11 pm
Contact:

Re: How to present the blog mobile?

Post by RobA » Tue Dec 14, 2010 12:39 am

Here is another (non s9y) example of a well done mobile varient for consideration:

http://imjustcreative.com/

Check it out on a mobile device!

-Rob A>
* My s9y blog:
* Rob A's (Im)Personal Blog
* http://www.silent9.com/blog

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 » Wed Dec 15, 2010 6:19 pm

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: 23
Joined: Sat Feb 03, 2007 7:42 pm
Location: Germany
Contact:

Re: How to present the blog mobile?

Post by Bla » Sat Dec 18, 2010 10:40 am

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.

Post Reply