Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('C5_EXECUTE') or die(_("Access Denied."));
- //installation of theme
- class Theme3in1Package extends Package {
- protected $pkgHandle = 'theme_3in1';
- protected $appVersionRequired = '5.3.0';
- protected $pkgVersion = '3.0';
- public function getPackageDescription() {
- return t("3in1 Theme, Backdrop Block, Growl Block");
- }
- public function getPackageName() {
- return t("3in1");
- }
- public function install() {
- $pkg = parent::install();
- PageTheme::add('3in1', $pkg);
- }
- }
- //installation of backdrop package
- class BackdropPackage extends Package {
- protected $pkgHandle = 'Backdrop';
- protected $appVersionRequired = '5.3.0';
- protected $pkgVersion = '1.0';
- public function getPackageName() {
- return t("Backdrop");
- }
- public function getPackageDescription() {
- return t("A Jquery pull down to show hidden content.");
- }
- public function install() {
- $pkg = parent::install();
- BlockType::installBlockTypeFromPackage('Backdrop', $pkg);
- }
- }
- //installation of growl package
- class GrowlBlockController extends BlockController {
- //var $pobj;
- protected $btDescription = "Growl style block";
- protected $btName = "Growl";
- protected $btTable = 'btGrowl';
- protected $btInterfaceWidth = "350";
- protected $btInterfaceHeight = "300";
- protected $pkgHandle = 'Growl';
- protected $appVersionRequired = '5.3.0';
- protected $pkgVersion = '1.0';
- public function getPackageName() {
- return t("Growl");
- }
- public function getPackageDescription() {
- return t("A Jquery notification.");
- }
- public function install() {
- $pkg = parent::install();
- BlockType::installBlockTypeFromPackage('Growl', $pkg);
- }
- function getFileID() {return $this->file;}
- function getFileOnstateID() {return $this->fOnstateID;}
- function getFileOnstateObject() {
- if ($this->fOnstateID > 0) {
- return File::getByID($this->fOnstateID);
- }
- }
- function getFileObject() {
- return File::getByID($this->file);
- }
- public function on_page_view(){
- $html = Loader::helper('html');
- $v = View::GetInstance();
- $b = $this->getBlockObject();
- $btID = $b->getBlockTypeID();
- $bt = BlockType::getByID($btID);
- $uh = Loader::helper('concrete/urls');
- $v->addHeaderItem('<script type="text/javascript" src="' . $uh->getBlockTypeAssetsURL($bt) . '/lewis-growl.js"></script>','CONTROLLER');
- $v->addHeaderItem('<link rel="stylesheet" type="text/css" href="' . $uh->getBlockTypeAssetsURL($bt) . '/lewis-growl.css" />','CONTROLLER');
- }
- }
Add Comment
Please, Sign In to add comment