|
Cookbook /
FontSizerSummary: Add buttons for instant font (text) resizing, preferrences are stored
Version: 2006-10-28
Status: stable
Prerequisites: pmwiki-2.0
Maintainer: DaveG
Download: fontsizer.zipΔ
QuestionHow can I add an easy way for visitors/users to change font sizes? AnswerFontsizer allows instant incremental text sizing, and preferred text size is remembered via a cookie setting. It adds button links to increase/decrease the size of all text via markup Prerequisites:
InstallationDownload fontsizer.zipΔ, extract fontsizer.php to cookbook/ folder and fontsizer.js to pub/fontsizer/. Add to config.php: include_once("DescriptionThe fontsizer is based on javascript and creates links via markup Internationalisation of the fontsizer link names is enabled. The fontsizer links are not displayed if the browser is not supporting javascript or javascript is disabled. NotesDepending on the font setting of the page section This problem of adjustments needed for various skins is caused by the placement of the script initialization code in a div and not immediately after the <body> tag in the html source. To overcome this place the variable If you wish to load the script via the skin's skin.php file, and have fontsizer.php and fontsizer.js moved to the skin directory, then you need to change the code line loading fontsizer.js to give the right location of
Releases
Comments2007-05-19 Isidor Issue with See AlsoContributorsCategory: Skins
User notes: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |