[DEV] phpBBmobile Device Browser Style

MOD Authors: Discuss and post updates on new MODs in development for phpBB3, Receive feedback and Feature requests for MODs in development.

To submit your MOD or style, go to the STG MOD Manager
Forum rules
go to the STG MOD Manager to post your MOD in development.
Discuss and receive feedback for any MOD in development for phpBB3.
Suggest features for MODs in development.

No Support or MOD Requests
-- exceptions for MODs only posted here as Beta or Alpha.
Support requests for a MOD should be requested in the respective MOD topic.

Re: [DEV] phpBBmobile Device Browser Style

Postby null » 24 Jul 2011, 18:55

Hi

phpBB_mobile_detect is guessing an laptop acer as a mobile device, with this parameters:

acer 4720z, windows xp profissional sp3, internet explorer or firefox.

but, when using chrome, its normal.

How can I solve that?
null
Crewman
Crewman
 
Posts: 1
Joined: 24 Jul 2011, 18:51
Gender: Male
phpBB Knowledge: 6


Re: [DEV] phpBBmobile Device Browser Style

Postby Sniper_E » 02 Aug 2011, 10:41

Login to your site as admin with your acer laptop and navigate to the Who Is Online page. Copy the browser info that your acer laptop is showing.

Then look in the ./includes/mods/phpbb_mobile_detect.php file and see if you can see any variable in one of the array list that would match anything in that acer browser info. Remove the variable from the list, save and upload the changes to test it.

Does this also happen when you visit our site here on your acer laptop?

[ Post made via Ed's HTC Inspire ] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] phpBBmobile Device Browser Style

Postby vaughan » 23 Sep 2011, 10:53

Hi, How can i add the bbcode buttons?
Last edited by vaughan on 01 Dec 2011, 14:17, edited 1 time in total.
vaughan
Crewman
Crewman
 
Posts: 3
Joined: 23 Sep 2011, 10:47
Gender: Male

Re: [DEV] phpBBmobile Device Browser Style

Postby vaughan » 23 Sep 2011, 10:56

Can i go to the standard version when this mod is installed?
vaughan
Crewman
Crewman
 
Posts: 3
Joined: 23 Sep 2011, 10:47
Gender: Male

Re: [DEV] phpBBmobile Device Browser Style

Postby Sniper_E » 23 Sep 2011, 13:56

Yes you can still go to the default style on your mobile. I visit this site using the ?style=1 on my mobile phone.

The bbCodes were taken out of the mobile style because they did not work on a mobile device. Not most of them.
But technology has changed since two years ago to where most of them will.

Open template/posting_body.html
Find
Code: Select all
      <script type="text/javascript">
      // <![CDATA[
         var form_name = 'postform';
         var text_name = 'message';
      // ]]>
      </script>
After Add
Code: Select all
<!-- INCLUDE posting_buttons.html -->
Refresh templates in the ACP
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6983
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [DEV] phpBBmobile Device Browser Style

Postby vaughan » 24 Sep 2011, 08:34

Hi

The first thanks for your help, the bbcodes it's running.
One more question: how can I do for mobile users are redirected to a different url?
That is, from pc users the url is mydomain.com/index.php/forum but mobile users want them to be redirected to mydomain.com/forum, is it possible?

Thanks for all
vaughan
Crewman
Crewman
 
Posts: 3
Joined: 23 Sep 2011, 10:47
Gender: Male

Re: [DEV] phpBBmobile Device Browser Style

Postby arch stanton » 08 Oct 2011, 14:06

Nice theme, guys. :)

I have a few users who would prefer to just browse the normal desktop theme rather than a mobile one from their phone. How do I go about putting in a link to let them switch from mobile to desktop?

Sorry if it's already been answered within this 136-page thread. I did try searching but didn't find anything that would help me with this. (I've seen the post saying use "?style=1" but it's not working for me, possibly because I use phpbb_seo's rewritten URLs).

Thanks. :)
arch stanton
Supporter
Supporter
 
Posts: 37
Joined: 26 Jun 2006, 04:17
Gender: Male
phpBB Knowledge: 7

Re: [DEV] phpBBmobile Device Browser Style

Postby satcell » 10 Oct 2011, 09:30

opera mini on the screen that can lead to trouble?
solution:
viewtopic.php?f=39&t=5386&start=380
Code: Select all
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
satcell
Cadet I
Cadet I
 
Posts: 10
Joined: 28 Apr 2010, 03:17
Location: Turkey
Gender: Male
phpBB Knowledge: 6

Re: [DEV] phpBBmobile Device Browser Style

Postby satcell » 11 Nov 2011, 21:54

Similar Topics Mobile

Precise Similar Topics II mode, first install and then threw similar_topics_mobile template cache cleaning

viewtopic_body.html

Find

Code: Select all
<!-- INCLUDE breadcrumbs.html -->


Add before

Code: Select all
<!-- IF .similar and not S_IS_BOT -->
   <!-- INCLUDE similar_topics.html -->
<!-- ENDIF -->
Attachments
similar_topics_mobile.png
(13.4 KiB) Not downloaded yet
similar_topics_mobile.rar
(546 Bytes) Downloaded 40 times
satcell
Cadet I
Cadet I
 
Posts: 10
Joined: 28 Apr 2010, 03:17
Location: Turkey
Gender: Male
phpBB Knowledge: 6

Re: [DEV] phpBBmobile Device Browser Style

Postby Drakkim » 20 Nov 2011, 02:04

I use this mod on a couple sites, but I'm using a much older detection script than the one on here now, so this will have to be modified for most of you, but I made a "Switch to Standard Site" link that a couple people here seem to want. It lets you add &site=full or &site=mobile to the forum address to override the mobile detection. This is an improvement over using style=1 when you are not using prosilver or when your forum uses multiple styles, because it falls back on the forum to decide what style to use.

First, I start my mobile detection script with this bit:
Code: Select all
      $site = request_var('site', '');
   
      $why = 'Default behavior';
   
      // Mobile site mode
      if ($site == 'mobile')
      {
         $_EXTRA_URL[] = 'site='.$site;
         $style = $mobile_style;
         $this->data['is_mobile'] = true;
         $why = 'Mobile specified in URL';
      }
      elseif ($site == 'full')
      {
         //Don't do anything =D
         $_EXTRA_URL[] = 'site='.$site;
         $why = 'Full specified in URL';
      }
      // Replace these with mobile URLs
      elseif (generate_board_url(true) == 'http://m.your-site.com' ||
         generate_board_url(true) == 'http://www.m.your-site.com' ||
         generate_board_url(true) == 'http://mobile.your-site.com' ||
         generate_board_url(true) == 'http://www.mobile.your-site.com')
      {
         $style = $mobile_style;
         $this->data['is_mobile'] = true;
         $why = 'Using mobile URL: ' . generate_board_url(true);
      }
      else
      {... rest of your detect code


Then, in session.php:
Find :
Code: Select all
$_EXTRA_URL = array('style=' . $style);

Replace with:
Code: Select all
$_EXTRA_URL[] = 'style=' . $style;


Finally, add to the TOP of the mobile style's overall_footer.php
Code: Select all
<table cellspacing="0">
   <tr>
      <td class="genmed" align="center">
         <a href="{U_THIS_URL}&site=full">Switch to Standard Site</a>
      </td>
   </tr>
</table>
Drakkim
Crewman
Crewman
 
Posts: 8
Joined: 22 Jul 2007, 08:22
Gender: Male

PreviousNext

Return to MODs in Development

Who is online

Users browsing this forum: No registered users and 10 guests