How can i auto switch forum according to theme tid?
(2021-07-13, 04:10 AM)WallBB Wrote:
(2021-07-12, 10:35 PM)The pwince Wrote:
(2021-07-12, 03:00 PM)WallBB Wrote:
(2021-07-12, 04:56 AM)The pwince Wrote:
(2021-07-12, 03:16 AM)WallBB Wrote: Use the XTheme plugin, it allows you to do this


I have been following all your thread supports and release and i must say that you're genius.

Please my request is that, i need the function to work automatically because i have 2 theme on one mybb forum classifying each theme as my mobile and desktop theme (ps. i dont want to us mybb gomobile plugin)

Yes, I already understand your request, you will need to use the above plugin to allow changing theme using theme id.
By default, you will not be able to redirect your users to a particular theme link.

Now there are multiple ways to redirect your website depending on user agent.

One simple method could be this

if( /Android|iPhone|webOS|iPad|iPod|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    window.location = "YOUR_MOBILE_THEME_LINK"; 

Or you can also use Mobile redirection library's that will redirect to your mobile link


Thanks for the code but can you please explain how i can get mybb theme link and also explain the Xtheme plugin like how do i set it up after activating the plugin since i can't find it.
It is written in the Xtheme details (

XTheme allows you to change your themes with links like

ThemeID is your themeID

From the sample link you gave for xtheme, I tried it and it works but my main problem is detecting mobile and desktop version the user is using and automatically show them respectively of the browser user agent, okay I tried the code you gave but it didn't work rather is dynamically refreshing the page or it didn't work, please any help to show user theme id base on browser? 

Thanks in addy

Messages In This Thread
RE: How can i auto switch forum according to theme tid? - by The pwince - 2021-07-13, 07:38 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)