Page 2 of 3

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 4:15 pm
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.

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 5:54 pm
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

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 6:01 pm
by Timbalu
Hi
In this case, maybe some of these might be helpful
http://perishablepress.com/press/2010/1 ... a-queries/

Ian

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 10:50 pm
by Don Chambers
Screenshot of his site from iPhone 4:

Image

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 10:59 pm
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

Re: How to present the blog mobile?

Posted: Wed Dec 01, 2010 11:00 pm
by yellowled
Don Chambers wrote:Screenshot of his site from iPhone 4:
Well, at least it doesn't look shabby. Hm.

YL

Re: How to present the blog mobile?

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

Re: How to present the blog mobile?

Posted: Fri Dec 03, 2010 11:20 pm
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

Re: How to present the blog mobile?

Posted: Fri Dec 03, 2010 11:43 pm
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!!!

Re: How to present the blog mobile?

Posted: Sun Dec 05, 2010 3:46 am
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!

Re: How to present the blog mobile?

Posted: Sun Dec 05, 2010 12:23 pm
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

Re: How to present the blog mobile?

Posted: Sun Dec 05, 2010 12:51 pm
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)

Re: How to present the blog mobile?

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

Re: How to present the blog mobile?

Posted: Sat Dec 18, 2010 10:40 am
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.

Re: How to present the blog mobile?

Posted: Sat Dec 18, 2010 11:44 pm
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