• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XFStop Mobile Style

Russ

Well-known member
Looks good. It would be interesting to know if portal pages can be viewed via the mobile skin.
I'd probably have to do a bit of customization for it, but that is what the 3rd post will be for. The main style will work with a default install of XenForo, anything extra I support will be added onto the third post in this thread.
 

TNCclubman

Well-known member
If you put this in the head, it should jump to that style if people are on an iphone style # is the xfstop mobile style #

<script type="text/javascript">
<!--
var agent = navigator.userAgent.toLowerCase();
var iphone = ((agent.indexOf('iphone'))!=-1);
if (iphone) {
window.location = "http://www.yoursite.com/misc/style?style_id=2";
}
//-->
</script>

Where is the head remplate to add this though?
 

kingston

Well-known member
This is great! If there was a way to go to a sub domain or directory so this is the style loaded but not saved as a default for users would be great!
 

Russ

Well-known member
Well from my research there's tons of different agents out there that identify phones, in your case TNCclubman I believe that works for iPhone users only.

If you plug that into PAGE_CONTAINER in your default style it may work, tell me how it goes.


Also, with mydomain.com/m/ a redirect could work somehow setting it through the control panel or the .htaccess, however I'm not to familiar with this sort of thing. I did attempt using xfstop.com/m/ however XenForo is acting as if /m/ is part of the software and is redirecting to an error page.
 

TNCclubman

Well-known member
If you put this in the head, it should jump to that style if people are on an iphone style # is the xfstop mobile style #

<script type="text/javascript">
<!--
var agent = navigator.userAgent.toLowerCase();
var iphone = ((agent.indexOf('iphone'))!=-1);
if (iphone) {
window.location = "http://www.yoursite.com/misc/style?style_id=2";
}
//-->
</script>

Where is the head remplate to add this though?
Ok found it, its in the PAGE_CONTAINER template.

But this code works on a regular html site, but for some reason, it keeps looping when it tries to go to the style when you access the site with this code in it on my iphone, anyone have any ideas?
 

TNCclubman

Well-known member
damn, cant get my autoforward script to work for my members iphones. It works for my other site with that javascript.

why wouldnt it work when i put the same code in the page container of xenforo?
 

Russ

Well-known member
Definitely a good start.
Looking on my Droid. Post New Thread should be a little smaller.
The header shows a broken image.
May be better if the thread title went all the way across.

http://forum.318ti.org/index.php

Crap, forgot the arrow on the package, for a quick fix until I upload next version, save the attached image, and upload to:

styles/default/xenforo/images/

Also guys it appears my hosting has taken a dump for the first time in awhile, great timing, it's very sparatic for me right now so bare with me.

Steven which thread title are you refering too? Like the list of threads?

I'll look into the button, probably end up doing a simple link.
 

Attachments

kingston

Well-known member
The only thing I don't like is a user has to choose to switch their default style. There may be no way to do it, but if it was setup so that you could only see the forum through the default style when you visite mobile.yoursite.com and when you go to the normal site at yoursite.com it is formatted for a computer. That way the user wouldn't have to set the style back and forth.

If you can figure that out I will definitely be using this (and donating!)
 

Russ

Well-known member
I think it's great....

Any plans to create a mobile app for admin? That would be cool.
To be honest I haven't looked too much in to styling of the admin cp. I thought you had to have debug mode on to make changes there which wouldn't serve a good purpose for this style.
 
Top