Author Topic: [MOD] Independent Font Size Changer ▲▼ for hole page with cookie  (Read 2867 times)

0 Members and 1 Guest are viewing this topic.

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Hi,

here is a font size changer that changes font size for all elements procentual, it also saves
the state of choosen fontsize into a cookie.

You can setup the default size and the procentual adjustment steps for in or decreasing.


Here we go:

Place in your header.html between <head></head> tag:

Code: [Select]
<script type="text/javascript" src="./js/font_cookie.js"></script>
<script type="text/javascript" src="./js/font_size.js"></script>

Place early in your header.html after the <body> tag:

Code: [Select]
<script type="text/javascript">if (efa_fontSize) efa_fontSize.efaInit();</script>
Place this in any template where you want to show the font size changer buttons:

Code: [Select]
<div class="selectFontSize"><script type="text/javascript">if (efa_fontSize) document.write(efa_fontSize.allLinks);</script></div>
Place the attached files (see post attachment) into your root/js/ directory:

- root/js/font_size.js
- root/jsfont_cookie.js
- root/js/font_zoomin_32.png
- root/js/font_normal_32.png
- root/jsfont_zoomout_32.png


Your done  :mrgreen:


Settings:

in font_size.js:

Code: [Select]
var efa_default = 70; //default text size as percentage of user default
var efa_increment = 10; //percentage to increase/decrease font size

You can play around with this two settings.

In the attachment there is also a font_size.html file, this only for local testing and is not
needed for uploading.

Here is a little teaser screenshot snip, don't wonder i just placed it for testing into my
mac like dock bar:




Greetz X23

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--