I downloaded 0.9.6 and followed how you did the 2 other widgets, however my new widget doesn't seem to be appearing.
widget.json looks like this:
Code:
{
"name" : "Opening Hours",
"author" : "Ray Herring",
"description" : "This widget displays the opening hours for the pharmacy",
"license" : "MIT License"
}
opening_hours.php:
Code:
<?php
/*
* @name Recent News Widget
* @author Yorick Peterse
* @link http://www.yorickpeterse.com/
* @package PyroCMS
* @license MIT License
*
* This widget displays the opening hours for the pharmacy
*/
class Opening_Hours extends Widgets {
// Run function
function run()
{
$this->CI->load->module_model('pages','pages_m');
print_r($this->CI->pages_m->page());
}
// Install function (executed when the user installs the widget)
function install()
{
$name = 'opening_hours';
$body = '';
$this->install_widget($name,$body);
}
// Uninstall function (executed when the user uninstalls the widget)
function uninstall()
{
$name = 'opening_hours';
$this->uninstall_widget($name);
}
}
?>
both files live in the directory 'widgets/opening_hours'