Page 5 of 5

Re: Making phpBB3 Mobile Compatible

Posted: Wed Jan 13, 2010 7:05 pm
by vellatechie
I have installed quick reply and handyman chat on my forums lite version theme.. can anyone temme if its any good??

http://www.phpbb.com/rules/#rule6a

I knwo i need to probably reduce the font size to something like .75em or something but any suggestion will be will be appreciated :)

Re: Making phpBB3 Mobile Compatible

Posted: Wed Mar 17, 2010 9:04 pm
by mcjambi
Sorry my english is very bad but i have a questtion:
if u can detect hand device so it can change style? or redirected where? because i have hand device theme but do not know how to change, just by hand?
please help me!
http://www.phpbb.com/rules/#rule6a

Re: Making phpBB3 Mobile Compatible

Posted: Fri Mar 19, 2010 1:47 am
by Pony99CA
mcjambi wrote:Sorry my english is very bad but i have a questtion:
if u can detect hand device so it can change style? or redirected where? because i have hand device theme but do not know how to change, just by hand?
You can write a JavaScript browser detector or you can use CSS. On my main site, I use the following CSS:

Code: Select all

<link rel="STYLESHEET" type="text/css" href="./styles/svppc-handheld.css" media="handheld" />
I put that below my main CSS links and let the browser figure out if the device is handheld or not.

If you need something more specific that can work with different screen sizes, you'll have to use a JavaScript browser/screen size detector.

Steve

Re: Making phpBB3 Mobile Compatible

Posted: Thu Sep 16, 2010 8:29 am
by sadiaaa
is this code will automatically detect mobile and what will be the theme if it will detect mobile?

Re: Making phpBB3 Mobile Compatible

Posted: Thu Sep 16, 2010 5:39 pm
by phpsingh
awesome info in here, thanks much.

Re: Making phpBB3 Mobile Compatible

Posted: Tue Oct 05, 2010 5:13 pm
by cwallace
So how does this effect the style you are using?

I see no difference between my computer browser and my cell browser.

I would like to detect and redirect to a different layout for the cell phone, but I don't see any reference to that in this detection option.

I already direct cell users on the main page (outside of the forums) to a mobile version of our site.

Chris

Re: Making phpBB3 Mobile Compatible

Posted: Wed Oct 13, 2010 12:58 am
by Pony99CA
cwallace wrote:So how does this effect the style you are using?

I see no difference between my computer browser and my cell browser.

I would like to detect and redirect to a different layout for the cell phone, but I don't see any reference to that in this detection option.

I already direct cell users on the main page (outside of the forums) to a mobile version of our site.
Using a CSS Handheld style (look earlier in the topic) is a good first attempt unless you want to try to support different styles for different mobile devices.

Steve

Re: Making phpBB3 Mobile Compatible

Posted: Thu Oct 14, 2010 4:59 pm
by YukataNinja
I don't know if someone has already figured this out, but I had been wondering how to get one single forum to assign different styles for multiple domains or subdomains. This way I can assign a mobile subdomain like m.mydomain.com to be a mobile style and if the user wants full version they just go to http://www.mydomain.com.

I found out how to do this by looking at a similar solution for WordPress (http://wordpress.org/extend/plugins/domain-theme/). It's much simpler than I thought it would be. You can use the php function $_SERVER['HTTP_HOST']. For some people they may need to use $_SERVER['SERVER_NAME'] (I think if your host is behind a proxy or something). To find which you need write a simple php script and run it on your host.

test.php

Code: Select all

<?php
echo 'HTTP_HOST = ' . $_SERVER['HTTP_HOST'] . ', SERVER_NAME = ' . $_SERVER['SERVER_NAME'];
?>
To get this working you'll need the ID number for the theme you want. You could code this smarter but I'm lazy. To get the ID number, log into ACP, go to styles, and click on the details for the style you want to use. Now look at the URL that you just navigated to, the ID of the theme is in the URL where &id=## (should be something like 1 through 100).

Now open your style.php
Find

Code: Select all

	if (!$user)
	{
		$id			= ($id) ? $id : $config['default_style'];
//		Commented out because calls do not always include the SID anymore
//		$recompile	= false;
		$user		= array('user_id' => ANONYMOUS);
	}
Add after

Code: Select all

	if (strtolower($_SERVER['HTTP_HOST']) == 'mysubdomain.mydomain.com')
	{
		$id = ##;
	}
Change the above mysubdomain.mydomain.com to your subdomain/domain. Change the above ## to your style id number you want to use.

Now open includes/session.php
Find

Code: Select all

		else
		{
			// Set up style
			$style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
		}
Add after

Code: Select all

		if (strtolower($_SERVER['HTTP_HOST']) == 'mysubdomain.mydomain.com')
		{
			$style = ##;
		}
Make the same changes again, mysubdomain.mydomain.com to your domain and ## to the id you want to use.

If you have problems, try the suggestion at the top of this post about using $_SERVER['SERVER_NAME'] instead of $_SERVER['HTTP_HOST'].

Re: Making phpBB3 Mobile Compatible

Posted: Thu Oct 21, 2010 4:09 am
by mbelek
newsbee.........I am sorry to disturb you .. May I ask for your help .. pbpbb mobile version .. .. I'm confused because the language of command ordered destroyed my eng .. please .. love tutor for version STG-Mobile Style) .. if you do not mind .. upload script that already .. let you edit directly replace me .. thanks

Re: Making phpBB3 Mobile Compatible

Posted: Thu Oct 21, 2010 9:17 am
by mbelek
why not replay?

Re: Making phpBB3 Mobile Compatible

Posted: Sun Nov 21, 2010 5:32 pm
by craiga
I am attempting to write my own mobile theme and have found some good information so far in this thread. My mobile style is going to start small and probably wont implement all the PHPBB features, at least not to start with, so i would ideally like to give the visitor the ability to switch to the normal style. Has anyone got any ideas how i could do this?

Re: Making phpBB3 Mobile Compatible

Posted: Sun Nov 21, 2010 7:20 pm
by craiga
craiga wrote:I am attempting to write my own mobile theme and have found some good information so far in this thread. My mobile style is going to start small and probably wont implement all the PHPBB features, at least not to start with, so i would ideally like to give the visitor the ability to switch to the normal style. Has anyone got any ideas how i could do this?
I realised that you can simply add in the parameter style=x in the URL. The forums append_sid function seems to handle the change throughout the session. Nice

Re: Making phpBB3 Mobile Compatible

Posted: Fri Feb 11, 2011 6:56 am
by MasterEvilAce
craiga wrote:
craiga wrote:I am attempting to write my own mobile theme and have found some good information so far in this thread. My mobile style is going to start small and probably wont implement all the PHPBB features, at least not to start with, so i would ideally like to give the visitor the ability to switch to the normal style. Has anyone got any ideas how i could do this?
I realised that you can simply add in the parameter style=x in the URL. The forums append_sid function seems to handle the change throughout the session. Nice
This does seem to be the case, but only if you're logged in.. if you're a guest this does not seem to work. How can I make this work for guests?

Re: Making phpBB3 Mobile Compatible

Posted: Sun Feb 13, 2011 10:30 pm
by max-li
@YukataNinja, or anyone else


I see the edits, and I can do dem, but it's not clear to me how that should work. what files do I have to put in the directory of the subdomain? a copy of the hole board?

If anyone could help me on that, that would be great.

Re: Making phpBB3 Mobile Compatible

Posted: Fri Aug 24, 2012 8:31 pm
by mvmsk
max-li wrote:@YukataNinja, or anyone else


I see the edits, and I can do dem, but it's not clear to me how that should work. what files do I have to put in the directory of the subdomain? a copy of the hole board?

If anyone could help me on that, that would be great.
yes its the same doubt for me.

should i copy all the board files into the subdomain ?

ps: This is what i understood.

1. Original forum url: mydomain.com
2. use mobile detection and redirect to mysubdomain.mydomain.com
3. in mysubdomain.mydomain.com i should place whole forum files with some mobile theme activated.

Is this correct?