[DEV] Mobile Online phpBB

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
rickey29
Registered User
Posts: 259
Joined: Tue Apr 27, 2004 11:35 am
Location: Beijing, China
Contact:

mophpbb 1.5.1

Post by rickey29 » Thu Jan 26, 2006 7:55 am


Tafkau
Registered User
Posts: 12
Joined: Wed Nov 23, 2005 8:35 am

Post by Tafkau » Fri Feb 03, 2006 12:38 pm

This works fine when viewing on IE on a desktop PC, but any form of mobile web browser I've tried it on (on 6 different units so far) brings up this message:

Fatal Error: Allowed memory size of 8388608bytes exhausted (tried to allocate 127 bytes) in /home/fhlinux209/w/wcsociety.co.uk/user/htdocs/forums/mo/wurfl/wurfl_parser.php on line 383

Any ideas?

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

Post by rickey29 » Sun Feb 05, 2006 4:33 am

Tafkau wrote: This works fine when viewing on IE on a desktop PC, but any form of mobile web browser I've tried it on (on 6 different units so far) brings up this message:

Fatal Error: Allowed memory size of 8388608bytes exhausted (tried to allocate 127 bytes) in /home/fhlinux209/w/wcsociety.co.uk/user/htdocs/forums/mo/wurfl/wurfl_parser.php on line 383

Any ideas?


My understanding is WURFL needs too much memory in your environment that the system can not allocate. Please disable WURFL by changing "mo_enable_wurfl" from "1" (enable) to "0" (disable) in "cfg.php".

Regarding the root cause of this issue, please refer to my reply to rgross's post. rgross's problem is the system can not allocate enough CPU for WURFL (which is a module I used in mophpbb), yours is the system can not allocate enough memory.

kmax
Registered User
Posts: 7
Joined: Mon Mar 29, 2004 10:13 pm
Location: Belgrade, MT
Contact:

Post by kmax » Wed Feb 08, 2006 7:08 pm

First off, great mod, this is exactly what I was looking for and appears to do all that I wanted.

In testing it seems that posts through this are not appending the "posted from mobile" or whatever to the post. Is it supposed to still do this?

One thing of note possibly, the first time I hit the mobile interface I got one error of the same type that rgross reported(only one though, not the many that he showed). Hitting it a second time worked correctly and I have the 3K cache.php file. Not sure if possibly this is the cause, but since it seems related thought I would mention it.

Thanks again for the mod, and thanks for any help.

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

Post by rickey29 » Thu Feb 09, 2006 2:54 am

kmax wrote: In testing it seems that posts through this are not appending the "posted from mobile" or whatever to the post. Is it supposed to still do this?

The "posted from xxxx" should work because you asked the second question. I think there are two possibilities for your problem:
(1) your wireless gateway filters the mobile agent/type message;
(2) your mobile type is not supported by WURFL.

To clarify what you are suffering, please add on line in sys.php:
REPLACE

Code: Select all

$wurfl = new wurfl_class($wurfl, $wurfl_agents);
$wurfl->GetDeviceCapabilitiesFromAgent($_SERVER["HTTP_USER_AGENT"]);
WITH

Code: Select all

$wurfl = new wurfl_class($wurfl, wurfl_agents);
$wurfl->GetDeviceCapabilitiesFromAgent($_SERVER["HTTP_USER_AGENT"]);
mo_log($_SERVER["HTTP_USER_AGENT"]);
Then you will get a new file -- 200602.log -- in mo/logs directory. The log file records the web agent/type message. If the message is empty, your mobile message is filtered by your wireless gateway; if you get the message, such as “Nokia Mobile Browser 4.0”, you mobile type is not supported by WURFL so far.
kmax wrote: One thing of note possibly, the first time I hit the mobile interface I got one error of the same type that rgross reported(only one though, not the many that he showed). Hitting it a second time worked correctly and I have the 3K cache.php file. Not sure if possibly this is the cause, but since it seems related thought I would mention it.

Good question. I will add your question in my FAQ list.

The root cause is WURFL uses too much resource to generate the cache.php. When WURFL is used for the first time, it uses a long time to generate the cache.php, which is later than system ask mophpbb to query the cache.php. So you get the error message. After that, since the cache.php is already there, mophpbb will success.

In my Windows simulation/development environment, when I start mophpbb for the first time after each system startup/reboot, WURFL will use 99% CPU for at least one minute. The following usage is very quick, just like you.

kmax
Registered User
Posts: 7
Joined: Mon Mar 29, 2004 10:13 pm
Location: Belgrade, MT
Contact:

Post by kmax » Thu Feb 09, 2006 6:56 pm

rickey29, Thanks for the troubleshooting tips.

First off, where you said to add the mo_log() call doesn't work, you can't hit the mo interface because index.php requires sys.php before lib.php(which is the file that requires log.php) so it comes up with a mo_log is not defined error. I put the mo_log() call directly into the index.php file after the lib.php require and got the following entry when hitting it:

2006-02-09 18:30:32 MOT-8720_/00.62 UP.Browser/6.2.3.4.c.1.104 (GUI) MMP/2.0

I also logged the wurfl data and can see that wurfl->brand is not set so I am guessing it is not supported. From looking at mo_post_from_mobile() I can see that if the brand is not set it does not add anything. Since I would like to have a simple "Posted from mobile." type statement if wurfl doesn't support it, I will just modify that function to put that message in if wurfl is enabled, but the brand wasn't set.

Thanks for your troubleshooting tips, it led me right to the answer and an easy solution. Again, great mod and great support, keep it up!

groundfighter
Registered User
Posts: 1909
Joined: Sat Nov 08, 2003 2:15 am
Location: Las Vegas, NV
Contact:

Post by groundfighter » Fri Feb 10, 2006 5:37 am

Sweet little mod, works great on my Treo, thanks. 8)

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

Post by rickey29 » Fri Feb 10, 2006 5:53 am

kmax wrote: rickey29, Thanks for the troubleshooting tips.

First off, where you said to add the mo_log() call doesn't work, you can't hit the mo interface because index.php requires sys.php before lib.php(which is the file that requires log.php) so it comes up with a mo_log is not defined error. I put the mo_log() call directly into the index.php file after the lib.php require and got the following entry when hitting it:

2006-02-09 18:30:32 MOT-8720_/00.62 UP.Browser/6.2.3.4.c.1.104 (GUI) MMP/2.0

I also logged the wurfl data and can see that wurfl->brand is not set so I am guessing it is not supported. From looking at mo_post_from_mobile() I can see that if the brand is not set it does not add anything. Since I would like to have a simple "Posted from mobile." type statement if wurfl doesn't support it, I will just modify that function to put that message in if wurfl is enabled, but the brand wasn't set.

Thanks for your troubleshooting tips, it led me right to the answer and an easy solution. Again, great mod and great support, keep it up!

You can download the latest wurfl.xml any time from http://wurfl.sourceforge.net/, and overwrite the mo/wurfl/wurfl.xml mophpbb packs with the new one. The wurfl.xml provides the latest mobile information.

kmax
Registered User
Posts: 7
Joined: Mon Mar 29, 2004 10:13 pm
Location: Belgrade, MT
Contact:

Post by kmax » Fri Feb 10, 2006 6:55 pm

rickey29 wrote:
kmax wrote:rickey29, Thanks for the troubleshooting tips.

First off, where you said to add the mo_log() call doesn't work, you can't hit the mo interface because index.php requires sys.php before lib.php(which is the file that requires log.php) so it comes up with a mo_log is not defined error. I put the mo_log() call directly into the index.php file after the lib.php require and got the following entry when hitting it:

2006-02-09 18:30:32 MOT-8720_/00.62 UP.Browser/6.2.3.4.c.1.104 (GUI) MMP/2.0

I also logged the wurfl data and can see that wurfl->brand is not set so I am guessing it is not supported. From looking at mo_post_from_mobile() I can see that if the brand is not set it does not add anything. Since I would like to have a simple "Posted from mobile." type statement if wurfl doesn't support it, I will just modify that function to put that message in if wurfl is enabled, but the brand wasn't set.

Thanks for your troubleshooting tips, it led me right to the answer and an easy solution. Again, great mod and great support, keep it up!

You can download the latest wurfl.xml any time from http://wurfl.sourceforge.net/, and overwrite the mo/wurfl/wurfl.xml mophpbb packs with the new one. The wurfl.xml provides the latest mobile information.

Great, thanks!

groundfighter
Registered User
Posts: 1909
Joined: Sat Nov 08, 2003 2:15 am
Location: Las Vegas, NV
Contact:

Feature suggestion

Post by groundfighter » Sat Feb 11, 2006 5:24 am

If this can already be done please point me in the right direction. MarshalRusty was kind enough to help solve this but I am not sure of this feature working under the present conditions. I wanted to have a variable assigned to from my email notify template we could call U_TOPIC_MOBILE
and have direct access to the new message. Is this possible? The present setup does not work.

Code: Select all

$emailer->assign_vars(array(
                     'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
                     'SITENAME' => $board_config['sitename'],
                     'TOPIC_TITLE' => $topic_title,

                     'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
                     'U_TOPIC_MOBILE' => 'http://bjjgroundfigher.com/phpbb/mo' . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
                     'U_STOP_WATCHING_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_TOPIC_URL . "=$topic_id&unwatch=topic") 

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

Re: Feature suggestion

Post by rickey29 » Sat Feb 11, 2006 2:18 pm

groundfighter wrote: If this can already be done please point me in the right direction. MarshalRusty was kind enough to help solve this but I am not sure of this feature working under the present conditions. I wanted to have a variable assigned to from my email notify template we could call U_TOPIC_MOBILE
and have direct access to the new message. Is this possible? The present setup does not work.

Code: Select all

$emailer->assign_vars(array(
                     'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
                     'SITENAME' => $board_config['sitename'],
                     'TOPIC_TITLE' => $topic_title,

                     'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
                     'U_TOPIC_MOBILE' => 'http://bjjgroundfigher.com/phpbb/mo' . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
                     'U_STOP_WATCHING_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_TOPIC_URL . "=$topic_id&unwatch=topic") 

You are welcome to improve/change my code.

While, regarding your issue, I am not sure where you do this change. If you do it in phpbb, it will not work because mophpbb does not use phpbb to new/reply post -- your code will not be used when post from mobile; if you add these code in mophpbb, they are not enough to send an email, please refer phpbb code for detail.

And the "$script_name" is different between phpBB and mophpbb. phpBB uses "viewforum" or "viewtopic", mophpbb uses "forum" or "topic". If you want to continue the coding discussion in detail, please email or PM to me.

Good luck.

groundfighter
Registered User
Posts: 1909
Joined: Sat Nov 08, 2003 2:15 am
Location: Las Vegas, NV
Contact:

Post by groundfighter » Sat Feb 11, 2006 4:18 pm

Thanks for the reply rickey29, this was done in the /includes/functions_post.php (phpbb) basically trying to assign a variable that would allow the person receiving the new topic email to pick up that variable and have a clickable link to the forum message reply.

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

mophpbb Demo

Post by rickey29 » Sun Feb 12, 2006 3:42 am

I will appreciate if someone can share his/her phpBB as a demonstration for mophpbb.
I do not want to create a pure demo phpBB in my web site, because I do not have any content for a new forum, and I do not have time to management it.
Since your forums have more content, more users, and more usage. (And I assume you want to attract more users.) Your forums can help potential mophpbb user to understand it quicker and deeper.
If you want share your forum in this page, please email or PM me your normal forum link, mophpbb link, a short description if possible. You can remove your link any time later if you want.
Thanks in advance.

User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Post by NeoID » Tue Feb 14, 2006 1:10 pm

Sorry, for some reason it became a double-post...
Last edited by NeoID on Tue Feb 14, 2006 1:20 pm, edited 1 time in total.
Norsk Anime Forum
http://www.AnimeNord.com

User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Post by NeoID » Tue Feb 14, 2006 1:18 pm

I've just discovered this mod and it looks really good. However, after I've
tried to install it, following the readme step for step, I only get a blank page
when it's finished:

http://www.animenord.com/forum/mo/

Any ideas? Thanks :)
Norsk Anime Forum
http://www.AnimeNord.com

Post Reply

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