Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UA Theme
#1
Hello everyone! It's been a long time since I last created a plugin for MyBB. This one I'm a bit surprised I haven't seen yet (or perhaps I just didn't look hard enough) so I spent a couple of hours to make it.

What is it? A plugin that allows user-agent-specific theme overrides. This means that you can have your guests viewing the site on, say, a mobile browser see it in a theme that is best suited for their device.

It is based on regexes, so you have a great deal of control over what browsers get what theme. If a browser doesn't have a theme override, it just goes back to normal theme loading mode.

Note that it will use a theme even if a user normally isn't able to even see it.

I've included some common regexes in the readme file, so don't worry if you don't know how to do them.

Link: http://mods.mybboard.net/view/ua-theme (put in by polar)
[Image: LogoO.png]
Reply
#2
nice... i will try this..
Thanks.
Reply
#3
Yes! Thank you, its amazing Smile
I'm not here often, shoot a PM or whatever if you want my discord.
Reply
#4
Nice work....
Reply
#5
Thanks, polar. I posted that at 4AM and shortly after I clicked the post button I realized I forgot any links or description of where to find it.

Ideally you'll only need a few regexes: One set for text-only browsers like Lynx, and a set for mobile browsers like the iPhone's Safari. You can use it however you want, though.

The plugin is so simple, most likely any updates will be to pretty it up. Right now there are a couple of cases where it will silently fail if you try to do something to a nonexistant regex, which isn't too much of a problem but might bug some people. I also might move the 'add new' link to the top of the list if people want me to.
[Image: LogoO.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)