vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=247)
-   -   Forum Style - Lightweight Style for Small Screen Devices (cell phone, iphone, mobile, android) (https://vborg.vbsupport.ru/showthread.php?t=249277)

rughis 04-12-2011 02:26 PM

Quote:

Originally Posted by dartho (Post 2182789)
Are you using the latest version of the style? I did an update a couple weeks back that fixed that issue in 4.1.2. Just import the XML, no need to update the CSS

Hi dartho, thank you.

Now everything is working fine, thank you for your suggestion and your work. Your mobile style is really the best for vbulletin sites.

dartho 04-12-2011 11:02 PM

@NgocTam
Try pasting this into the bottom of your header template in this style:

Code:

<script type="text/javascript">
function fixImgs(maxW) {
  var pix=document.getElementsByTagName('img');
  for (i=0; i<pix.length; i++) {
    w=pix[i].width;
    h=pix[i].height;
    if (w > maxW) {
      f=1-((w - maxW) / w);
      pix[i].width=w * f;
      pix[i].height=h * f;
    }
  }
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  fixImgs(200);  // Change this value to change maximum image width
});
</script>

Not my code - got it from http://javascript.internet.com/misce...e-resizer.html

Kolbi 04-13-2011 07:54 AM

Compiled and optimised:
Code:

<script type="text/javascript">
function fixImgs(b){var a=document.getElementsByTagName("img");for(i=0;i<a.length;i++)if(w=a[i].width,h=a[i].height,w>b)f=1-(w-b)/w,a[i].width=w*f,a[i].height=h*f}function addLoadEvent(b){var a=window.onload;window.onload=typeof window.onload!="function"?b:function(){a&&a();b()}}addLoadEvent(function(){fixImgs(200)});
</script>


alwafi 04-15-2011 06:14 PM

Hello Every one

very nice style

thanks

best regrad's

tadukuttan 04-16-2011 12:06 PM

Desktop/PCMode link does not seem to work with VB 4.1.3, every time user switches to Desktop Style, clicking any forum link causes style to switch back to Mobile/Lightweight style. I just changed default style chooser to have 'none' option with value '-1', similar to what VB mobile style uses to switch back to full style.
Code:

                        <setting varname="ls_default_style" displayorder="20">
                                <datatype>free</datatype>
                                <optioncode>select:eval
$options = fetch_style_title_options_array();$options = array('-1' => $vbphrase['none']) + $options;</optioncode>
                        </setting>

This works alright, please let me know if there is better fix.

Robbed 04-16-2011 05:52 PM

Thanks for the update dartho. The image resizer code works good.

Alan_SP 04-17-2011 01:47 AM

Quote:

Originally Posted by tadukuttan (Post 2185245)
Desktop/PCMode link does not seem to work with VB 4.1.3, every time user switches to Desktop Style, clicking any forum link causes style to switch back to Mobile/Lightweight style. I just changed default style chooser to have 'none' option with value '-1', similar to what VB mobile style uses to switch back to full style.

This seems to be problem for some of my users. I'm waiting for confirmation if this solves their problem.

dartho 04-18-2011 04:08 AM

Good work around for 4.1.3, tadukuttan. I notice vbulletin.com also does this, choosing a styleid of -1 is the only way to break out of their mobile device detection so I think your solution is probably the fix - although I'd use text "Default Style" as opposed to "none"

rwoscott 04-19-2011 04:28 AM

I just upgraded VB to 4.1.3, from 4.1.1, and tried to upgrade the style, but get the following error.

Invalid File Specified

I have uninstalled the style, and tried a fresh install, bu tI still get the same error.

Any idea??

dartho 04-19-2011 08:21 AM

Have you tried re-downloading the zip and extracting it to a new location on your local computer before importing via the Style Manager?


All times are GMT. The time now is 12:16 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.01997 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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