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

Reply
 
Thread Tools
Extend and Customise "Mobile" Style Options Details »»
Extend and Customise "Mobile" Style Options
Version: 0.0.10b, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.7.2 Rating:
Released: 06-16-2008 Last Update: 02-24-2009 Installs: 410
Supported Uses Plugins
Is in Beta Stage  

This is an add-on for (and thus requires) the Mobile, Cell, Phone, PDA, iPhone Style.

It adds options to your vBulletin Options for customizing:
  • Optionally adds links to default style (in footer or navbar)
  • Optionally add 'Posted Via Mobile' message to new posts/threads (message can be customised)
  • Optionally display "What's Going On" box in forum home
  • Optionally display Style Chooser in footer
  • Set 'Home' link URL (rather than editing templates)
  • Can hide mobile style from Style Chooser
  • More as suggested ....

Install the latest Mobile style (should have same version number as this addon, but may have a different alpha char on end of version number)

Install this add-on and set your options

Version History
0.0.1
Initial Release
0.0.2
Can't remember what change I made
0.0.3
Added ability to Hide mobile style from style chooser
Fixed bug in display 'Posted by..' message
0.0.10
Synchonised the version number to be the same as the Mobile style version
Added ability to customise link names
Added option to append USERAGENT string to new posts
YOU WILL NEED TO UPDATE TO VERSION 0.0.10 OF THE MOBILE STYLE
0.0.10a
Added section where you can input PHP code to disable some add-ons which you do not wish to run under the mobile style.
0.0.10b
Fixed possibly HTML injection vulnerability.

*This will not work with other styles - it requires Mobile, Cell, Phone, PDA, iPhone Style to be installed!

Show Your Support

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

Comments
  #82  
Old 09-18-2008, 09:01 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #83  
Old 09-27-2008, 12:25 PM
magnaromagna magnaromagna is offline
 
Join Date: Oct 2005
Location: Solarolo, Italy
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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) ?
Reply With Quote
  #84  
Old 09-27-2008, 12:38 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

see here: https://vborg.vbsupport.ru/showthrea...19#post1531419 for mobile adsense integration sample.
Reply With Quote
  #85  
Old 10-11-2008, 03:41 AM
Say3 Say3 is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #86  
Old 10-11-2008, 08:20 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #87  
Old 10-20-2008, 08:41 AM
profanitytalker profanitytalker is offline
 
Join Date: Nov 2006
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserve
Reply With Quote
  #88  
Old 10-26-2008, 10:50 AM
MikeTrin MikeTrin is offline
 
Join Date: Jun 2006
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #89  
Old 10-27-2008, 11:11 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #90  
Old 11-02-2008, 09:03 PM
rcadden rcadden is offline
 
Join Date: Sep 2008
Location: Texas
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to easily put a logo as the header, instead of a text description?
Reply With Quote
  #91  
Old 11-02-2008, 09:37 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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" />
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:31 PM.


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.05001 seconds
  • Memory Usage 2,346KB
  • 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
  • (1)bbcode_html
  • (1)bbcode_php
  • (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
  • (1)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