Go Back   vb.org Archive > vBulletin Styles and Graphics > vBulletin Styles > vBulletin 4.x Styles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forum Style - Lightweight Style for Small Screen Devices (cell phone, iphone, mobile, android) Details »»
Forum Style - Lightweight Style for Small Screen Devices (cell phone, iphone, mobile, android)
Version: 1.0.3, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 4.1.8 Rating:
Released: 08-24-2010 Last Update: 12-15-2011 Installs: 897
Re-useable Code  
No support by the author.

A lightweight *forum only style aimed at small screen devices such as Windows Smartphones, Nokias and even iPhones. It has VERY low bandwidth requirements - 15 times less on my site - 20K as opposed to 300K for forumhome.

*forum only - I have done a very small amount of rough work on CMS templates, a simple single column CMS *could* be created to work with this style without too much effort. However I am not sure if you can have a different CMS layout dependent on which style you are using?

This is an update to the mobile style I have previously released.

The changes are predominantly aesthetic to take advantage of larger screens.

It is also much easier to change colour schemes by editing the commented CSS file.


Demo: http://vbdev.org/forum.php?styleid=7

This is a a lightweight style and as such has much reduced functionality/information over the default vBulletin style.

Install instructions:
  • Firstly, if upgrading, I recommend installing this as a new style rather than overwriting your previous install. This way you get to test it first without trashing your existing style.
  • BACKUP YOUR EXISTING lightweight.css.php FILE IF YOU HAVE CSS CUSTOMISATIONS
  • Download ZIP file
  • Unzip to a local/temp directory
  • Edit lightweight.css.php file to customise colours if required
  • Upload contents of the upload directory in the zip file folder to your forum root.
  • Install style XML via Style Manager in your ADMINCP
  • **Install and configure "LightWeight Style Options"
  • See post 2 for a FAQ
  • Click "Mark as Installed"
  • Test it out
  • Leave a rating
  • Leave feedback
  • Enjoy checking your site from your mobile phone without the need to pinch/zoom/wait etc...
Version Control:
1.0.0 - 25 AUG 2010 - Initial Release on vBulletin.org
1.0.1 - 26 AUG 2010 - Fixed "Mark All Forums Read" link in Search results. Released Lightweight Style Options to customise this
1.0.2 - 21 MAR 2011 - Updated to 4.1.2, removed short tags from CSS, fixed some issues discovered since last release, added some stuff.
1.0.3 - 16 DEC 2011 - Updated to 1.0.3, tried to fix all known issues. Nothing new. If you have updated your site as bugs have been found, probably no need to upgrade. But if you're upgrading your site from to 4.1.9, might be worthwhile.
1.0.3a - 16 DEC 2011 - remove test ad hook code accidently left in postbit_legacy template
Branding Free:
The style is free to use. However I ask that you keep links in the footer. If you want to remove them - send me a donation of an amount you can afford, or that you think is fair/reasonable, it's up to you how much.

Download Now

File Type: zip lightweight-style-1.0.0.zip (68.3 KB, 441 views)
File Type: zip lightweight-style-1.0.1.zip (70.5 KB, 2490 views)
File Type: zip lightweight -style-1.0.2a.zip (73.6 KB, 2359 views)
File Type: zip lightweight-style-1.0.3a.zip (72.3 KB, 2859 views)

Screenshots

File Type: png lightweight-screenshot.png (30.6 KB, 2 views)

Show Your Support

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

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

search headinclude template for
Code:
<script type="text/javascript">
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Cat Arriola | http://astrodiva.journalspace.com/ */

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;
    }
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
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);  // ('element ID', maximum width)
});

</script>
and replace with :

Code:
<script type="text/javascript">
<!--
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Cat Arriola | http://astrodiva.journalspace.com/ */

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;
    }
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
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);  // ('element ID', maximum width)
});
-->
</script>
this is an optimised version of the above code block you can use instead (optimised for size) I should probably move it to an external file so that browsers can cache it

Code:
<script type="text/javascript">
<!-- 
function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function fixImgs(a){var b=document.getElementsByTagName("img");for(i=0;i<b.length;i++){w=b[i].width;h=b[i].height;if(w>a){f=1-(w-a)/w;b[i].width=w*f;b[i].height=h*f}}}addLoadEvent(function(){fixImgs(200)})
 -->
</script>
Reply With Quote
  #773  
Old 02-05-2012, 10:28 PM
F&R F&R is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
@F&R - Try editing the headinclude template and removing the line
Code:
<base href="{vb:raw vboptions.bburl}/" />
In regards to link - try editing the header template in your default style, search for:
Code:
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
and add the following immediately before it:

Code:
<li><a href="forum.php?styleid=1">Lightweight Style</a></li>
that what type of thing you are after?
Thanks, will give this a go tomorrow... the styleid will be 2 for me I guess.

The style not sticking apparently is a known issue due to be fixed in 4.1.11 but will give your fix a go first, might be easier. but it's 11.30pm here so time for bed. Night and thanks for the help.
Reply With Quote
  #774  
Old 02-05-2012, 10:32 PM
Salleen Salleen is offline
 
Join Date: Nov 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working @ 4.1.10
Reply With Quote
  #775  
Old 02-06-2012, 01:20 AM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
search headinclude template for
Code:
<script type="text/javascript">
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Cat Arriola | http://astrodiva.journalspace.com/ */

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;
    }
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
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);  // ('element ID', maximum width)
});

</script>
and replace with :

Code:
<script type="text/javascript">
<!--
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Cat Arriola | http://astrodiva.journalspace.com/ */

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;
    }
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
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);  // ('element ID', maximum width)
});
-->
</script>
this is an optimised version of the above code block you can use instead (optimised for size) I should probably move it to an external file so that browsers can cache it

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

my headerinclude it
Code:
<vb:comment>
<meta name="viewport" content="width=320,user-scalable=yes,initial-scale=1.0" />
</vb:comment>
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="HandheldFriendly" content="true" />
<meta name="MobileOptimized" content="device-width" />
<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
<meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
<vb:if condition="$show['threadinfo']">
<vb:elseif condition="$show['foruminfo']" />
<meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
<meta name="description" content="<vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, $pagenumber}-</vb:if>{vb:raw foruminfo.description_clean}" />
<vb:else />
<meta name="keywords" content="{vb:raw vboptions.keywords}" />
<meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>
<link rel="stylesheet" href="{vb:raw vboptions.bburl}/lightweight.css.php" type="text/css" />
<base href="{vb:raw vboptions.bburl}/" />
Reply With Quote
  #776  
Old 02-06-2012, 03:13 AM
The Rocketeer's Avatar
The Rocketeer The Rocketeer is offline
 
Join Date: Jun 2010
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Hippy, Could you please list / put all your and moof's edits currently required in one new post with instructions and everything? So we all can use that until vBulletin 4.1.11 fixes these issues. It should also make it easier for Dartho to update his style and make the necessary changes.

I have also had someone work on my mobile styles Homepage(as in the CMS home) and to be honest it looks very decent now, I will post my edits soon so some of you can get the cms home page working with your mobile style.
Reply With Quote
  #777  
Old 02-06-2012, 08:08 PM
F&R F&R is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Dartho

your suggestion to remove <base href="{vb:raw vboptions.bburl}/" /> from the headinclude didn't work I'm afraid.

there is this vBulletin bug which has a fix, but I am unsure where to implement it in your code or even if it applies!

Thanks for the header idea, I have since moved it down into some white space where pudgy fingers on a small screen can hit it without zooming.
Reply With Quote
  #778  
Old 02-06-2012, 09:36 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by F&R View Post
Hi Dartho

your suggestion to remove <base href="{vb:raw vboptions.bburl}/" /> from the headinclude didn't work I'm afraid.

there is this vBulletin bug which has a fix, but I am unsure where to implement it in your code or even if it applies!

Thanks for the header idea, I have since moved it down into some white space where pudgy fingers on a small screen can hit it without zooming.
Check here for a fix to that:

https://vborg.vbsupport.ru/showthrea...99#post2289299
Reply With Quote
  #779  
Old 02-06-2012, 09:44 PM
F&R F&R is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My bad, I was searching in templates, forgot to read the instructions.... Works now, ta muchly!
Reply With Quote
  #780  
Old 02-07-2012, 06:53 PM
sevak sevak is offline
 
Join Date: Jan 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working on 4.1.10 saying its only for 4.1.8..
Reply With Quote
  #781  
Old 02-07-2012, 07:29 PM
Ozymandyus Ozymandyus is offline
 
Join Date: May 2005
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sevak View Post
not working on 4.1.10 saying its only for 4.1.8..
Just click the option to ignore version when you're doing the import. Problem solved.
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 12:26 AM.


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.05780 seconds
  • Memory Usage 2,380KB
  • Queries Executed 26 (?)
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
  • (10)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (13)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete