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


All times are GMT. The time now is 01:51 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.02532 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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