/extensions/lightbox/ELightBoxWidget.php
PHP | 102 lines | 66 code | 14 blank | 22 comment | 0 complexity | 26f606eb221b1e35b4f6734010a8387b MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0
- <?php
- /**
- * Class File
- *
- * @author Marc Mautz <m.mautz@herzogkommunikation.de>
- * @link http://www.phundament.com/
- * @copyright Copyright © 2005-2010 diemeisterei GmbH
- * @license http://www.phundament.com/license/
- */
- /**
- * Description ...
- *
- * Detailed info
- * <pre>
- * $var = code_example();
- * </pre>
- * {@link DefaultController}
- *
- * @author Marc Mautz <m.mautz@herzogkommunikation.de>
- * @version $Id$
- * @package extensions.lightbox
- * @since 2.0
- */
- Yii::setPathOfAlias("ELightBoxWidget", dirname(__FILE__));
- class ELightBoxWidget extends CWidget {
- public $title = "LightBox Gallery";
- public $layout = "Link-List";
-
- public $file0;
- public $file1;
- public $file2;
- public $file3;
- public $file4;
- public $file5;
- public $file6;
- public $file7;
- public $file8;
- public $file9;
-
- public $fileTitle0;
- public $fileTitle1;
- public $fileTitle2;
- public $fileTitle3;
- public $fileTitle4;
- public $fileTitle5;
- public $fileTitle6;
- public $fileTitle7;
- public $fileTitle8;
- public $fileTitle9;
- protected $_uniqid;
- public function init() {
- $this->_uniqid = uniqid("ELightBoxWidget");
- }
- public function run() {
-
- $publishPath = Yii::app()->assetManager->publish(dirname(__FILE__).DS."support/");
-
- $css = $publishPath."/css/jquery.lightbox-0.5.css";
- Yii::app()->clientScript->registerCssFile($css);
-
- $script = "var publishPath = '".$publishPath."/';";
- Yii::app()->clientScript->registerScript('publishPath', $script, CClientScript::POS_END);
-
- $js = $publishPath."/js/jquery.lightbox-0.5.min.js";
- Yii::app()->clientScript->registerScriptFile($js, CClientScript::POS_END);
- $this->render(
- 'lightbox',
- array(
- 'title' => $this->title,
- 'layout' => $this->layout,
- 'file0' => $this->file0,
- 'file1' => $this->file1,
- 'file2' => $this->file2,
- 'file3' => $this->file3,
- 'file4' => $this->file4,
- 'file5' => $this->file5,
- 'file6' => $this->file6,
- 'file7' => $this->file7,
- 'file8' => $this->file8,
- 'file9' => $this->file9,
- 'fileTitle0' => $this->fileTitle0,
- 'fileTitle1' => $this->fileTitle1,
- 'fileTitle2' => $this->fileTitle2,
- 'fileTitle3' => $this->fileTitle3,
- 'fileTitle4' => $this->fileTitle4,
- 'fileTitle5' => $this->fileTitle5,
- 'fileTitle6' => $this->fileTitle6,
- 'fileTitle7' => $this->fileTitle7,
- 'fileTitle8' => $this->fileTitle8,
- 'fileTitle9' => $this->fileTitle9,
- )
- );
- }
- }