vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=230)
-   -   Mobile, Cell, Phone, PDA, iPhone Style (https://vborg.vbsupport.ru/showthread.php?t=174375)

m0rgulvale 11-06-2009 11:13 PM

hi does this work on 3.8 series?

thanks!

Mr. W 11-06-2009 11:21 PM

Quote:

Originally Posted by m0rgulvale (Post 1911142)
hi does this work on 3.8 series?

thanks!

___ It works for me, on 3.8.4 .

m0rgulvale 11-06-2009 11:45 PM

it works, but one problem

how do you change the style back? i am not able to access and set option such as the default skin used from within this template, so forced to stick with this one once changing

also don't think its working right with vbseo.. if u click a members username to view their profile, it says they aren't registered on the forum.. might be something w/ rewriting the urls and not working in this template idk

note: want anyone to be able to choose this skin, and switch back to any other skin.. dont want to use the mod to force mobile users to view this based on user agent string

Mr. W 11-07-2009 12:58 AM

Quote:

Originally Posted by m0rgulvale (Post 1911154)
it works, but one problem

how do you change the style back? i am not able to access and set option such as the default skin used from within this template, so forced to stick with this one once changing

Try:

http://www.yoursitenamehere.tld/forum_root/?styleid=1

____Assuming you didn't remove the default style, that's the ID number of the default style. That is, the one that came with VBulletin before you install any extra stuff. If you like, and happen to know the style ID of any other styles you may have installed, you can substitute in that number for the "1."

____Can't remember what the different style IDs are? Just go into the ACP, and then under the Styles & Templates section.

Quote:

Originally Posted by m0rgulvale (Post 1911154)
also don't think its working right with vbseo.. if u click a members username to view their profile, it says they aren't registered on the forum.. might be something w/ rewriting the urls and not working in this template idk

____I don't know what to tell you about that, as I don't use VBSEO. Sorry.

Quote:

Originally Posted by m0rgulvale (Post 1911154)
note: want anyone to be able to choose this skin, and switch back to any other skin.. dont want to use the mod to force mobile users to view this based on user agent string

____Then don't. It's optional. If you don't install the auto-detection thing, then this style will act like the others. In which case, it would be accessed by a URL similar to the following:

http://www.yoursitenamehere.tld/forum_root/?styleid=X

____Where X is the style ID of the mobile style. It's different for each forum that has it installed, so the only way to get the ID number is to log into your ACP. But after you do, then a link similar to that of what I just typed is what your users can use to access the mobile style in particular.

dartho 11-07-2009 01:34 AM

Just as Mr. W says

You could additionally install https://vborg.vbsupport.ru/showthread.php?t=182692 which adds a few more options to this style which can be configured via vBulletin Options

Biker_GA 11-07-2009 04:40 AM

Quote:

Originally Posted by dartho (Post 1911098)
If vBulletin don't add a mobile style of their own (they have hinted that they will on vBulletin.com!), I will attempt to update this enough so that forums work - groups, blogs, albums and other 'social' aspects will be lower down on my list of things to do

That's all my users really care about at the moment (the forums). :)

dartho 11-09-2009 09:05 AM

I have it from a good source that this mobile style is pretty much operational on VB4!

Well usable with a few issues out of the box, but it is almost all the way there and It shouldn;t take me too long to fix up. This applies to forums only - not CMS/Groups/Albums etc. ...

sailnet 11-14-2009 01:27 PM

where does the css file get uploaded to? (what subdirectory)

thanks

dartho 11-14-2009 07:33 PM

your forum root directory

howarde 11-14-2009 08:42 PM

Quote:

Originally Posted by dartho (Post 1911905)
I have it from a good source that this mobile style is pretty much operational on VB4!

Well usable with a few issues out of the box, but it is almost all the way there and It shouldn;t take me too long to fix up. This applies to forums only - not CMS/Groups/Albums etc. ...

Pretty much... yup

wacnstac 11-16-2009 02:55 PM

Quote:

Originally Posted by testbot (Post 1897763)
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.

testbot 11-16-2009 04:24 PM

Quote:

Originally Posted by wacnstac (Post 1915317)
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.

wacnstac 11-16-2009 05:14 PM

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.

testbot 11-16-2009 05:55 PM

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.

Byggahus 11-21-2009 01:08 PM

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

Byggahus 11-21-2009 07:13 PM

...while the text wraps better and is more readable on my sons small Sony Ericsson W890i mobile screen.

dartho 11-21-2009 09:28 PM

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

Byggahus 11-22-2009 10:23 AM

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.

halkum 11-22-2009 07:59 PM

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.

dartho 11-22-2009 08:55 PM

Quote:

Originally Posted by Byggahus (Post 1918801)
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 (Post 1919127)
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.

halkum 11-22-2009 09:23 PM

Quote:

Originally Posted by dartho (Post 1919144)
Try editing the headinclude template and adding the following to the top:
Code:

<meta name="viewport" content="width=device-width,initial-scale=1.0" />

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

I love you.

Seriously, I work 16 hour days and like 14 of them I have no internet access other then my phone which is a Samsung Messenger. It's not that fancy so this was the perfect skin/framework to keep up with my stuff.

Byggahus 11-23-2009 06:12 AM

Thank you dartho, now the style works fine on an iPhone.

dartho 11-24-2009 11:08 AM

Ignoring the arthritis and carpal tunnel flare ups, I've spent the last couple days running through the forum templates and updating to VB4.

I will release here as soon as one or two others have given it a quick once over.

Anyone here got a test site running want to give it a run? reply here

robdawg 11-24-2009 11:14 PM

Anyone able to get this to work with the new vbAdvanced? I am having problems getting this to work on in a subdirectory (/forum/).

Some of the adv_portal template edits do not seem to be helping.

Any help would be greatly appreciated.

Byggahus 11-26-2009 11:40 AM

We will most likely wait with vb4 until release 4.1 so I can unfortunately not test your vb4 update until later on.

dartho 11-26-2009 11:46 AM

thanks, byggahus. I got a few testers, and am moving ahead. Ready to release now pretty much!

Byggahus 11-27-2009 08:50 AM

You probably have full control. But anyway - don't forget the <meta name="viewport" content="width=device-width,initial-scale=1.0" />-fix (or something similar) in the header template. ;)

Biker_GA 11-27-2009 10:59 AM

Quote:

Originally Posted by dartho (Post 1920074)
Ignoring the arthritis and carpal tunnel flare ups, I've spent the last couple days running through the forum templates and updating to VB4.

I will release here as soon as one or two others have given it a quick once over.

Anyone here got a test site running want to give it a run? reply here

I have a test bed set up... Gimme! :D

dartho 11-27-2009 08:54 PM

I just put it up today - https://vborg.vbsupport.ru/showthread.php?t=228986

Biker_GA 11-28-2009 05:57 AM

Sweet! Many thanks!

texasf1racer 11-28-2009 07:47 PM

So this is only an update for vb 4.0? Any chance of releasing a 3.8x version as there are many people not upgrading to 4.0.

Cheers!

dartho 11-28-2009 09:14 PM

this version works fine on 3.8

texasf1racer 11-28-2009 10:13 PM

Perhaps I am mistaken this for something else. I thought there were many templates that needed to be updated for 3.8. My apologies if I am incorrect.

Biker_GA 11-29-2009 12:12 AM

While vB3.8 may complain about needing to update templates, the style still works perfectly fine. I'm using it on my live site and my users love it.

vol_freak 11-29-2009 05:57 AM

Is there any way to allow smiley images to show, but still replace all other images with a link? I'm guessing that's too complex of a scenario.

The only solution I could come up with would be to change the way vbulletin converts the smileys to html. Something like '<img alt="" src="..." /> to escape the replacement varialbes. But I have no clue how to go about it.

dartho 11-29-2009 06:21 AM

Thats right - you can edit the includes/class_bbcode.php file and find and replace as follows - this will be in the file TWICE:

MAKE A BACKUP OF THE FILES BEFORE EDITING!

Code:

if ($this->is_wysiwyg())
                                {
                                        $replace = "<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars_uni($smilie['title']) . "\" smilieid=\"$smilie[smilieid]\" class=\"inlineimg\" />";
                                }
                                else
                                {
                                        $replace = "<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars_uni($smilie['title']) . "\" class=\"inlineimg\" />";
                                }

and replace with

Code:

if ($this->is_wysiwyg())
                                {
                                        $replace = "<img border=\"0\" alt=\"\" title=\"" . htmlspecialchars_uni($smilie['title']) . "\" smilieid=\"$smilie[smilieid]\" class=\"inlineimg\" src=\"$smilie[smiliepath]\" />";
                                }
                                else
                                {
                                        $replace = "<img border=\"0\" alt=\"\" title=\"" . htmlspecialchars_uni($smilie['title']) . "\" class=\"inlineimg\" src=\"$smilie[smiliepath]\" />";
                                }


texasf1racer 11-30-2009 10:26 PM

Quote:

Originally Posted by Biker_GA (Post 1922264)
While vB3.8 may complain about needing to update templates, the style still works perfectly fine. I'm using it on my live site and my users love it.

Indeed it does work with 3.8, however it's just annoying to see something like 45 templates that need to be updated every time you log into the admincp. Don't get me wrong, I am grateful for the skin - but I just got an email from vb.org informing me this had been updated and was a little confused to log in and find that it has only been updated for 4.0 which is still in beta, but there was no update for 3.8x. No worries though, we will make do with the skin as is.

To the developer, cheers for your efforts, we do enjoy the skin. ;)

dartho 12-01-2009 03:29 AM

I did the 4.0 update as teh 3.7 version was NOT compatible with 4.0

I'll release this as a 3.8 style also - no changes, just updated version numbers. probably tonight.

PossumX 12-01-2009 08:36 AM

Another great piece of news. One of the many, many reasons I choose and recommend vBulletin above all others.

MuR@T 12-02-2009 05:41 PM

Thanks nice


All times are GMT. The time now is 11:34 AM.

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.02194 seconds
  • Memory Usage 1,928KB
  • 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
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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