Hi all! I want to improve my first extension. His name is LyiightBox because encapsulate famous lightbox script. You can found the extension here: and if you want to help me you can also found the code here:

So, I load all script file in this way:

    private function populateJsarrayScripts() {

        $this->scripts = array(






to do this:

    private function loadAllJsScript() {


        foreach ($this->scripts as $filename)

            Yii::app()->getClientScript()->registerScriptFile($this->baseUrl . $filename);


lightbox css is in the assets folder. When I use the script all work fine. But javascript files override the dom like you can see in the attachment. Can someone help to do something like that:


    private function populateJsarrayScripts() {

        $this->scripts = array(



            '/js/lightbox.js?folder=' . $this->assetsFolder,




so in lightbox file, I can load correct images? I am crazy? I’m doing the right thing?

Solved =)

Hello, could you help me with your extention, please?

I used the following code in the static page:

$this->widget('ext.lyiightbox.LyiightBox2', array(

                'smallest' => 'images/1.jpg',

                'biggest' => 'images/1b.jpg',

                'title' => 'Sample Image 1.'


I put 1.jpg and 1b.jpg in the default images folder of my Yii project.

I got Error: Property "LyiightBox2.smallest" is not defined.

What’s the problem?

What folder should I use for the ‘smallest’ and ‘biggest’ images?

Where should I define this?


Can’t run extension. all installed, but JS not worked - onclick open original picture.

In firebug error:

"Uncaught ReferenceError: lyiightboxAssetUrl is not defined " lightbox.js:line 49

Browser Chrome

smallest is in version 1.0. I think you have downloaded 1.1 version. I’ve fixed right now a bug.

please, if you found some bug:


            $this->widget('ext.lyiightbox.LyiightBox2', array(

                'thumbnail' => '/path/to/thumb/images.jpg',

                'image' => '/path/to/image/image.jpg',

                'title' => 'Sample Image 1.',

		'visible' => true,

		'group' => 'myOwnGallery'



Good time of a day, dear sensorario.

I like your extension a lot but want to propose some improvements to make a code generated by your extension XHTML compliant. I don’t know whether everything I propose is possible with lightbox2 but I will be very thankful if you will try to implement it.

My issue is based on response of’s validator (unfortunatelly, I can’t post a link due to it’s my first post). A single photo’s link element generated by your extension looks like this:

<a href="/images/photos/childhood-01.jpg" rel="lightbox[_Gallery]" title="Childhood"><img src="/images/photos/childhood-01-mini.jpg" border="0" /></a>

Validator says:

  1. "character "[" is not allowed in the value of attribute "rel"" (in "a" tag) - probably, it would be possible to introduce some separator character (e.g "-") between "lightbox" and a name of a gallery;

  2. “there is no attribute “border”” (in “img” tag) - one can customize image’s look using CSS;

  3. “required attribute “alt” not specified” (in “img” tag) - picture’s description could be used here.

If you will try to fix this, of course, XHTML compliant code can be an optional parameter of the widget.

Thank you for attention.

Have a nice day! :)

P.S. I’ve also created an issue at your github page.