[ABD] [RC] Mobile Device

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

Updated Android list if you want to update your copy.

Code: Select all

            case (preg_match('/android/i',$user_agent));
                if (preg_match('/SM-G870A/i',$user_agent))
                {
                    $status = 'Samsung Galaxy S5 Active';
                }
                elseif (preg_match('/SGH-I497/i',$user_agent))
                {
                    $status = 'Samsung Galaxy2 Tablet';
                }
                elseif (preg_match('/GT-I9505|GT-I9500/i',$user_agent))
                {
                    $status = 'Samsung Galaxy S4';
                }
                elseif (preg_match('/TF101/i',$user_agent))
                {
                    $status = 'Asus Transformer Tablet';
                }
                elseif (preg_match('/Archos 40b/i',$user_agent))
                {
                    $status = 'Archos 40b Titanium Surround';
                }
                elseif (preg_match('/A0001/i',$user_agent))
                {
                    $status = 'OnePlus One';
                }
                elseif (preg_match('/Nexus 4/i',$user_agent))
                {
                    $status = 'LG Nexus 4';
                }
                else
                {
                    $status = 'Android';
                }
                $mobile_browser = $android;
                if(substr($android,0,4)=='http')
                {
                    $mobileredirect = $android;
                }
            break;
Updated BlackBerry list if you want to update your copy.

Code: Select all

            case (preg_match('/blackberry/i',$user_agent));
                if (preg_match('/BlackBerry9900|BlackBerry9930|BlackBerry9790|BlackBerry9780|BlackBerry9700|BlackBerry9650|BlackBerry9000|/i',$user_agent))
                {
                    $status = 'BlackBerry Bold';
                }
                elseif (preg_match('/BlackBerry9380|BlackBerry9370|BlackBerry9360|BlackBerry9350|BlackBerry9330|BlackBerry9320|BlackBerry9300|BlackBerry9220|BlackBerry8980|BlackBerry8900|BlackBerry8530|BlackBerry8520|BlackBerry8330|BlackBerry8320|BlackBerry8310|BlackBerry8300/i',$user_agent))
                {
                    $status = 'BlackBerry Curve';
                }
                elseif (preg_match('/BlackBerry9860|BlackBerry9850|BlackBerry9810|BlackBerry9800/i',$user_agent))
                {
                    $status = 'BlackBerry Torch';
                }
                elseif (preg_match('/BlackBerry9900/i',$user_agent))
                {
                    $status = 'BlackBerry Touch';
                }
                elseif (preg_match('/BlackBerry9105/i',$user_agent))
                {
                    $status = 'BlackBerry Pearl';
                }
                elseif (preg_match('/BlackBerry8220/i',$user_agent))
                {
                    $status = 'BlackBerry Pearl Flip';
                }
                elseif (preg_match('/BlackBerry Storm|BlackBerry Storm2/i',$user_agent))
                {
                    $status = 'BlackBerry Storm';
                }
                elseif (preg_match('/BlackBerry Passport/i',$user_agent))
                {
                    $status = 'BlackBerry Passport';
                }
                elseif (preg_match('/BlackBerry Porsche/i',$user_agent))
                {
                    $status = 'BlackBerry Porsche';
                }
                elseif (preg_match('/BlackBerry PlayBook/i',$user_agent))
                {
                    $status = 'BlackBerry PlayBook';
                }
                else
                {
                    $status = 'BlackBerry';
                }
                $mobile_browser = $blackberry;
                if(substr($blackberry,0,4)=='http')
                {
                    $mobileredirect = $blackberry;
                }
            break;
Updated Mobile Images to go with these new listed devices. :arrow: Updated Mobile Images
Last edited by Sniper_E on Sat Sep 12, 2015 8:56 pm, edited 1 time in total.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] Mobile Device

Post by 3Di »

Android:
$status = 'Archos 40b Titanium';
should be
$status = 'Archos 40b Titanium Surround';
:)
πŸ†“ Free support for our extensions also provided here: phpBB Studio
πŸš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ΒΊ PhpStorm's proud user ΒΊ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [DEV] Mobile Device

Post by 2600 »

Sniper_E wrote:Someone stopped by with an Android - Mozilla/5.0 (Android; Mobile; rv:29.0) Gecko/29.0 Firefox/29.0
Thank you for stopping by. But I have no idea what phone name that is. Google was baffled too.

That was more than likely me with my UA spoofer in my browser that I use. Your site did say it was an Android.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

@ 3Di - Archos 40b Titanium Surround updated.

Code: Select all

                elseif (preg_match('/Archos 40b/i',$user_agent))
                {
                    $status = 'Archos 40b Titanium Surround';
                }
And the image name has been changed to Archos 40b Titanium Surround.png

@ John - Thanks for letting me know, I want worry about that one then.

With phpBB 3.1.6 out now we will be releasing the next version of this extension soon.
We are still working on a small issue on an extra feature added.

Thank you all for visiting the site and helping to expand the list of mobile devices!

[ Post made via Archos 40b Titanium Surround ] Image
Last edited by Sniper_E on Sun Sep 13, 2015 4:42 am, edited 1 time in total.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Bullseye!
Registered User
Posts: 181
Joined: Sun Mar 21, 2010 11:42 pm

Re: [DEV] Mobile Device

Post by Bullseye! »

Currently looking at your board using the Samsung SM-G357FZ, and it said that it detects the Android :) the device I am using is running Android version 4. 4. 4
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

Yes Bullseye, thank you for testing.

Your SM-G357FZ pulled up as a Samsung Galaxy Ace 4. It's added to the Android list.

Code: Select all

                elseif (preg_match('/SM-G357FZ/i',$user_agent))
                {
                    $status = 'Samsung Galaxy Ace 4';
                }
[ Post made via Samsung Galaxy Ace 4 ] Image
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [DEV] Mobile Device

Post by Holger »

Hm, for me it would be enough to show a generic Mobile Phone icon, for all mobile devices.
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

That's no problem Holger...

This script can be used as is and never upadted or added to if you wanted it to simply say...
[ Post made via Android ] Image - [ Post made via BlackBerry ] Image - [ Post made via Mobile Device ] Image

Or I can put together a custom list for you that will only say [ Post made via Mobile Device ] for every mobile device that posts in a topic if that is all you want. With or without the image. Just say the word.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [DEV] Mobile Device

Post by Holger »

Thank you!
That would be cool!
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

First post updated to Mobile Device version 1.0.1 for phpBB 3.1.6

Added features & Updated mobile list with images. Mobile Detect 1.0.1

Thanks go out to all who stopped by and helped with getting a better list of mobile devices added!
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Bullseye!
Registered User
Posts: 181
Joined: Sun Mar 21, 2010 11:42 pm

Re: [DEV] Mobile Device

Post by Bullseye! »

β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–„β–„
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–‘β–‘β–ˆ
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–‘β–‘β–ˆ
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–ˆ
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–‘β–‘β–‘β–‘β–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–ˆβ–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„
β–“β–“β–“β–“β–“β–“β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆ
β–“β–“β–“β–“β–“β–“β–ˆβ–‘β–‘β–‘β–‘ phpbb, β–‘β–‘β–‘β–‘β–‘β–ˆ
β–“β–“β–“β–“β–“β–“β–ˆβ–‘β–‘β–‘β–‘Add Thisβ–‘β–‘β–‘β–‘β–ˆ
β–“β–“β–“β–“β–“β–“β–ˆβ–‘β–‘β–‘β–‘Please!β–‘β–‘β–‘β–‘β–‘β–ˆ
β–“β–“β–“β–“β–“β–“β–ˆβ–‘cuz it is epic!β–‘β–‘β–‘β–‘β–ˆ
β–“β–“β–“β–“β–“β–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–‘β–‘β–‘β–‘β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€

Just for laughs, seriously it was one of my favourite mods for 3.0, I will try it out in a bit, well done guys! :)
User avatar
MedCo
Registered User
Posts: 109
Joined: Tue Jul 14, 2015 4:09 pm
Contact:

Re: [DEV] Mobile Device

Post by MedCo »

Hello, after the update comes the following error message when using a mobile device:
[phpBB Debug] PHP Notice: in file [ROOT]/ext/sniper/mobiledevice/event/listener.php on line 503: Undefined index: MOBILE_DEVICE
[phpBB Debug] PHP Notice: in file [ROOT]/ext/sniper/mobiledevice/event/listener.php on line 503: Undefined index: MOBILE_DEVICE
without mobile device in UCP - same error message
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

MedCo wrote:Successful expansion. How can I change "Mobile Device" in a different language? In the language file, I find only "Post made via". Thank you
Sniper_E wrote:We will add more language files on the next release. We will add Mobile Device to the language file also.
As requested we added MOBILE_DEVICE to the language file. 'MOBILE_DEVICE' => 'Mobile Device',
That line 503 and other lines now read as $status = $this->user->lang['MOBILE_DEVICE'];

Copy the language/en/common.php file into your language directory and edit to your language.

Sorry for responding so late, you probably have this figured out by now.
Providing your language translation file would be helpful when you finish.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
MedCo
Registered User
Posts: 109
Joined: Tue Jul 14, 2015 4:09 pm
Contact:

Re: [DEV] Mobile Device

Post by MedCo »

Thank you. The new language file I've seen. My problem is the error message after the update! Already a solution in the works? Many thanks.

Edit:

Image
User avatar
Sniper_E
Registered User
Posts: 1134
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Mobile Device

Post by Sniper_E »

ES Language: mobiledevice_es_lang.zip
Spanish language file ext/sniper/mobiledevice/language/es/common.php contributed by infspirit
Thank you infspirit. Added to the first post.

Hope you resolved your problem MedCo with adding your language file.
Please share your language file and I'll add it also.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Locked

Return to β€œAbandoned Extensions”