O'Reilly logo

concrete5 by Remo Laubacher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - creating the broken links dashboard extension

Carry out the following steps:

  1. In our package c5book, create a new directory structure controllers/dashboard/reports.
  2. Within the new directory, create a file named broken_links.php and put the following content in it to fetch the data, and pass it on to the single page by using $this->set:
    <?php defined('C5_EXECUTE') or die(_("Access Denied.")); class DashboardReportsBrokenLinksController extends Controller { public $helpers = array('form', 'html'); public function view() { $db = Loader::db(); $brokenLinks = array(); $result = $db->Execute('SELECT * FROM btLinkChecker WHERE linkStatusCode NOT IN (200,302) OR linkStatusCode IS NULL'); while ($row = $result->FetchRow()) { $row['page'] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required