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 a job to check for broken links


Carry out the following steps:

  1. A package can depend on database tables just like a block does. The procedure is the same: create a db.xml file but this time it's located right in the package directory. Therefore, create a file at packages/c5book/db.xml and put the following content in it:

    <?xml version="1.0"?>
    <schema version="0.3">
       <table name="btLinkChecker">
          <field name="cID" type="I">
             <key />
             <unsigned />
          </field>
          <field name="link" type="C" size="255">
             <key />
          </field>
          <field name="linkStatusCode" type="I"></field>
          <field name="linkStatusName" type="C" size="255"></field>
       </table>
    </schema>
  2. Make sure the directory packages/c5book/jobs exists. It's where we're going to put our new job file.

  3. In that new directory, create a file named link_checker.php with the following...