vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Mobile Device Style Assignment (https://vborg.vbsupport.ru/showthread.php?t=130983)

Dannyloski 07-12-2007 06:22 PM

holy freaking crap! This hack is freaking awesome! I did not know this was possible :up: I will definately install this, just need to get a Wireless Device that has Internet Connection first so I can test it (My Cellphone, doesnt have Internet Enabled) ... I'll borrow my cousin's phone one day and when I do, I'll install this :D

JustJon 07-13-2007 06:12 PM

Quote:

Originally Posted by dartho (Post 1283917)
Sorry JustJon - I'll look into that. What skin are you using?

The Dartho version of Alabama

tteal 07-14-2007 04:29 PM

Works GREAT thanks!

Sebulba 07-15-2007 11:01 AM

I would like mobile users to be able to get back the "normal" skin of the site if they want to. I added a link on the footer with "index.php?styleid=normalstyleID" but it always comes back to the mobile one (I guess because I'm on a mobile platform).
Is there an easy solution ?

slmoney 07-15-2007 06:33 PM

DUDE! This ROCKS!

txspaderz 07-15-2007 10:16 PM

Heck yea it does. Great freakin hack!

txspaderz 07-16-2007 12:58 AM

A feature I would love to see. I way to add our own Agent Strings.

dartho 07-16-2007 01:08 AM

@sebulba - Sorry - this hack forces the style, so a link won't work. If you want to give the users ability to choose mobile style or not, best not to use this hack at all and just let them choose via the style chooser. It may be possible to write another add-on which rather than Force a style, just sets the styleid only once - allowing it to be changed...

@txspaderz - you could edit the :'Detect Mobile Device' plugin vi athe PLugin Manager and add your own - it shouldn't be too hard to follow - you'll see a big list, just add your own UA in teh middle somewhere.

dartho 07-26-2007 10:24 PM

Someone asked about logging mobile page usage - the following may help...

Edit the Detect Mobile Device plugin - in the following section:
Code:

if ($mobile==1)
  {
//      echo "<!-- Mobile Device -->";
      $styleid=$vbulletin->options['mobile_skin'];
  }
  else if ($pda==1)
  {
//      echo "<!-- PDA Device -->";
      $styleid=$vbulletin->options['pda_skin'];
  }
  else if ($except_browser==1)
  {
//      echo "<!-- Excepted Device -->";
  }
  else
  {
//      echo "<!-- No Mobile Device-->";
  }

and add code directly below the "// echo "<!-- Mobile Device -->";" line to do what ever logging you you wanted. An example may be:

PHP Code:

 {
   
$logfile "mobilelog.txt";
   
$ipaddr $_SERVER["REMOTE_ADDR"];
   
$pagevisited $_SERVER["REQUEST_URI"];
   
$newent date('r')." (".$ipaddr.") ".$pagevisited." ".$buffer."\n";
   
$fd fopen($logfile,"a+") or die("ERROR: Can't open file $logfile for append");
   
$fout fwrite($fd$newent);
   
fclose($fd);
 } 



Warning!! Make sure the log file (in this example - mobilelog.txt) exists and is writable first!

alfaowner 08-04-2007 05:14 PM

For some reason I cannot stay logged in? I have cleared all cookies several times too... Seems to happen on the newest upgrade version for me

I am using a black berry

dartho 08-05-2007 08:23 AM

That would be to do with teh Style / Skin rather than this mod - what skin are you using? I'd suggest using https://vborg.vbsupport.ru/showthread.php?t=151186 It may not be the prettiest, but it is the most functional with fewest issues...

alfaowner 08-05-2007 02:11 PM

changed to the mobi one but I guess its my bberry not storing cookies for some reason as it happens on your dartho skin too

nnjj.net 08-06-2007 07:06 PM

is it working on 3.6.8?

MotoUp 08-06-2007 07:17 PM

Quote:

Originally Posted by nnjj.net (Post 1311357)
is it working on 3.6.8?

I am running 3.6.8 with no problems.

nnjj.net 08-07-2007 08:51 AM

thanks buddy I will install it then :)

ZGeek 08-19-2007 10:36 AM

I keep getting "Invalid File Specified" when trying to import on 3.6.8 anyone got a work around?

dartho 08-19-2007 09:03 PM

G'day,
Is this on the "product mobile enabled36 2.1.2.xml" file?

I haven't updated my test site to 3.6.8 yet (still 3.6.7 PL1) but others on 3.6.8 have successfully installed and used it. I'll upgrade my test site today and confirm it's OK

JTS2005 08-20-2007 02:43 AM

Quote:

Originally Posted by MotoUp (Post 1311363)
I am running 3.6.8 with no problems.

the alabama skin isnt working with 3.6.8 atleast for me it isnt.

bigwest 08-27-2007 07:28 PM

<font color="Red">PLEASE NOTE: the following problem IS NOT due to the plugin that is offered in this thread!!!!</font>

I am posting it here because I want to install this plugin (mobile device style assignment) but need to solve the following problem first.


A few months back I installed something that would automatically detect if a user was browser into my site on a cell phone and switch them to a lite template style I had installed on my forum, similar to what the plugin in this thread is intended to do.

Now, I want to get rid of that feature. (so I can install this plugin)

Yet when I go to my installed plugin's I see no such plugin. I guess it's possible it was some type of hack instead of a plugin but for the life of me I can't remember how I did this.

I was hoping maybe somebody here might have an idea of what I did and then be able to help figure out how to get rid of this feature. Where my I look to remove this automatic detection and style switcher?

Thank you in advance for your time!!

dartho 08-27-2007 09:13 PM

@ bigwest - If there are no plug-ins, it could be that you edited the global.php file...
@ ZGeek - no problems under 3.6.8 that I can find
@ JTS2005 - how so? I know others are using it under 3.6.8. I'm not really intending on doing any more work on the alabama dartho skin, but hope to update the mobi skin to be more PDA-centric (the original mobi skin will stay) when I get some more free time

bigwest 08-27-2007 09:44 PM

Quote:

Originally Posted by dartho (Post 1326948)
@ bigwest - If there are no plug-ins, it could be that you edited the global.php file...

That's what I was thinking so I replaced my global.php file with an original but still no luck.

Any other ideas?

Oh and thank you for your response, I really do appreciate it.

dartho 08-28-2007 01:06 AM

You could also check the includes/init.php file. Some style stuff is assigned in here also I believe. Should be a section towards the end of the file - just search "$styleid"

bigwest 08-28-2007 02:29 PM

Quote:

Originally Posted by dartho (Post 1327077)
You could also check the includes/init.php file. Some style stuff is assigned in here also I believe. Should be a section towards the end of the file - just search "$styleid"

I don't see anything in there that looks out of place in that file.

Is there anyway it could be something in the database?

I wonder what would happen if I deleted the mobile style I have installed?

I read earlier in this thread that this plugin detects the iPhone, that is AMAZING!!! That's the main reason I am wanting to solve this problem. I have iPhone users that want to view my site in it's regular form on their iPhone and they can't switch the style.

dbirosel 09-19-2007 11:20 PM

Quote:

Originally Posted by Spika (Post 1277529)
Hello!
I?ve a problem, from mobiles devices works fine, but If ahythig choose dartho Mobile alabama style in a PC, after cannot back to default style, even turn off the browser (IE7 or Firefox), Mobile Style is not default style in ACP. And isn?t possible choose style in dartho mobile alabama skin, I can not view this option.
Thanks in advanced
(sorry for my english)

I'm having this problem too!! Any solution yet???

dbirosel 09-19-2007 11:20 PM

works well in IE and Opera though. Firefox it points to the mobile alabama template.

dartho 09-20-2007 10:22 AM

You will need to add a link somewhere in teh alabama style which points to your default style, if you add something like

<a href=http://www.mydomain.com/index.php?styleid=xx>Default Style</a>

(where xx is teh styleid number of your default style) to your footer template, that will give users a link back to the default home page - of course modify the URL to reflect your own domain/configuration.

Tralala 09-28-2007 04:35 AM

Hi and thanks for the iPhone exclusion support. Now can we please add iPod Touch to the list of excluded devices? :)

User Agent:

Mozilla/5.0 (iPod; U; CPU like Mac OS X; en)
AppleWebKit/420.1 (KHTML, like Gecko)
Version/3.0 Mobile/3A100a Safari/419.3

dartho 09-28-2007 05:02 AM

I think you should be able to add it yourself in the AdminCP. In the "User Agent Exceptions" section it has iPhone by default, if you make it 'iPhone, Mozilla/5.0 (iPod; U; CPU like Mac OS X; en)' that should do it. Any other browsers with that same portion of USERAGENT string would also not be detected as a mobile device either.

ALternatively, you could probably just go with "iPhone, iPod" if no other iPod devices have web browsers in them?

The exceptions just need to be any portion of the user agent string. I would assume that any device with Mozilla/5.0 in teh useragent string should be able to cope with the standard VB styles, so that may be worth trying out also?

dartho 09-28-2007 05:06 AM

Just found the following useragents via google - all apparently from iPhones and an iPod. Common among them are "Mozilla/5.0", "Safari/419" and "AppleWebKit/420" One of these strings would trap both iPhones and iPods
Code:

[28/Feb/2007:23:14:06 +0000] "Mozilla/5.0 (iPhone; U; ARM OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3 Version/3.0 Mobile/241"
[15/Mar/2007:06:17:14 +0000] "Mozilla/5.0 (iPhone; U; XXXXX OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3 Version/3.0 Mobile/241"
[22/Mar/2007:06:39:15 +0000] "Mozilla/5.0 (iPhone; U; XXXXX like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3 Version/3.0 Mobile/241"
[28/Apr/2007:07:50:00 +0100] "Mozilla/5.0 (iPhone; U; PPC like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A001a Safari/419.3"
[15/May/2007:01:00:58 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A523a Safari/419.3"
[28/May/2007:00:00:35 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/418.4"
[12/Jun/2007:04:13:45 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3"
[21/Jun/2007:16:42:06 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A538a Safari/419.3"
[01/Aug/2007:18:23:01 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3"
[22/Aug/2007:03:58:51 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3"
[07/Sep/2007:00:20:48 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko)" - spoof?
[08/Sep/2007:13:54:10 +0100] "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A538b Safari/419.3" - spoof?
[09/Sep/2007:02:32:03 +0100] "Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML,like Gecko) Version/3.0 Mobile/3A100a Safari/419.3"


Tralala 09-28-2007 08:37 AM

Great, thanks dartho... much appreciated.

RaceJunkie 10-10-2007 01:39 PM

Is there anything that can be done about this message?

Out-of-Date Custom Templates Found!

There are currently 13 customized template(s) that need to be updated or reverted. Some sections of vBulletin may not function if you do not do this!

Mobi
editpost
FORUMDISPLAY
modifyoptions
modifysignature
navbar
newreply
newthread
pm_newpm
postbit_deleted
postbit_legacy
SHOWTHREAD
showthread_quickreply
USERCP

dartho 10-10-2007 11:13 PM

If this is this for the Alabama style you can ignore them. You'd be better off going for this skin

edit: which it seems you have already done...

RaceJunkie 10-10-2007 11:16 PM

Quote:

Originally Posted by dartho (Post 1357243)
If this is this for the Alabama style you can ignore them. You'd be better off going for this skin

edit: which it seems you have already done...


I am using this one

dartho 10-11-2007 09:15 PM

This is one of my styles - you can safely ignore the 'out-of-date' messages with this style too. If the warnings annoy you, you can 'edit' the templates and save them without making changes.

RaceJunkie 10-11-2007 10:28 PM

Quote:

Originally Posted by dartho (Post 1357804)
This is one of my styles - you can safely ignore the 'out-of-date' messages with this style too. If the warnings annoy you, you can 'edit' the templates and save them without making changes.

Thanks I love this mod. I have been looking a way to browse my site from my phone and now that is possible.

Aidden 10-13-2007 10:35 PM

I hate making posts like this as I know how hard developers work on their mods, and I dont want to sound like I'm begging for stuff, but I wanted to throw something out.

Unlike others who wanted to use the standard style for an iPod/iPhone, I want a specific style for only an iPod/iPhone.

How hard woudl it be to make/modify this mod to actually add custom inputs after a default was created?

So create a default mobile entry gong to styleID 2, then start entering new lines.

iPhone = StyleID 3
BB 8700 = StyleID 8

etc.....

This seems like it would future proof your mod and eleviate specific requests. Of course I say this coming from an ignorant standpoint of not being a developer and understanding what its going to take.

Spinball 10-14-2007 11:50 AM

Quote:

Originally Posted by Spinball (Post 1175827)
Tested www.avforums.com/forums/index.php with this hack, but this hack doesn't work.
Your site works fine. I'm usinga Nokia N73.
Any ideas before I give up?

Still doesn't work with my Nokia N73. I get the usual style.

dartho 10-14-2007 09:13 PM

I just checked you site - and the "AV Forums for PDAs" is the same as you default skin. Is this the only 'mobile' skin?

Aidden 10-17-2007 05:21 PM

So is adding a 3rd option "ipod" in addition to the PDA and Mobile options difficult to do?

I have been playing with the code and seem to have only screwed things up royally.

Endurer 10-18-2007 07:39 PM

Doesn't work when I have unchecked the 'allow user selection' in style manager. Is there a work around available to get it working without having to allow users to use the mobile style on regular http version.


All times are GMT. The time now is 04:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01895 seconds
  • Memory Usage 1,841KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete