[BETA] Mobile Devices - Detect mobile version

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

[BETA] Mobile Devices - Detect mobile version

Post by [email protected] »

Mobile Devices - Detect Version

Image

DESCRIPTION:
Extension allows you to choose the style of display on a mobile device and other devices. Ability to assign separate styles for web devices and mobile phones.
Image

It is also possible to add or edit HTTP_USER_AGENT: for which will be determined by the mobile visitor.
Image

To work correctly within a single style, such prosilver, should produce action.
Open: /styles/prosilver/template/overall_header.html
Find

Code: Select all

<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)" />
With replace:

Code: Select all

<!-- IF not S_WEB_DEVICE -->
<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)" />
<!-- ELSE -->
<style type="text/css">
body { min-width: 840px; }
/* Profile Side Switcher FIX */
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
   .leftsided div.postbody {
      width: 79%!important;
      float: right!important;
   }
   .leftsided .postprofile {
      border-right: 1px solid #fff!important;
      padding-left: 4px;
      width: 20%!important;
      float: left!important;
   }
   .leftsided .postprofile dd, .leftsided .postprofile dt {
      margin: 0 12px 0 0!important;
   }
}
</style>
<!-- ENDIF -->
in google chrome or Android browser will be active the option to enable the full version.

Download: Mobile Devices - test version[/b]
Last edited by [email protected] on Wed Mar 04, 2015 4:26 pm, edited 1 time in total.
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [DEV] Mobile Devices - Detect mobile version

Post by david63 »

An extension cannot be dependant on the requirement of editing of core files.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by [email protected] »

Use different styles for mobile and web. Then do not need to edit the style template.

In prosilver is not possible remove responsive.css
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
User avatar
Sshadow
Registered User
Posts: 300
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow »

Like the idea so far. Is it possible to have it work if "Override user style" is set to "yes"?
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by [email protected] »

Sshadow, If the administrator has decided to appoint all the style, then why would he spoil appetite? :D
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
User avatar
Sshadow
Registered User
Posts: 300
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow »

[email protected] wrote:Sshadow, If the administrator has decided to appoint all the style, then why would he spoil appetite? :D
Well that way I could keep them from being able to change styles in the UCP but still assign a different style for mobile devices.
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by [email protected] »

Sshadow,
Open \bb3mobi\MobileDevices\core\helper.php

Find and delete

Code: Select all

 !$this->config['override_user_style'] && 
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
biblexcursion
Registered User
Posts: 168
Joined: Fri Sep 13, 2013 12:11 am
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by biblexcursion »

Sites are already mobile friendly since upgrade, so how would this be better?
User avatar
Sshadow
Registered User
Posts: 300
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow »

biblexcursion wrote:Sites are already mobile friendly since upgrade, so how would this be better?
The main style I use while it looks great in browser and/or mobile I think a few extensions cause it to act up a bit in the mobile version. This extension is perfect as it allows me to set a more minimal style as the mobile version. So it is more "to each his own". This extension may not be needed by all but it may be very helpful to others.
[email protected] wrote:Sshadow,
Open \bb3mobi\MobileDevices\core\helper.php

Find and delete

Code: Select all

 !$this->config['override_user_style'] && 
I could not find it in helper.php however I do see it in listener.php. Is that where you meant?
Last edited by Sshadow on Tue Dec 30, 2014 4:18 am, edited 1 time in total.
biblexcursion
Registered User
Posts: 168
Joined: Fri Sep 13, 2013 12:11 am
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by biblexcursion »

Ok that explains it well. It is important today to have sites very mobile friendly as this is where many people are today.
User avatar
draky
Registered User
Posts: 250
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by draky »

A little though : if an extension breaks the responsive design, it is not the duty of the forum owner to adapt the whole design to this extension but the ext author to adapt it so it can be responsive.
Just my opinion :p
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by [email protected] »

Sshadow wrote:I could not find it in helper.php however I do see it in listener.php. Is that where you meant?
The second archive on the beta test. Old will excluded.

Edit /styles/prosilver/template/overall_header.html
No need to change if we include additional style.
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
User avatar
optimusvault
Registered User
Posts: 108
Joined: Tue Jul 28, 2015 2:51 am
Name: Aaron

Re: [BETA] Mobile Devices - Detect mobile version

Post by optimusvault »

How do I get rid of the icons in the header and footer on desktops? It kinda defeats the purpose of anything.... if there is mobile switchers for the desktop versions.
Cheers,
Aaron
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [BETA] Mobile Devices - Detect mobile version

Post by [email protected] »

Delete folder ext\bb3mobi\MobileDevices\styles\prosilver and clear cache
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
Post Reply

Return to “Extensions in Development”