PDA

View Full Version : How to force/redirect mobile users to go to domain.com/forum.php?


XYZ500
01-07-2017, 09:53 AM
I use vBa CMPS. So the home page is not the /forum.php page. I just enabled mobile style from Styles options and made it default so everyone on mobile devices see that. The theme is not responsive and I was losing out on mobile traffic. Now when I go to the site from mobile, it still shows up non-responsive home page but when I go to the /forum.php then it shows the mobile version.

1. How do I force/redirect mobile users to directly go to the /forum.php and not see the home page?
2. How do I remove the clickable link of 'Full Site' at the bottom of the forum?

XYZ500
01-09-2017, 05:15 PM
Anyone?

Dave
01-09-2017, 05:17 PM
1. Implement this script: http://mobiledetect.net/. Add a check in init_startup that checks the current location and then based on that, and the mobile detection, perform the redirection.
2. Mobile style > footer template > remove:
<vb:if condition="$show['quickchooser']">
<li<vb:if condition="$show['forgetpassword']"> class="last"</vb:if>><a href="{vb:raw vboptions.forumhome}/?styleid={vb:raw vboptions.styleid}" class="fullsitelink" rel="external">{vb:rawphrase full_site}</a></li>
</vb:if>

XYZ500
01-09-2017, 06:31 PM
1. Implement this script: http://mobiledetect.net/. Add a check in init_startup that checks the current location and then based on that, and the mobile detection, perform the redirection.
2. Mobile style > footer template > remove:
<vb:if condition="$show['quickchooser']">
<li<vb:if condition="$show['forgetpassword']"> class="last"</vb:if>><a href="{vb:raw vboptions.forumhome}/?styleid={vb:raw vboptions.styleid}" class="fullsitelink" rel="external">{vb:rawphrase full_site}</a></li>
</vb:if>

Thank you, I've downloaded this but couldn't find any installation instructions.
Where do I upload the contents of the folder 'Mobile-Detect-2.8.24' after downloading it?
After uploading these files onto my vB, how do I "add a check in init_startup" as you mentioned?

Thanks a lot!