MyBB Community Forums

Full Version: I think this will work to make MYBB Default Mobile Friendly?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I believe this will work but need some help.

Add redirects in the MYBB headers based on screen resolution. Small screens are automatically redirected to the Lite/Archive version, which is mobile friendly according to Google.

1. Where should the redirect code be placed in the default template/theme?

2. Which is best, a php redirect or javascript redirect in this situation?

3. How and where can a header be added to all the archive pages?

4. Are there any issues with redirects like server load, etc?


Unless I'm missing something, I think this is a fairly easy way to make MYBB's default theme responsive "enough"? There is already a mobile friendly version available, it's a matter of getting the mobile users to view that version.

Also need to know, what's the MYBB code that needs to be inserted into the URL in the redirect script so that the correct MYBB is added?

document.location = "YOUR-MOBILE-SITE.com";

$location='YOUR-MOBILE-SITE.com/index.php';
Have you tried the following?
https://community.mybb.com/thread-166664.html

Quote:Where should the redirect code be placed in the default template/theme?

Try within the headerinclude template.

Quote:Which is best, a php redirect or javascript redirect in this situation?

I would say that a javascript or html redirect.

Quote:How and where can a header be added to all the archive pages?

All archive pages already include a header.

Quote:Are there any issues with redirects like server load, etc?

Probably with PHP redirects (server loads I mean).

Quote:I think this will work to make MYBB Default Mobile Friendly?

Probably, but I would guess there are easier ways to achieve.