phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

PHPBB2 Mobile Optimized

Goto page Previous  1, 2
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
JLA
Board Member



Joined: 30 Apr 2009

Posts: 298
Location: U.S.A


flag
PostPosted: Sat Dec 06, 2014 5:20 pm 
Post subject: Re: PHPBB2 Mobile Optimized

dogs and things wrote:
I'm sorry, but fixed widths and imposing templates by browser detection is not considered the way to go in modern website design.

You can do a lot for users on mobile devices by simply removing images and replacing them with css. Every single image used for your board's layout means a handshake and bandwidth.


One other thing - read another post you wrote about making a jquery version of some of your pages. Do you have a link or demo of this. Would love to see what you were able to do.

Regards,

_________________
http://www.jlaforums.com
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Sat Dec 06, 2014 7:04 pm 
Post subject: Re: PHPBB2 Mobile Optimized

I never mentioned a jquery version. icon_wink.gif

If you want to see what I achieved just visit my forum and view it in a narrow viewport. You'll see how a button appears in the header readig "Ir a versión móvil" (Go to mobile version in spanish). Click that button and you see the mobile template I put together. The mobile template is a stripped down standard template, only the essential has been left in place.

For instance, this is all the code my viewtopic_body.tpl contains:
Code:
<script type="text/javascript">window.onload = resizeimg;function resizeimg(){if (document.getElementsByTagName){for (i=0; i<document.getElementsByTagName('img').length; i++){im = document.getElementsByTagName('img')[i];if (im.width > 450){im.style.width = '450px';}}}}</script>
<p class="nav-links"><a href="{U_INDEX}">{L_INDEX}</a><span class="normal"> > > </span><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></p>
<h1>{TOPIC_TITLE}</h1>
<p class="pagination post-buttons">{PAGINATION}</p>
<p class="post-reply post-buttons"><a href="{U_POST_REPLY_TOPIC}">{L_POST_REPLY_TOPIC}</a></p>
<!-- BEGIN postrow -->
<p class="author" style="padding-top:.5em;border-top:2px dotted #999;">{L_AUTHOR}: <a href="{postrow.U_VIEW_PROFILE}">{postrow.POSTER_NAME}</a><br /><span class="date">{postrow.POST_DATE}</span></p>
<div class="message">{postrow.MESSAGE}{postrow.MOVIL_ADSENSE}</div>
<p class="post-buttons"><span class="edit-message">{postrow.MOVIL_EDIT}</span> <span class="quote-message">{postrow.MOVIL_QUOTE}</span> <span class="pm">{postrow.MOVIL_PM}</span> <span class="keep-unread">{postrow.KEEP_UNREAD_MOVIL}</span></p>
<p class="top-links post-buttons"><a href="#top" class="top-back">{L_BACK_TO_TOP}</a> <a href="#menu" class="bottom-back">{L_MOVIL_MENU}</a></p>
<!-- END postrow -->
<p class="post-reply post-buttons" style="padding-top:1em;border-top:2px dotted #999;"><a href="{U_POST_REPLY_TOPIC}">{L_POST_REPLY_TOPIC}</a></p>
<p class="pagination post-buttons">{PAGINATION}</p>
<p class="post-buttons mod-buttons">{S_MOVIL_TOPIC_ADMIN}</p>


The idea behind this is that the mobile version should be used when bandwith usage should be minimal, when bandwidth is not a problem the standard is fine.

On my standard template and on the mobile version you can see my css buttons. I made them replacing the image tags in the respective php files with text, and giving classes to the remaining links. Like this:
Code:
   $quote_img = '<a class="post-icons-big" style="color:#006665;text-decoration:none;font-size:70%;" href="' . $temp_url . ' "title="' . $lang['Reply_with_quote'] . '">Citar</a>';
   $movil_quote_img = '&#160;<a href="' . $temp_url . '">'.$lang['Reply_with_quote_movil'].'</a>';
   $quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';


I never fully developed this work, I built a working version that needs a finishing touch and never wrote down any instructions.

_________________
phpBB2 will never die, I hope!
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 298
Location: U.S.A


flag
PostPosted: Sat Dec 06, 2014 8:08 pm 
Post subject: Re: PHPBB2 Mobile Optimized

dogs and things wrote:
I never mentioned a jquery version. icon_wink.gif


This is what I saw here:
http://www.phpbb2refugees.com/viewtopic.php?p=6584#6584



Quote:

HI,

I found a style named subSilver_mobile and used this as a base for creating a mobile template for my forum.

Instead of using the changes to includes/functions.php that come with the template I use Tera_WURFL for detecting users on mobile devices and serve them the mobile template.

Recently I made a mobile version for the rest of my site using jQuery Mobile.

I'm pretty pleased with the results of both parts.

Just in case anybody is interested here is a copy of subSilver_mobile.

_________________
http://www.jlaforums.com
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Sat Dec 06, 2014 9:51 pm 
Post subject: Re: PHPBB2 Mobile Optimized

I see,

The first thing I used when I adapted my site for mobile devices was jQuery Mobile. But this was used for the rest of my site, not my forum. And I moved away from it, it now seems contrary to what I believe a mobile optimized site should use.

I also stopped using TeraWurfl for device detection, as I decided to stop imposing templates. I now simply use media queries to adapt the site to user viewport width.

_________________
phpBB2 will never die, I hope!
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 298
Location: U.S.A


flag
PostPosted: Thu Dec 11, 2014 3:37 pm 
Post subject: Re: PHPBB2 Mobile Optimized

Thanks for the additional feedback and clarification icon_biggrin.gif
_________________
http://www.jlaforums.com
Back to top
Lynx
Board Member



Joined: 23 Feb 2015

Posts: 7


flag
PostPosted: Mon Feb 23, 2015 5:09 pm 
Post subject: Re: PHPBB2 Mobile Optimized

dogs and things, you've done a super job making your site more responsive! I think on another thread, you said you had not written anything down. Should you have any time, if you could provide any examples of how you were able to even just get the thread views page to be more responsive would be great! Mine is a pet website also (not dogs). I would love to give it more life.

p.s. I only own xp computers
May consider a windows 10 when they come out but don't want to rush into anything ;-)
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 298
Location: U.S.A


flag
PostPosted: Fri Apr 24, 2015 12:04 am 
Post subject: Re: PHPBB2 Mobile Optimized

So we've progressed some on this due to Google Mobilegeddon. On all of the main pages - there are three site versions - 960 - 640 and 320. Most phones should received the 320 by default and the 320 pages are now showing "Mobile Friendly" per the Google tester.

JLA wrote:
Ok - so spent some time and decided to have a couple different versions of the template depending on the device.

Our standard size that we've always ran is fixed 960.

We'll probably create a 640 and 320.

So far for testing, have the 640 running on the topic pages and using crude detection for iPhone devices. Works so will go ahead and create the rest of the base pages for the 640 and 320 layouts.

The question is this - looking for a good detection script (maybe using this class?? https://github.com/serbanghita/Mobile-Detect

That in sessions.php (adding a column called session_size) upon new session creation will determine if the user is a classic (session_size =0) medium mobile (session_size =1) or small mobile (session_size =2) and set a $user_data ($user_data['$site_size)) that can be queried on any page (viewtopic, viewforum, etc) to determine which template the user is served (classic, medium or small)

So if doing this via sessions.php the detection should only need to be called once per session right? Adding to this, if the user clicks on a "view desktop site" link in the footer - then the session_size for that session will change to 0 and that user will be served the classic version until either the session ends or they click on view medium mobile/small mobile links that would be in the footer.

Thoughts?

_________________
http://www.jlaforums.com
Back to top
CarpCharacin
Board Member



Joined: 05 Sep 2016

Posts: 8


flag
PostPosted: Fri Oct 07, 2016 11:38 am 
Post subject: Re: PHPBB2 Mobile Optimized

JLA wrote:
dogs and things wrote:
I'm sorry, but fixed widths and imposing templates by browser detection is not considered the way to go in modern website design.

You can do a lot for users on mobile devices by simply removing images and replacing them with css. Every single image used for your board's layout means a handshake and bandwidth.


I completely agree with you - but the "current" design (based off of 10+ year old phpbb2 subSilver) is far from what would be considered "current" or "modern" This is really just something to "quickly" deal with what currently exists until a roll out of a top to bottom site redesign.

You could upgrade to phpbb3. Does your site really have 300 million posts?
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 298
Location: U.S.A


flag
PostPosted: Fri Oct 07, 2016 1:55 pm 
Post subject: Re: PHPBB2 Mobile Optimized

No, at this point we would not want to "upgrade" to phpbb3. We are now around ~348.9 million.
_________________
http://www.jlaforums.com
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 541
Location: North West UK


flag
PostPosted: Fri Oct 07, 2016 2:21 pm 
Post subject: Re: PHPBB2 Mobile Optimized

CarpCharacin wrote:
You could upgrade to phpbb3.


A lot of us have devoted years of work to our boards and still Ver.2 is doing everything we need of it. Converting would mean losing such a lot of content. In my own case my database has near 100 tables in it compared to the standard install of around 30

Jim

_________________
The truth is out there.
Unfortunately they will not let you anywhere near it!
Back to top
CarpCharacin
Board Member



Joined: 05 Sep 2016

Posts: 8


flag
PostPosted: Fri Oct 07, 2016 3:26 pm 
Post subject: Re: PHPBB2 Mobile Optimized

Jim_UK wrote:
CarpCharacin wrote:
You could upgrade to phpbb3.


A lot of us have devoted years of work to our boards and still Ver.2 is doing everything we need of it. Converting would mean losing such a lot of content. In my own case my database has near 100 tables in it compared to the standard install of around 30

Jim

Why do you need 100 tables?
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 541
Location: North West UK


flag
PostPosted: Fri Oct 07, 2016 5:21 pm 
Post subject: Re: PHPBB2 Mobile Optimized

Due to all the modifications that I have added to the base code.

Jim

_________________
The truth is out there.
Unfortunately they will not let you anywhere near it!
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 2 of 2 All times are GMT
Goto page Previous  1, 2
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0156 seconds using 15 queries. (SQL 0.0019 Parse 0.0006 Other 0.0131)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo