I am new to Yii and I am very impressed with the supersized Jquery pluging Supersized. Could you guys suggest me how to extend and write the plugin which I can use in my application.
Thanks
Ashish Tyagi
I am new to Yii and I am very impressed with the supersized Jquery pluging Supersized. Could you guys suggest me how to extend and write the plugin which I can use in my application.
Thanks
Ashish Tyagi
I don’t understand your question.
Why don’t you just start using it already, what’s stopping you?
When you know how it works, you can start making a widget for it, and then turn it into an extension.
There are lots of extensions you can take a look at to learn how to do that.
Thank you very much for your response. I am newbie and I don’t know how to include something at <head> of the page. I can do that by modifying the default layout(main.php) file but I do not want to alter the default layout file. Is there anyway I can include some script or css file in the header of the Yii page without modifying main layout file.
<?php
$script = <<<EOD
// write pure javascript here without the need to escape
EOD;
Yii::app()->clientScript->registerScript('customFnc', $script, CClientScript::POS_READY);?>
This is the third time I paste that bit of code today!
Btw: there is an equivalent function to insert a chunk of CSS, AFAIK.
Thank you very much for this. I can not thank you enough
My scripts doesn’t seems to read the image directory
<?php
$script= <<<EOD
jQuery(function($){
$.supersized({
slide_interval :7000, // Length between transitions
transition :1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
transition_speed :1000, // Speed of transition
slide_links :'blank',// Individual links for each slide (Options: false, 'num', 'name', 'blank')
slides :[// Slideshow Images
$directory = Yii::getPathOfAlias('webroot').'/uploads/';
$images = glob($directory . "*.{jpg,JPG,jpeg,JPEG,png,PNG}", GLOB_BRACE);
foreach($images as $image)
echo "{image : 'http://localhost/uploads/" . $image . "', title : '" .$image . "'},";
]
});
});
EOD;
Yii::app()->clientScript->registerScript(‘customFnc’, $script, CClientScript::POS_READY);?>
[color=#1C2837][size=2]
Yii::getPathOfAlias('webroot.uploads');
[/size][/color]