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

Reply
 
Thread Tools
Lightweight Style for VB3.8.7 iPhone/Mobile/Cell/PDA Details »»
Lightweight Style for VB3.8.7 iPhone/Mobile/Cell/PDA
Version: 1.0.1, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.8.7 Rating:
Released: 05-17-2011 Last Update: 05-19-2011 Installs: 248
Re-useable Code  
No support by the author.

A few have asked for this, hope you like it.

As the title suggests, this is a lightweight style for vBulletin 3.8.7 (and probably most versions before that - A quick test showed it also working under vBulletin 3.7.7!)

It's lightweight (low bandwidth) and works well on most handheld / mobile devices. Some have been know to use it on their desktops and I personally use it for Google as a way of significantly reducing the bandwidth they use.

====================
Install Instructions
====================
  • Backup
  • Download and extract ZIP file locally
  • Upload contents of forum folder to your forum root
  • Go into your AdminCP->Style Manager->Download / Upload Styles
  • In the "Import Style XML File" section browse to "lightweight-vbulletin-3.8.7-style.xml" (extracted form the zip file)
  • If you are running a version of vbulletin other than 3.8.7, select Yes in "Ignore Style Version"
  • Click the "Import" button.
  • Edit the header template and change the 2nd line to reflect the Style ID of your default style and location of your home page (forum.php or index.php) and text for the anchor (Default Style).
    Code:
    <a class="toplinks" href="$_SERVER[PHP_SELF]?<if condition="$_SERVER['QUERY_STRING']">$_SERVER[QUERY_STRING]&amp;</if>styleid=1">Default Style</a>
  • Return to vBulletin.org and click "Mark as Installed"
  • Reply to this thread leaving feedback and a rating
====================
Release History
====================
18th May 2011 - 1.0.0 Initial Release
20th May 2011 - 1.0.1 Bug Fixes and enhancements
====================
Screen Shots
====================
====================
Branding Free
====================
If you wish to remove the branding/copyright notice from the footer - send me a donation of an amount you can afford, or that you think is fair/reasonable, it's up to you how much. (can't get much fairer than that) You can do this by clicking the "Support Developer" link above (a few lines below the "Mark as Installed" link).

====================
Bugs fixes for next release
====================
Issue:
extra "> in template forumhome_forumbit_level2_nopost
Resolution:
Search for
Code:
<div class="windowbg">">
Replace with
Code:
<div class="windowbg">
Issue:
Inconsistencies in disaplying locked forums
Resolution:
See this post

Thanks.

Download Now

File Type: zip Lightweight-Style-vBulletin3.8.7-1.0.0.zip (104.8 KB, 340 views)
File Type: zip Lightweight-Style-vBulletin3.8.7-1.0.1.zip (105.8 KB, 2660 views)

Screenshots

File Type: png screenshot.png (14.3 KB, 0 views)
File Type: png screenshot2.png (9.8 KB, 0 views)

Show Your Support

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

Comments
  #52  
Old 06-11-2011, 09:06 PM
Stephan Whelan's Avatar
Stephan Whelan Stephan Whelan is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Joe,

Thanks for that - unfortunately still doesn't work. I've confirmed the /includes/ame_bbcode.php has the change you've suggested, as well as the youtube definition having $ameinfo[width] and $ameinfo[height].

Any further ideas?
Reply With Quote
  #53  
Old 06-11-2011, 09:21 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I joined your forum to take a look but I don't see the mobile style as an option- do you have it public? If so what is the styleid number?

You can see how it works on my forum:
Mobile Style: http://www.juot.net/forums/showthrea...000&styleid=38
Regular Style: http://www.juot.net/forums/showthrea...0000&styleid=1
Reply With Quote
  #54  
Old 06-11-2011, 09:46 PM
Stephan Whelan's Avatar
Stephan Whelan Stephan Whelan is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Indeed - we normally disable the style selector (it is set automatically based on browser accessing the site) but i've re-enabled it for now.
Reply With Quote
  #55  
Old 06-11-2011, 10:12 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's working... I just posted a video, here is a screen shot:

The older videos will turn small once the cache expires for them. I think you can force the issue by editing the post and re-saving it.

But in time all the videos will be small on the mobile style, as will all new videos.
Attached Images
File Type: jpg youtubeexample.jpg (53.1 KB, 0 views)
Reply With Quote
  #56  
Old 06-12-2011, 06:13 PM
Stephan Whelan's Avatar
Stephan Whelan Stephan Whelan is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Joe - it does work well indeed.

Another question to the group...I see that when I use the style assignment mod (https://vborg.vbsupport.ru/showthread.php?t=173239) the link at the top of the page (default style, etc...) won't allow visitors to switch styles to the full blown version. I know that is a default option on that Mod but any ideas on how it might work in conjunction with this style?
Reply With Quote
  #57  
Old 06-13-2011, 02:05 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this on for size:

In AdminCP->Plugins & Products->Add New Plugin create a new plugin for product: vBulletin, hook location: style_fetch, Title: Mobile Detection, Execution Order: 5 Code:
PHP Code:
$mobile_style_advanced=10;  //iPhone?
$mobile_style=10//Any mobile phone/device
$default_style=6//Your default or preferred desktop style
$vbulletin->input->clean_array_gpc('c', array( 
    
COOKIE_PREFIX 'userstyleid'     => TYPE_UINT
    
COOKIE_PREFIX 'skipmobilestyle' => TYPE_BOOL
)); 

$my_skipmobile $vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'];
$my_userstyleid $vbulletin->GPC[COOKIE_PREFIX 'userstyleid'];

// Test mobile browser 
$mobile_browser false
$mobile_browser_advanced false
//if ($vbulletin->options['mob_detect_enabled']) 
if (1==1)

    if (
stripos($_SERVER['HTTP_USER_AGENT'], 'windows') === false
    { 
        if ( 
            
preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android)/i'strtolower($_SERVER['HTTP_USER_AGENT'])) 
            OR 
            
stripos($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml') !== false 
            
OR 
            ((isset(
$_SERVER['HTTP_X_WAP_PROFILE']) OR isset($_SERVER['HTTP_PROFILE']))) 
            OR 
            
stripos($_SERVER['ALL_HTTP'],'OperaMini') !== false 
        

        { 
            
$mobile_browser true
        } 
        
// This array is big and may be bigger later on. So we move it to a second if. 
        
elseif (in_array
                    
strtolower(substr($_SERVER['HTTP_USER_AGENT'], 04)), 
                    array( 
                    
'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac'
                    
'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno'
                    
'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-'
                    
'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-'
                    
'newt','noki','oper','palm','pana','pant','phil','play','port','prox'
                    
'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar'
                    
'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-'
                    
'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp'
                    
'wapr','webc','winw','winw','xda ','xda-'
                ) 
            ) 
        { 
            
$mobile_browser true
        } 
    } 

    if ( 
        
$mobile_browser 
        
AND 
        
preg_match('/(ipad|ipod|iphone|blackberry|android|pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i'strtolower($_SERVER['HTTP_USER_AGENT'])) 
    ) 
    { 
        
$mobile_browser_advanced true
    } 

$vbulletin->input->clean_array_gpc('r', array( 
    
'styleid' => TYPE_INT
    
'langid'  => TYPE_INT
)); 

// Set up user's chosen style 
if ($vbulletin->GPC['styleid'])

    
$styleid $vbulletin->GPC['styleid']; 
    
vbsetcookie('userstyleid'$styleid); 
    if (
$styleid == $default_style
    { 
        
vbsetcookie('skipmobilestyle'1); 
        
$vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'] = 1
        
$my_skipmobile=1;
    } 
    elseif (
$styleid == $mobile_style
    { 
        
vbsetcookie('skipmobilestyle'0); 
        
$vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'] = 0
        
$my_skipmobile 1;
    } 

elseif (
$mobile_browser_advanced && !$my_skipmobile

    
$styleid $mobile_style_advanced

elseif (
$mobile_browser &&!$my_skipmobile

    
$styleid $mobile_style

elseif (
$my_userstyleid

    
$styleid $my_userstyleid

else 

    
$styleid = -1

edit the first 3 lines of the plugin code to suit your purposes (should be self explanatory) and see how you go. Make sure you disable any mobile detect type scripts/plugins you may have running such as the one you linked to in your last post whilst testing this. Also be aware that you should probably do testing under a standard user account as administrator accounts have different permissions when it comes to style selections.

Please feedback how it goes.
Reply With Quote
  #58  
Old 06-13-2011, 05:24 AM
Stephan Whelan's Avatar
Stephan Whelan Stephan Whelan is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked a treat Dartho!
Reply With Quote
  #59  
Old 06-13-2011, 10:39 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good to hear.
Reply With Quote
  #60  
Old 06-13-2011, 06:26 PM
plazzman plazzman is offline
 
Join Date: Oct 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
[s]If you link me up with an example, I could look. via PM is OK.[/s]
Worked it out. Not highlight is 'hot' new threads (thread_hot_new). I'll fix that up.

To fix, edit the CSS, search for
Code:
.new, ._new, .forumnew
replace with
Code:
.new, ._new, .forumnew, ._hot_new, ._dot_hot_new
search for
Code:
.thread_dot, .thread_hot, .thread_dot_hot, .thread_, .thread_lock,.thread, .thread_moved, .thread_new
replace with
Code:
.thread_dot, .thread_hot, .thread_dot_hot, .thread_, .thread_lock,.thread, .thread_moved, .thread_new, .thread_hot_new, .thread_dot_hot_new
Thanks for the code for default style link, I'll put that in.
First off, absolutely love this template. Real smooth, last one I had was so convoluted.

Bit of a noob here though. Can you please explain to me where I can actually find those CSS changes?

Also, is it possible to just change the colours of the theme to make it fit my forum a bit better? Full credit/royalty would still apply obviously

Thanks alot
Reply With Quote
  #61  
Old 06-13-2011, 10:03 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those changes have been implemeneted in the last release - just make sure you uploaded the lightweight.css.php file to your forum root from the last zip.

It is also this file where you can make changes to the color scheme - open it up with your favorite text editor (I use notepad++) and read the comments at the top, it tells you what to do.
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 01:37 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.09940 seconds
  • Memory Usage 2,426KB
  • Queries Executed 28 (?)
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
  • (7)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (17)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_postinfo_query
  • fetch_postinfo
  • 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