File: text-resizer-example.php

Recommend this page to a friend!
  Classes of kumar mcmillan  >  Text Resizer  >  text-resizer-example.php  >  Download  
File: text-resizer-example.php
Role: Example script
Content type: text/plain
Description: example of usage
Class: Text Resizer
Resizes text on a page using styles and sessions.
Author: By
Last change:
Date: 17 years ago
Size: 2,352 bytes
 

 

Contents

Class file image Download
<?php

require_once 'text-resizer.class.php';
$TextResizer = new TextResizer;
$TextResizer->SetPercentageIncrement(10); // this call is optional. 10 is default
$TextResizer->ProcessTextReset();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
    <title>Text Resizer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <link rel="Stylesheet" type="text/css" media="all" href="text-resizer.css" />
   
    <!-- make sure the text resizing style appears after any other CSS styles: -->
    <?php $TextResizer->PrintStyle(); ?>
   
</head>
<body>

<!-- ========= MAIN CONTAINING BLOCK ========= -->

<div id="container">

    <!-- ========= NAVIGATION BLOCK ========= -->

    <div id="menu">
   
        <h4 id="settings"><span>Text Settings</span></h4>
        <ul>
            <li><a href="<?php echo $GLOBALS['PHP_SELF']; ?>?set_text=smaller">Smaller Text</a></li>
            <li><a href="<?php echo $GLOBALS['PHP_SELF']; ?>?set_text=larger">Larger Text</a></li>
            <li><a href="<?php echo $GLOBALS['PHP_SELF']; ?>?set_text=normal">Normal Text</a></li>
            <li>Text size is currently <?php echo $TextResizer->GetTextPercentage(); ?>% of your browser's defualt text size</li>
        </ul>

    </div>

    <!-- ========= CONTENT BLOCK ========= -->
   
    <div id="content">
        <p>
        Lorem ipsum dolor sit amet, sedlit consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
        </p>
        <p>
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie onsequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent.
        </p>
        <p>
luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
        </p>
        <p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
        </p>
        <p>
Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodoconsequat.
        </p>
    </div>
   
</div>
</body>
</html>


For more information send a message to info at phpclasses dot org.