[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
Anv@r.all
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 Anv@r.all » Sat Dec 27, 2014 10:41 am

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 Anv@r.all 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: 16820
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by david63 » Sat Dec 27, 2014 11:44 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Anv@r.all
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 Anv@r.all » Sat Dec 27, 2014 1:01 pm

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: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow » Mon Dec 29, 2014 7:53 am

Like the idea so far. Is it possible to have it work if "Override user style" is set to "yes"?

User avatar
Anv@r.all
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 Anv@r.all » Mon Dec 29, 2014 2:08 pm

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: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow » Mon Dec 29, 2014 8:30 pm

Anv@r.all 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
Anv@r.all
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 Anv@r.all » Tue Dec 30, 2014 2:17 am

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 » Tue Dec 30, 2014 3:17 am

Sites are already mobile friendly since upgrade, so how would this be better?

User avatar
Sshadow
Registered User
Posts: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by Sshadow » Tue Dec 30, 2014 4:09 am

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.
Anv@r.all 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 » Tue Dec 30, 2014 4:14 am

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: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] Mobile Devices - Detect mobile version

Post by draky » Tue Dec 30, 2014 8:57 am

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
Anv@r.all
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 Anv@r.all » Tue Dec 30, 2014 11:28 am

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 » Wed Jul 29, 2015 3:28 am

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
Anv@r.all
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 Anv@r.all » Wed Jul 29, 2015 1:28 pm

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”