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" />

unicorn2433 11-11-2008 01:50 PM

do I do this through products or through styles?

dartho 11-11-2008 08:12 PM

this is a product which allows customisation (without template edits) of this style.

omanmoon.net 11-22-2008 06:02 AM

mmmmm
now it's not work after upgrade to 3.7.4 PL1

after sign in the page change to white color only !!

before logged in the forum showing no problem ! @_@

caliman 11-28-2008 01:56 PM

I cannot find these plugins: newreply_post_start and newthread_post_start

I have this mod, mobile style and detection installed. All are working properly. Can someone tell me where to find them?

Quote:

Originally Posted by dartho (Post 1578113)
Most of the options would not be compatible with other styles as my Mobile style is coded with this in mind. Which aspects did you wish to apply to your other mobile style?

Edit: Sorry - I jest re-read your post. You could do this by manually editing 2 plugins newreply_post_start and newthread_post_start

Change the code from
Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}

to

Code:

if (($styleid==$vbulletin->options['mo37_mobile_style']) && ($vbulletin->options['mo37_post_text'] != '')){
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n".$vbulletin->options['mo37_post_text']."\n";
}
if ($styleid==XX) {
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n". "Posted via iPhone" ."\n";
}

Change the XX to be the style ID of your iPhone style and "Posted via iPhone" to what ever message you want, or $vbulletin->options['mo37_post_text'] if you want the same message applied as from other mobile devices


caliman 12-02-2008 06:05 AM

How do I change 'Posted via Mobile Device' to 'Posted via iPhone,' 'Posted via Blackberry,' etc.?

dartho 12-02-2008 06:48 AM

delete the text in this field in AdminCP (which in effect disables it) and install THIS add-on

caliman 12-02-2008 06:55 AM

Quote:

Originally Posted by dartho (Post 1676895)
delete the text in this field in AdminCP (which in effect disables it) and install THIS add-on


Thanks a lot!

Quote:

Originally Posted by caliman (Post 1674554)
I cannot find these plugins: newreply_post_start and newthread_post_start

I have this mod, mobile style and detection installed. All are working properly. Can someone tell me where to find them?

Found them.

viper357 12-27-2008 07:44 PM

Installed and working perfectly on 3.6.12

Thanks for the good work.

serpents.guild 01-06-2009 03:51 AM

First I want to thank you for this awesome config addon ... Got this working beautifully @ wap.serpents-guild.com

I was just wondering if you had any further info about disabling addons within the mobile options ... I've added several to teh main page but I just want to clean up the output ... no need for the mobile browser to load wowhead/wardb mouseover scripts and image resizer scripts :)

dartho 01-06-2009 03:56 AM

That depends a lot on the addon and how it's implemented. WHich addon's are you using - if you point me at them I can likely work out how to disable them for the mobile style...

serpents.guild 01-06-2009 04:03 AM

The 2 I'm using are:

The Image Resizer

and

Wowhead Item Tooltips

dartho 01-06-2009 04:22 AM

Add the following in teh disable addons code area to stop the ncode stuff. the tooltips doesn't have a simple enable/disable switch ...

$vbulletin->options['ncode_imageresizer_enabled']=0;

serpents.guild 01-06-2009 04:33 AM

*bam!* like a charm! Thank you so much!

serpents.guild 01-06-2009 08:08 PM

so basically what I can do for further addons is to do a search for "$vbulletin->options" in the product.xml to see if I can disable them in the mobile option page?

dartho 01-06-2009 08:47 PM

With installed products, if it has an option to enable/disable it, you need to find the variable that corresponds to this and then you can set that accordingly.

For example - if an add-on has an option "Enable This Addon", search the xml product file for "Enable This Addon" - you'll find this in teh phrases section - check the phrase name - it will start with "setting" and end with "title" eg. setting_enable_this_addon_title. The variable name will then be enable_this_addon

You can then add a line in teh disable addons code area of:
$vbulletin->options['enable_this_addon']=0;

Be wary that the add-on author may have posed teh question "disable this addon" - in which case we would have.

$vbulletin->options['disable_this_addon']=1;

There are other ways to disable products that don;t have a global enable/disable switch, but it's a bit of a manual process or wrapping conditionals around plugins.

edytwinky 01-30-2009 06:22 PM

Is there a way to enable blogs?

dartho 01-30-2009 08:46 PM

I've not redone any blogs templates in the style, so they will show up using your default style

vol_freak 02-21-2009 04:34 AM

Does this work correctly in 3.8?

dartho 02-21-2009 09:28 AM

Is for me...

CrashPush 02-24-2009 01:07 PM

I had to reinstall this modification and forgot how to add "Wirelessly posted (BlackBerry8300/4.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102)" to the post. Can I get a hint on how to do it again.

dartho 02-25-2009 02:16 AM

First, install the latest version - updated today - overwriting existing (whilst looking at this I noticed a possibly HTML injection vulerability)
Set Mobile post text to be "UA"
Edit Mobile Device Post Footer and Mobile Device Thread Footer plugins and change:
Code:

$vbulletin->options['mo37_post_text'] = $ua_str;
to
Code:

$vbulletin->options['mo37_post_text'] = "Wirelessly posted (" . $ua_str . ")";
or something like that :)

omanmoon.net 02-25-2009 02:27 AM

Hello

i will try,,

Thanks :)

Hornstar 02-25-2009 03:56 AM

Thanks for the update.

Derek_Trotter 02-25-2009 07:35 AM

I update, and it works perfectly on 3.8 !
Is it possible to add option to see who is online?

dartho 02-25-2009 08:45 AM

Quote:

Originally Posted by Derek_Trotter (Post 1754025)
I update, and it works perfectly on 3.8 !
Is it possible to add option to see who is online?

You can choose to enable the "What's Going On" box in forum home which will show you who is online.

Also, there is a 'mobile firendly' (although rather simple) who's online page (there's just no longer a link to it) you can manually type/click in online.php to view or possible edit the footer template to add a link?

SuperJETT 02-25-2009 09:40 AM

Thanks for the security update.

CrashPush 02-26-2009 01:40 AM

Quote:

Originally Posted by dartho (Post 1753840)
First, install the latest version - updated today - overwriting existing (whilst looking at this I noticed a possibly HTML injection vulerability)
Set Mobile post text to be "UA"
Edit Mobile Device Post Footer and Mobile Device Thread Footer plugins and change:
Code:

$vbulletin->options['mo37_post_text'] = $ua_str;
to
Code:

$vbulletin->options['mo37_post_text'] = "Wirelessly posted (" . $ua_str . ")";
or something like that :)

Perfect again! Thanks very much for your help.

But one more thing. The update changed the code somewhat and I can't figure out how to make the UA post look like this:

Code:

Wirelessly posted (BlackBerry8300/4.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102)

With the original post/message here.


dartho 02-26-2009 01:53 AM

ah - try soemthing like this:

change
PHP Code:

$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "\n""[size=1][i]" $vbulletin->options['mo37_post_text']. "[/i][/size]" "\n"

to
PHP Code:

$vbulletin->GPC['message'] = "[size=1][i]" .  $vbulletin->options['mo37_post_text'] . "\n" . ."\n" "[/i][/size]" $vbulletin->GPC['message']; 

in the same 2 plugins as before

rowitech 03-01-2009 10:40 AM

Could you please give me a hint how to install it? It's some days ago since I installed it :sorry:.
Best regards
Rolf

dartho 03-01-2009 08:45 PM

  1. Save the product-moboptions37-0.0.10b.xml file to your local computer
  2. Go into your sites AdminCP
  3. Navigate the Product Manager in the Plugins and Products section
  4. At the end of that page (in the right pane) click on the [Add/Import Product] link
  5. In the Import Product screen, click the Browse button and then locate and open where you save the XML file
  6. Click the Yes radio control in the Allow Overwrite option
  7. Click teh Import button

I think that's about it - you should now have a new section in vBulletin Options called Mobile Style Options where you can set and modify options


All times are GMT. The time now is 12:54 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.01450 seconds
  • Memory Usage 1,869KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (5)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