vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - Extend and Customise "Mobile" Style Options (https://vborg.vbsupport.ru/showthread.php?t=182692)

dartho 09-18-2008 09:01 PM

Sorry - this has no mobile detection - it only adds a few customisable options the the mobile style. If you also want autodetection, you will need to use thjis one https://vborg.vbsupport.ru/showthread.php?t=173239 for now.

magnaromagna 09-27-2008 12:25 PM

Hello,
nice hack, installed.
I'd like to add a php code to the mobile style, like the adsense for mobile as example:

PHP Code:

<?php

$GLOBALS
['google']['ad_type']='text_image';
####
$GLOBALS['google']['format']='mobile_double';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt time();
google_set_screen_res();

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 $_SERVER['HTTP_UA_PIXELS'];
  
$delimiter 'x';
  if (
$screen_res == '') {
    
$screen_res $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
    
$delimiter ',';
  }
  
$res_array explode($delimiter$screen_res);
  if (
sizeof($res_array) == 2) {
    
$GLOBALS['google']['u_w'] = $res_array[0];
    
$GLOBALS['google']['u_h'] = $res_array[1];
  }
}

function 
google_get_ad_url() {
  
$google_ad_url 'http://pagead2.googlesyndication.com/pagead/ads?';
  
$google_scheme = ($GLOBALS['google']['https'] == 'on')
      ? 
'https://' 'http://';
  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'host') === 0)
               || (
strpos($param'url') === 0)) {
      
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;
}

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

?>

How can I add it? Thanks! :)

Moreover, where to test the style (sites like ready.mobi) ?

dartho 09-27-2008 12:38 PM

see here: https://vborg.vbsupport.ru/showthrea...19#post1531419 for mobile adsense integration sample.

Say3 10-11-2008 03:41 AM

hi , i what to remove VBSeo archive from mobile style footer , but i don't want to stop VBSeo on mobile style , i mean just disable archive footer links , how ? can you help me plz ?

and can you add an option for do that in next release.

thanx man.

dartho 10-11-2008 08:20 AM

I don't have vbseo - So I'm unsure how it adds to the footer. Is there a vbseo setting to disable archive footer links? If so, you may be able to disable this but adding some php to the 'Disable Addons' section to re-set the option ...

profanitytalker 10-20-2008 08:41 AM

reserve

MikeTrin 10-26-2008 10:50 AM

Is it possible to disable vBadvanced CMPS using the "code here to disable addons" feature? I spent a while looking around and couldn't find xml to disable the product.

My goal is to remove the sidebar I've integrated into the forum when using the mobile style.

dartho 10-27-2008 11:11 PM

I can;t see anything yet to do this - I think by the time it gets to style selection VBAdvanced is already integrated.

You could ask at vbadvanced.com if there is a way to turn off integration for a specific style?

rcadden 11-02-2008 09:03 PM

Is there a way to easily put a logo as the header, instead of a text description?

dartho 11-02-2008 09:37 PM

Yes. By default, teh mobile style removes image tags and replaces them with links to teh image. You can choose to remove the replacement variables from teh style and show all images or you could use a slighly diffferent IMG tag so it doesn;t get replaced. For example you can edit the header templates and put in images. However, when using the IMG tag, use in the format of:
HTML Code:

<img border="0" src="image.jpg" />


All times are GMT. The time now is 04:21 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.01392 seconds
  • Memory Usage 1,775KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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