FAQ: CSS Text/Font Resizing (A+ A-) on Joomla Template

This is the archive off all FAQ related threads.
Locked
User avatar
r0tt3n
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Dec 14, 2005 8:32 pm
Location: Call Eee Phorn Yah
Contact:

FAQ: CSS Text/Font Resizing (A+ A-) on Joomla Template

Post by r0tt3n » Fri Dec 16, 2005 5:16 pm

I recognize that there are some of you who are sort of scratching your heads wondering how to get from where your site is now to where joomla.org's is.  So for those of you wanting it layed out all the way, here's a more detailed instruction set that summarizes and extends what has already been said through the course of this thread:

Step 1 - download joomla.org's font style switcher file ( http://forum.joomla.org/Themes/joomla/m ... changer.js )
Step 2 - put that file somewhere in the folder of the template you are using
Step 3 - put A+, A-, and Reset images in your template's image folder
Step 4 - paste the following code snippet somewhere in your template's index.php file

Code: Select all

<script type="text/javascript" language="javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/____1____"></script>
<a href="index.php" title="Increase size" onclick="changeFontSize(1);return false;">
<img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/____2____" alt="" border="0" />
</a>
<a href="index.php" title="Decrease size" onclick="changeFontSize(-1);return false;">
<img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/____3____" alt="" border="0" />
</a>
<a href="index.php" title="Revert styles to default" onclick="revertStyles(); return false;">
<img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/____4____" alt="" border="0" />
</a>
Step 5: Do all of the following:
  • Replace ____1____ with the location in your template folder where you saved the .js file
  • Replace ____2____ with the name of your A+ image
  • Replace ____3____ with the name of your A- image
  • Replace ____4____ with the name of your Reset image
Step 6: Do one of the following:
  • Bask in the awesomeness that is session font resizing
  • Start figuring out why the buttons do nothing (either because your site doesn't use style classes, or because I messed up somewhere)
If there are any errors or omissions, please let me know.  Otherwise....

Enjoy!



DISCUSSION HERE: http://forum.joomla.org/index.php/topic,10264.0.html
Last edited by guilliam on Wed Feb 08, 2006 4:41 am, edited 1 time in total.
"Quis Custodiet Ipsos Custodes?" - Juvenal

Literal Translation: Who will guard the guards?
Not-So-Literal Translation: If one group is the police of the world, who will police them?

Locked

Return to “FAQ Archive”