[DEV] Mobile phpBB 3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
fanmail
Registered User
Posts: 307
Joined: Fri Mar 18, 2005 2:33 pm

Re: [DEV] Mobile phpBB 3

Post by fanmail »

Menu Options not working: http://mphpbb3.flexplat.com/viewtopic.php?f=2&t=19 (smartphone) :|
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

fanmail wrote:Menu Options not working: http://mphpbb3.flexplat.com/viewtopic.php?f=2&t=19 (smartphone) :|
I have the same problem in my environment. I will fix it as soon as possible.
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

rickey29 wrote:
fanmail wrote:Menu Options not working: http://mphpbb3.flexplat.com/viewtopic.php?f=2&t=19 (smartphone) :|
I have the same problem in my environment. I will fix it as soon as possible.
Hi fanmail,

Please do updating again. :) https://github.com/rickey29/mobile-phpbb-3

Actually, there is only one file needed to update: yoursite.com/mobile/themes/jquery/mobile/scrollToHash.js

The Menu Option has a hash sign inside. Our previous hash java script blocks this Menu Option hash -- this makes the new problem.

Sorry for the inconvenience. Any problem, please let me know.

Rickey
Kupullka
Registered User
Posts: 1
Joined: Fri Apr 10, 2015 9:02 am

Re: [DEV] Mobile phpBB 3

Post by Kupullka »

Good afternoon! Very good mod. Only there is one mistake. On the main theme does not appear where there are unread messages? So it should be?
fanmail
Registered User
Posts: 307
Joined: Fri Mar 18, 2005 2:33 pm

Re: [DEV] Mobile phpBB 3

Post by fanmail »

rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

Kupullka wrote:Good afternoon! Very good mod. Only there is one mistake. On the main theme does not appear where there are unread messages? So it should be?
Hi Kupullka,

Thanks for getting in touch.

Within viewforum page, when there is unread post(s), the unread post link is at the right side of that topic bar. (When there is not, the link will be hidden.) For detail, please go to following page: http://demos.jquerymobile.com/1.3.2/widgets/listviews/ , search keys: "Thumbnails" and "Split buttons". Read "Split buttons" description, compare the two example pictures, you will find the unread post link.

Within viewtopic page, when there is unread post(s), there will be a "unread" button. (When there is not, the button will be hidden.)

Any question, feel free to ask me.

Rickey
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

fanmail wrote:Search page does not work http://mphpbb3.flexplat.com/search.php?keywords=Test

:)
Hi fanmail,

The search page is too complicated. I try to make it mobile-friendly before but I failed.

Let me think if I can do something right now.

Rickey
fanmail
Registered User
Posts: 307
Joined: Fri Mar 18, 2005 2:33 pm

Re: [DEV] Mobile phpBB 3

Post by fanmail »

Would it be possible to increase thread readability a little bit please?

Alternate post background color, avatar, thicker separator between posts?
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

fanmail wrote:Would it be possible to increase thread readability a little bit please?

Alternate post background color, avatar, thicker separator between posts?
Hi Fanmail,

My module is based on jQuery Mobile: http://jquerymobile.com/ version 1.3.2: http://demos.jquerymobile.com/1.3.2/ . If there is some functions that (1) jQuery Mobile already provided and (2) you want, please let me know, I will improve my module. If jQuery Mobile has not implemented you requirement, I am sorry I will do not change there.

Hope you can understand and accept this strategy.

Rickey
fanmail
Registered User
Posts: 307
Joined: Fri Mar 18, 2005 2:33 pm

Fatal error: Call to undefined function m_update_err()

Post by fanmail »

What version of phpBB are you using? phpBB 3.0.7-PL1
What is your board's URL? http://www.fanmail.biz/mboard/
Who do you host your board with? -
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? None
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? Mobile phpBB 3 viewtopic.php?f=70&t=2091769
What styles do you currently have installed? proSilver
What language(s) is your board currently using? English
Which database type/version are you using? MySQL 5.0.95
What is your level of experience? Average to PHP/ phpBB
What username can be used to view this issue? -
What password can be used to view this issue? -
When did your problem begin? I don't know
Please describe your problem.
One of my users gets this error message when he tries to login with Internet Explorer 11 with Windows 8.1:
Fatal error: Call to undefined function m_update_err() in ~/includes/functions.php on line 2965

He managed to login using Google Chrome

Thanks in advance for your help :)
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Fatal error: Call to undefined function m_update_err()

Post by RMcGirr83 »

Post the 20 lines before and 20 lines after that line in that file.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: Fatal error: Call to undefined function m_update_err()

Post by rickey29 »

Hi fanmail,

I will check the problem and reply to you in 3 days.

Rickey
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: Fatal error: Call to undefined function m_update_err()

Post by rickey29 »

Hi fanmail,

The root cause is (1) my module identify IE11 as feature-phone instead of desktop; (2) my feature-phone code scenario is missing in you site.

In detail, IE11 User Agent is as: "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko". In my module, I use "MSIE" as keyword to identify MSIE as desktop. Check the above string, my code will consider it as a feature-phone, not desktop, smartphone or tablet.

While, I find my feature-phone style can not be found in your web site. In my original code, even IE11 is considered as feature-phone, the feature-phone style will be used -- there will not be PHP error, as "Call to undefined functuion m_update_err()", so I suspect you change my code scenario, even I not sure.

I will update my "detection.php" so my module can detect IE11 correctly. If you change my code scenario, try to find code scenario error by yourself. The point is: if MPHPBB3 is defined, my code library (m_update_err is in this library) should be included. The error said: (MPHPBB3 is defined, but) my module library is NOT included so the function is undefined. If you did not change my code scenario, send me all files under "mobile" directory and the "includes/functions.php" file, I will do the checking for you.

Thanks for your cooperation.

Rickey
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

Re: [DEV] Mobile phpBB 3

Post by rickey29 »

Hi fanmail,

Please email or PM me your "yoursite.com/mobile/lib/detection.php" file, since I do not know which Mobile phpBB3 version you are using, so I can let you know how to update it to identify MS IE 11 correctly.

Thanks for your support.

Rickey
fanmail
Registered User
Posts: 307
Joined: Fri Mar 18, 2005 2:33 pm

Re: [DEV] Mobile phpBB 3

Post by fanmail »

Code: Select all

<?php
 if ( !defined('IN_PHPBB') )
{
	exit;
}


function m_get_detection($data)
{
	$device_list = array(
		// Apple iOS
		'iPad' => array(
			'Apple iPad',
			'jQuery Mobile A-grade',
			'tablet'
		),
		'iPhone' => array(
			'Apple iPhone',
			'jQuery Mobile A-grade',
			'smartphone'
		),
		'iPod' => array(
			'Apple iPod',
			'jQuery Mobile A-grade',
			'smartphone'
		),

		// Kindle Fire
		'Kindle Fire' => array(
			'Kindle Fire',
			'jQuery Mobile A-grade',
			'tablet'
		),
		'Kindle/' => array(
			'Kindle',
			'jQuery Mobile A-grade',
			'tablet'
		),

		// Android
		'Android*Mobile' => array(
			'Android',
			'jQuery Mobile A-grade',
			'smartphone'
		),
		'Android' => array(
			'Android Honeycomb',
			'jQuery Mobile A-grade',
			'tablet'
		),

		// Chrome
		'Chrome/' => array(
			'Chrome',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Macintosh
		'Macintosh' => array(
			'Macintosh',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Firefox
		'Firefox/' => array(
			'Firefox',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Windows Phone
		'Windows Phone' => array(
			'Windows Phone',
			'jQuery Mobile A-grade',
			'smartphone'
		),

		// Windows Mobile
		'Windows CE' => array(
			'Windows Mobile',
			'jQuery Mobile C-grade',
			'feature_phone'
		),

		// Internet Explorer
		'MSIE ' => array(
			'Internet Explorer',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Opera Mobile
		'Opera Mobi*Version/' => array(
			'Opera Mobile',
			'jQuery Mobile A-grade',
			'smartphone'
		),

		// Opera Mini
		'Opera Mini/' => array(
			'Opera Mini',
			'jQuery Mobile B-grade',
			'feature_phone'
		),

		// Opera
		'Opera*Version/' => array(
			'Opera',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Palm WebOS
		'webOS/*AppleWebKit' => array(
			'Palm WebOS',
			'jQuery Mobile A-grade',
			'smartphone'
		),
		'TouchPad/' => array(
			'Palm WebOS Pad',
			'jQuery Mobile A-grade',
			'tablet'
		),

		// Meego
		'MeeGo' => array(
			'Meego',
			'jQuery Mobile A-grade',
			'smartphone'
		),

		// BlackBerry
		'BlackBerry*AppleWebKit*Version/' => array(
			'BlackBerry Smartphone',
			'jQuery Mobile A-grade',
			'smartphone'
		),
		'PlayBook*AppleWebKit' => array(
			'BlackBerry Playbook',
			'jQuery Mobile A-grade',
			'tablet'
		),
		'BlackBerry*/*MIDP' => array(
			'BlackBerry Feature Phone',
			'jQuery Mobile C-grade',
			'feature_phone'
		),

		// Safari
		'Safari' => array(
			'Safari',
			'jQuery Mobile A-grade',
			'desktop'
		),

		// Nokia Symbian
		'Symbian/' => array(
			'Nokia Symbian',
			'jQuery Mobile B-grade',
			'smartphone'
		),

		// Google
		'googlebot-mobile' => array(
			'Google Mobile Bot',
			'jQuery Mobile A-grade',
			'mobile-bot'
		),
		'googlebot' => array(
			'Google Bot',
			'',
			'bot'
		),

		// Microsoft
		'bingbot' => array(
			'Microsoft Bing',
			'',
			'bot'
		),

		// Yahoo!
		'Yahoo! Slurp' => array(
			'Yahoo! Slurp',
			'',
			'bot'
		)
	);

	// application/vnd.wap.xhtml+xml
	$accept_list = array(
		'application/vnd.wap.xhtml+xml' => array(
			'unrecognized',
			'jQuery Mobile C-grade',
			'feature-phone'
		)
	);


	if ( !empty($data['user_agent']) )
	{
		foreach ( $device_list as $key => $value )
		{
			if ( preg_match('#' . str_replace('\*', '.*?', preg_quote($key, '#')) . '#i', $data['user_agent']) )
			{
				return $value;
			}
		}
	}

	if ( !empty($data['accept']) )
	{
		foreach ( $accept_list as $key => $value )
		{
			if ( preg_match('#' . str_replace('\*', '.*?', preg_quote($key, '#')) . '#i', $data['accept']) )
			{
				return $value;
			}
		}
	}

	if ( !empty($data['profile']) )
	{
		return array('unrecognized', 'jQuery Mobile C-grade', 'feature-phone');
	}

	if ( empty($data['user_agent']) )
	{
		return array('', '', 'desktop');
	}

	return array('unrecognized', 'unrecognized', 'unrecognized');
}

function m_get_redirection($data)
{
	list($device_platform, $device_grade, $device_system) = m_get_detection($data);
	if ( $device_system == 'desktop' || $device_system == 'bot' )
	{
		return array($device_platform, $device_grade, $device_system, 'desktop', '');
	}
	else if ( $device_system == 'mobile-bot' )
	{
		return array($device_platform, $device_grade, $device_system, 'mobile', '');
	}

	if ( !empty($data['redirection']) )
	{
		if ( $data['redirection'] == 'mobile' )
		{
			return array($device_platform, $device_grade, $device_system, 'mobile', 'mobile');
		}
		else if ( $data['redirection'] == 'desktop' )
		{
			return array($device_platform, $device_grade, $device_system, 'desktop', 'desktop');
		}
	}

	if ( !empty($data['cookie']) )
	{
		if ( $data['cookie'] == 'mobile' )
		{
			return array($device_platform, $device_grade, $device_system, 'mobile', 'mobile');
		}
		else if ( $data['cookie'] == 'desktop' )
		{
			return array($device_platform, $device_grade, $device_system, 'desktop', 'desktop');
		}
	}

	return array($device_platform, $device_grade, $device_system, 'mobile', '');
}
?>
Locked

Return to “[3.0.x] MODs in Development”