News:

Wondering if this will always be free?  See why free is better.

Main Menu

Detecting type of device for themes?

Started by bugo348, July 27, 2015, 08:33:39 AM

Previous topic - Next topic

bugo348

I'm new to SMF. I'm using version 2.0.10. I am using the Core theme as my regular theme, and I downloaded the SMF4iPhone theme to use for mobile devices. The themes both work great on their respective devices and browsers, but when I set up the Core theme the phone will show the Core theme and if I set up the iPhone theme the computer will show the iPhone theme. Is there any way to set up SMF to autodetect what type of device is being used? I'd like to set it up to where I can automatically use the Core theme on the computer and the iPhone theme on the phone.

bugo348

This should have been in the 2.0 forum. Sorry.

Kindred

well, first of all - the core theme is WAY outdated... it uses tables for everything and doesn't work with many mods...

second... in order to auto-assign the theme based on desktop vs mobile, you need a mod - it is not part of SMF's default design.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

This can help you
http://custom.simplemachines.org/mods/index.php?mod=3349

You can use it to automatically select a theme for a user using a mobile device but you can also use it just to get $context['device'] which should tell you which device it is ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Jade Elizabeth

Quote from: Kindred on July 27, 2015, 08:51:58 AM
well, first of all - the core theme is WAY outdated... it uses tables for everything and doesn't work with many mods...

second... in order to auto-assign the theme based on desktop vs mobile, you need a mod - it is not part of SMF's default design.

Pretty sure that Curve uses just as many tables as Core, I think you're thinking of 2.1 Curve? :D

Quote from: margarett on July 27, 2015, 09:36:13 AM
This can help you
http://custom.simplemachines.org/mods/index.php?mod=3349

You can use it to automatically select a theme for a user using a mobile device but you can also use it just to get $context['device'] which should tell you which device it is ;)

Ahh great link Margarett!!

I was looking for something else I knew of that detected devices (through html I think?) but I think it must have been a tip/trick which means it's probably outdated...and I remember having issues with it too so probably a good thing I couldn't find it last night but I figured it might be a good starting point if nothing else. Regardless Emanuele is a genius and his mods are bloody epic so I'd choose the mod definitely.

Bugo there is also a mod for this theme specifically which is linked to in the description of the theme: http://custom.simplemachines.org/mods/index.php?mod=2408
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kindred

Jade.... nope.   Core uses almost all tables.

Curve mixes tables with divs and is "better" about the use of tables in many places.

Curve2 is yet even better, of course.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

Please don't name it Curve 2 LOL. Maybe Curve 2.0 or even Bend, Roundy, Helix, Swerve...curlicue LOL.

I hope "Curve 2" has tables only in admin. And only because it's easier that way lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Illori

the name was already decided on, and it is curve2 not curve 2.

Jade Elizabeth

Oh goodness, someone lock me in prison for screwing up a space that I added because I thought Kindred typoed by mistake ha ha.  :P

Not a very original name....why not just leave it as Curve?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Illori

if it was named curve then we would always have to ask the user which version of it they are using... that is why it is named curve2. if we named it curve 2 with the space then users will most likely post they are using the curve theme and then we would tell them no you are not as it does not work with 2.1... just because they forgot to add the 2 after the space in the name.

Advertisement: