Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Easy Style font resizer Details »»
Easy Style font resizer
Version: 1.00, by animcentral animcentral is offline
Developer Last Online: Oct 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.x Rating:
Released: 06-26-2009 Last Update: Never Installs: 14
Template Edits
 
No support by the author.

The following script can be used to allow visitors to increase or decrease the size of text on your page. This can be useful for visitors who have trouble reading smaller text and allows them to increase it to something they can view more easily.

Template edits:

add the following script in Header
Code:
<script type="text/javascript" language="javascript">
var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('div');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('div');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

</script>
and the following anywhere you wanna show the icons:
Code:
<div>
         <a href="javascript:increaseFontSize();"><img src="font-inc.gif" alt="Increase Font Size" style="border:0px;" /></a>
         <a href="javascript:decreaseFontSize();"><img src="font-dec.gif" alt="Decrease Font Size" style="border:0px;" /></a>
        </div>
Icons:


Demo:
http://fa.animcentral.com/forums/
comment: Persian Language

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
xorex

Comments
  #2  
Old 06-28-2009, 12:56 PM
saviola8x's Avatar
saviola8x saviola8x is offline
 
Join Date: May 2006
Location: Paris
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so good.
Thanks
Reply With Quote
  #3  
Old 06-28-2009, 01:21 PM
sebil's Avatar
sebil sebil is offline
 
Join Date: Feb 2008
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

itz nice..
Reply With Quote
  #4  
Old 06-28-2009, 02:36 PM
Andyrew Andyrew is offline
 
Join Date: Aug 2005
Location: UK
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It changes back to normal every page load, i find it easier to hold down ctrl then scroll the mouse wheel.
Reply With Quote
  #5  
Old 06-28-2009, 03:58 PM
animcentral's Avatar
animcentral animcentral is offline
 
Join Date: May 2009
Location: http://animup.net
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andyrew View Post
It changes back to normal every page load, i find it easier to hold down ctrl then scroll the mouse wheel.
i will try to make it cookie base in next version
Reply With Quote
  #6  
Old 06-28-2009, 03:59 PM
deadlySniper deadlySniper is offline
 
Join Date: Dec 2008
Location: New York
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, thanks.
Reply With Quote
  #7  
Old 06-28-2009, 05:20 PM
saadessa saadessa is offline
 
Join Date: Jan 2008
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
  #8  
Old 12-21-2009, 12:04 PM
Zi55 Zi55 is offline
 
Join Date: Dec 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this nice mod , we need to see it cookie support in next versions , because when you move to an page , the font return as it default .
Thanks ,
Zi5
Reply With Quote
  #9  
Old 02-06-2010, 11:26 AM
Golzarion's Avatar
Golzarion Golzarion is offline
 
Join Date: Jan 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod. Although I have always used "Ctrl" and " +" keys for changing the display of the font size... I think it would be more useful if you make it cookie base.

Thank you anyway.
Reply With Quote
  #10  
Old 06-09-2010, 05:35 AM
Tanapangarap's Avatar
Tanapangarap Tanapangarap is offline
 
Join Date: Dec 2007
Location: California
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope to see this made cookie-based at one point, too.

Regards,

Kevin
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 09:01 PM.


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.04604 seconds
  • Memory Usage 2,313KB
  • 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
  • (2)bbcode_code
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete