Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Styles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mobile, Cell, Phone, PDA, iPhone Style Details »»
Mobile, Cell, Phone, PDA, iPhone Style
Version: 0.0.10a, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.7.2 Rating:
Released: 03-27-2008 Last Update: 07-27-2008 Installs: 1045
Supported
Additional Files Translations Is in Beta Stage  

vBulletin 4.0 version here: https://vborg.vbsupport.ru/showthread.php?t=228986

A very cut back style with very low bandwidth usage which renders well on pretty much all small screen devices from old Nokias to new iPhones.
  • Supports viewing/posting/replying in forums
  • Supports Private Messaging
  • Supports Tags (viewing, not adding)
  • Supports viewing and replying to messages in Social Groups
  • Supports Thread Prefixes
  • has an add-on product to customise here: Extend and Customise Mobile Style (It is recommended that you install this also, but not required)
  • Supports other stuff too ....

Notes
  • If you are installing this on a vBulletin version higher than the current 'supported' version, and wish to get rid of the Out-of-Date Custom Templates Found! errors, see Post #329 for more information...
  • I suggest you also install this add-on to this style to get more out of it...
  • To modify the colour scheme of this style, you have to edit the wireless.css file by hand
  • If you use a portal such as vbadvanced which you wish to disable in mobile style, see here

Release Information
  • Version 0.0.1 - Initial release ported from my 3.6 version here
  • Version 0.0.2 - Added auto quoting when replying to a post
    - fixed "Up" link bug
    - Added 'Posted via Mobile Device' message to new posts
    - couple small non - critical bugs fixed in some links
  • Version 0.0.3 - No change other than change version to 3.7RC2
  • Version 0.0.4 - Updated with security tokens tages for forms submital, and Gold version
  • Version 0.0.5 - fixed navbar template "Home" link (you will need to edit this if your default forum page is not index.php)
  • Version 0.0.6 - added ad_hook locations, fixed page titles, fixed couple small bugs
  • Version 0.0.7 - Added Style chooser to UserCP, Post count to threads, Search Page, Attachment Sizes, More detailed time info, viewing/voting in polls, other stuff too probably
  • Version 0.0.8 - now has an addon to customise certains aspects of this style - see HERE
  • Version 0.0.9 - updated template version numbers to to 3.7.2 - no other changes have been made
  • Version 0.0.10 - Now Fully Phrased (thanks Keyser Soze) Other updates included so its add-on product can do more customization
    Both this style and the addon will have the same version numbers - it's best to make sure you update the add-on when updating the style.
  • Version 0.0.10a - fixed small bug in footer template

Install Instructions
  • Save attached XML to your local computer
  • Save attached wireless.css.txt, rename to wireless.css and upload to your forum root
  • In AdminCP go to "Styles and Templates"
  • In the "Import Style XML File" section browse to where you saved the XML
  • Click "Import" button
  • Come back to this page and click "Mark as Installed"
Other useful Add-ons to use in Conjunction with this styleOther Mobile Styles worth checking out

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #732  
Old 11-16-2009, 02:55 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by testbot View Post
you have to create it.

here. below is my setup. you should only have to change the styleid to your mobile styleid (this will make it so the plugin only runs when it's mobile - less is better) and your google options. i marked the parts you should change.

Create Plugin
Product: vBulletin
Hook Location: global_start
Title: Mobile AdSense Top
Execution Order: 5
Plugin PHP Code:
Code:
/*** Change to your mobile style id ***/
if ($styleid==20){
/*** End Change to your mobile style id ***/
	function read_global($var) {
	  return isset($_SERVER[$var]) ? $_SERVER[$var]: '';
	}

	function google_append_url(&$url, $param, $value) {
	  $url .= '&' . $param . '=' . urlencode($value);
	}

	function google_append_globals(&$url, $param) {
	  google_append_url($url, $param, $GLOBALS['google'][$param]);
	}

	function google_append_color(&$url, $param) {
	  global $google_dt;
	  $color_array = split(',', $GLOBALS['google'][$param]);
	  google_append_url($url, $param,
			    $color_array[$google_dt % sizeof($color_array)]);
	}

	function google_set_screen_res() {
	  $screen_res = read_global('HTTP_UA_PIXELS');
	  if ($screen_res == '') {
	    $screen_res = read_global('HTTP_X_UP_DEVCAP_SCREENPIXELS');
	  }
	  if ($screen_res == '') {
	    $screen_res = read_global('HTTP_X_JPHONE_DISPLAY');
	  }
	  $res_array = split('[x,*]', $screen_res);
	  if (sizeof($res_array) == 2) {
	    $GLOBALS['google']['u_w'] = $res_array[0];
	    $GLOBALS['google']['u_h'] = $res_array[1];
	  }
	}

	function google_set_muid() {
	  $muid = read_global('HTTP_X_DCMGUID');
	  if ($muid != '') {
	    $GLOBALS['google']['muid'] = $muid;
	  }
	  $muid = read_global('HTTP_X_UP_SUBNO');
	  if ($muid != '') {
	    $GLOBALS['google']['muid'] = $muid;
	  }
	  $muid = read_global('HTTP_X_JPHONE_UID');
	  if ($muid != '') {
	    $GLOBALS['google']['muid'] = $muid;
	  }
	  $muid = read_global('HTTP_X_EM_UID');
	  if ($muid != '') {
	    $GLOBALS['google']['muid'] = $muid;
	  }
	}

	function google_get_ad_url() {
	  $google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
	  foreach ($GLOBALS['google'] as $param => $value) {
	    if ($param == 'client') {
	      google_append_url($google_ad_url, $param,
				'ca-mb-' . $GLOBALS['google'][$param]);
	    } else if (strpos($param, 'color_') === 0) {
	      google_append_color($google_ad_url, $param);
	    } else if (strpos($param, 'url') === 0) {
	      $google_scheme = ($GLOBALS['google']['https'] == 'on')
		  ? 'https://' : 'http://';
	      google_append_url($google_ad_url, $param,
				$google_scheme . $GLOBALS['google'][$param]);
	    } else {
	      google_append_globals($google_ad_url, $param);
	    }
	  }
	  google_append_url($google_ad_url, 'dt',
			    round(1000 * array_sum(explode(' ', microtime()))));
	  return $google_ad_url;
	}
/**** YOUR SETTINGS ***/
	$GLOBALS['google']['ad_type']='text_image';
	$GLOBALS['google']['channel']='xxxx';
	$GLOBALS['google']['client']='pub-xxxx';
	$GLOBALS['google']['color_border']='336699';
	$GLOBALS['google']['color_bg']='FFFFFF';
	$GLOBALS['google']['color_link']='0000FF';
	$GLOBALS['google']['color_text']='000000';
	$GLOBALS['google']['color_url']='008000';
	$GLOBALS['google']['format']='mobile_single';
	$GLOBALS['google']['https']=read_global('HTTPS');
	$GLOBALS['google']['ip']=read_global('REMOTE_ADDR');
	$GLOBALS['google']['markup']='chtml';
	$GLOBALS['google']['oe']='utf8';
	$GLOBALS['google']['output']='chtml';
/*** END YOUR SETTINGS ***/	
	$GLOBALS['google']['ref']=read_global('HTTP_REFERER');
	$GLOBALS['google']['url']=read_global('HTTP_HOST') . read_global('REQUEST_URI');
	$GLOBALS['google']['useragent']=read_global('HTTP_USER_AGENT');	
	$google_dt = time();
	google_set_screen_res();
	google_set_muid();

	$google_ad_handle = @fopen(google_get_ad_url(), 'r');
	if ($google_ad_handle) {
	  while (!feof($google_ad_handle)) {
	    $mobile_ad_top .= fread($google_ad_handle, 8192);
	  }
	  fclose($google_ad_handle);
	}
}

Styles & Templates> Style Manager>Ad Location Templates>ad_navbar_below & ad_footer_start
Code:
<div>
	<!-- Mobile Ad -->
	$mobile_ad_top
	<!-- /Mobile Ad -->
</div>
I added this plugin and modified templates in my mobile style exactly as described but see no mobile ads. How doe the $mobile_ad_top get connected with the plugin? That might be the part I am missing.
Reply With Quote
  #733  
Old 11-16-2009, 04:24 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wacnstac View Post
I added this plugin and modified templates in my mobile style exactly as described but see no mobile ads. How doe the $mobile_ad_top get connected with the plugin? That might be the part I am missing.
with the line
Code:
 $mobile_ad_top .= fread($google_ad_handle, 8192);
it's already there so don't worry about it.

the ads don't show up right away. check on it once in a while and see if it starts showing soon.
Reply With Quote
  #734  
Old 11-16-2009, 05:14 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, this is what I ended up with:

PHP Code:
/*** Change to your mobile style id ***/
if ($styleid==104){
/*** End Change to your mobile style id ***/
    
function read_global($var) {
      return isset(
$_SERVER[$var]) ? $_SERVER[$var]: '';
    }

    function 
google_append_url(&$url$param$value) {
      
$url .= '&' $param '=' urlencode($value);
    }

    function 
google_append_globals(&$url$param) {
      
google_append_url($url$param$GLOBALS['google'][$param]);
    }

    function 
google_append_color(&$url$param) {
      global 
$google_dt;
      
$color_array split(','$GLOBALS['google'][$param]);
      
google_append_url($url$param,
                
$color_array[$google_dt sizeof($color_array)]);
    }

    function 
google_set_screen_res() {
      
$screen_res read_global('HTTP_UA_PIXELS');
      if (
$screen_res == '') {
        
$screen_res read_global('HTTP_X_UP_DEVCAP_SCREENPIXELS');
      }
      if (
$screen_res == '') {
        
$screen_res read_global('HTTP_X_JPHONE_DISPLAY');
      }
      
$res_array split('[x,*]'$screen_res);
      if (
sizeof($res_array) == 2) {
        
$GLOBALS['google']['u_w'] = $res_array[0];
        
$GLOBALS['google']['u_h'] = $res_array[1];
      }
    }

    function 
google_set_muid() {
      
$muid read_global('HTTP_X_DCMGUID');
      if (
$muid != '') {
        
$GLOBALS['google']['muid'] = $muid;
      }
      
$muid read_global('HTTP_X_UP_SUBNO');
      if (
$muid != '') {
        
$GLOBALS['google']['muid'] = $muid;
      }
      
$muid read_global('HTTP_X_JPHONE_UID');
      if (
$muid != '') {
        
$GLOBALS['google']['muid'] = $muid;
      }
      
$muid read_global('HTTP_X_EM_UID');
      if (
$muid != '') {
        
$GLOBALS['google']['muid'] = $muid;
      }
    }

    function 
google_get_ad_url() {
      
$google_ad_url 'http://pagead2.googlesyndication.com/pagead/ads?';
      foreach (
$GLOBALS['google'] as $param => $value) {
        if (
$param == 'client') {
          
google_append_url($google_ad_url$param,
                
'ca-mb-' $GLOBALS['google'][$param]);
        } else if (
strpos($param'color_') === 0) {
          
google_append_color($google_ad_url$param);
        } else if (
strpos($param'url') === 0) {
          
$google_scheme = ($GLOBALS['google']['https'] == 'on')
          ? 
'https://' 'http://';
          
google_append_url($google_ad_url$param,
                
$google_scheme $GLOBALS['google'][$param]);
        } else {
          
google_append_globals($google_ad_url$param);
        }
      }
      
google_append_url($google_ad_url'dt',
                
round(1000 array_sum(explode(' 'microtime()))));
      return 
$google_ad_url;
    }
/**** YOUR SETTINGS ***/
    
$GLOBALS['google']['ad_type']='text_image';
    
$GLOBALS['google']['channel']='6003111928';
    
$GLOBALS['google']['client']='pub-6979534990239193';
    
$GLOBALS['google']['color_border']='336699';
    
$GLOBALS['google']['color_bg']='FFFFFF';
    
$GLOBALS['google']['color_link']='0000FF';
    
$GLOBALS['google']['color_text']='000000';
    
$GLOBALS['google']['color_url']='008000';
    
$GLOBALS['google']['format']='mobile_single';
    
$GLOBALS['google']['https']=read_global('HTTPS');
    
$GLOBALS['google']['ip']=read_global('REMOTE_ADDR');
    
$GLOBALS['google']['markup']='chtml';
    
$GLOBALS['google']['oe']='utf8';
    
$GLOBALS['google']['output']='chtml';
/*** END YOUR SETTINGS ***/    
    
$GLOBALS['google']['ref']=read_global('HTTP_REFERER');
    
$GLOBALS['google']['url']=read_global('HTTP_HOST') . read_global('REQUEST_URI');
    
$GLOBALS['google']['useragent']=read_global('HTTP_USER_AGENT');    
    
$google_dt time();
    
google_set_screen_res();

$find='"';
$replace="'";
$googlemad '';  
    
google_set_muid();

    
$google_ad_handle = @fopen(google_get_ad_url(), 'r');
    if (
$google_ad_handle) {
      while (!
feof($google_ad_handle)) {
    
$googlemad .= fread($google_ad_handle8192);
  }
  
fclose($google_ad_handle);
}

$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);  


and in my templates ad_footer_start, ad_navbar_below
PHP Code:
<div>
    <!-- 
Mobile Ad -->
    
$googlemad
    
<!-- /Mobile Ad -->
</
div
But still no cigar. Don't know what I am doing wrong.
Reply With Quote
  #735  
Old 11-16-2009, 05:55 PM
testbot testbot is offline
 
Join Date: Feb 2009
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm not sure why you had to change anything except for what's marked to change in the code. either way, mine didn't start showing until the next day for some reason.

gluck.
Reply With Quote
  #736  
Old 11-21-2009, 01:08 PM
Byggahus Byggahus is offline
 
Join Date: May 2007
Location: Lomma, Sweden
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for a great mobile skin dartho! But everything becomes tiny when viewing it from an iPhone. How can I make the text size in the forum in a more readable size (without needing to resize it with two fingers myself)? http://mobil.byggahus.se
Reply With Quote
  #737  
Old 11-21-2009, 07:13 PM
Byggahus Byggahus is offline
 
Join Date: May 2007
Location: Lomma, Sweden
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...while the text wraps better and is more readable on my sons small Sony Ericsson W890i mobile screen.
Reply With Quote
  #738  
Old 11-21-2009, 09:28 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try editing the wireless.css file, and remove all the "size" declarations

doing a search and replace on "size:1;" for NULL (ie. nothing) should do that for you pretty easily
Reply With Quote
  #739  
Old 11-22-2009, 10:23 AM
Byggahus Byggahus is offline
 
Join Date: May 2007
Location: Lomma, Sweden
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried that. Replaced "size:1;" with NULL at 22 places in wireless.css. It didn't work. The result is the same both in the iPhone (and on my sons W890i). Any other clues?

The problem seems to be that Safari in the iPhone thinks that the width of the page is twice the width of the longest named forum.
Reply With Quote
  #740  
Old 11-22-2009, 07:59 PM
halkum halkum is offline
 
Join Date: Feb 2006
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Desperately need this and different domain, different style for vb4 when it goes gold. Can't check my forums from my phone at work now.

Sadness.
Reply With Quote
  #741  
Old 11-22-2009, 08:55 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Byggahus View Post
I tried that. Replaced "size:1;" with NULL at 22 places in wireless.css. It didn't work. The result is the same both in the iPhone (and on my sons W890i). Any other clues?

The problem seems to be that Safari in the iPhone thinks that the width of the page is twice the width of the longest named forum.
Try editing the headinclude template and adding the following to the top:
Code:
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
Quote:
Originally Posted by halkum View Post
Desperately need this and different domain, different style for vb4 when it goes gold. Can't check my forums from my phone at work now.

Sadness.
This will be updated to work with vb4 - at least the Forum part of it will be. DDDS should be too.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:52 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05725 seconds
  • Memory Usage 2,389KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete