Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating the picture magnifier block


Carry out the following steps:

  1. Create a new folder named jqzoom in blocks as we did before.

  2. Download the plugin from the preceding link and copy the images directory to our new folder. Do the same with the css directory and js but make sure there's just one file in js named jqzoom.pack.1.0.1.js.

  3. Create two files, add.php and edit.php, with the same content as always:

    <?php 
    defined('C5_EXECUTE') or die(_("Access Denied."));
    $this->inc('form_setup_html.php'); 
    ?>
  4. The database structure file db.xml is quite simple:

    <?xml version="1.0"?>
    <schema version="0.3">
       <table name="btJqzoom">
          <field name="bID" type="I">
             <key />
             <unsigned />
          </field>
          <field name="title" type="C" size="255"></field>   
          <field name="fIDpicture" type="I"></field>
       </table>
    </schema>
  5. The block controller also is quite simple:

    <?php 
    defined...