Page 1 of 1
Posted 17 February 2009 - 06:26 AM
How to implement the ThickBox(http://jquery.com/demo/thickbox/) within a project that powered by Yii?
I think the smartest way, would be to build an extension, which wrap the functionallity of the thickbox script.
In this case, the required Steps are:
1. publish and register the clientside files like .css and .js
2. build and output the required markup (html)
I attached an unfinished version, how this could look like.
At the moment it features the "single image" and "image gallery" mode.
I leave it to you to implement the 3 remaining modes ('inline', 'iframed' and 'ajax').
Download it here.
Unpack it to the "protected/extensions" folder of your yii project.
For a single image use:
'data'=>array('images/yii-powered.png', 'images/logo.gif', 'Yii rocks...')
or for a gallery:
array('images/plant1_t.jpg', 'images/plant1.jpg', 'description text...'),
array('images/plant2_t.jpg', 'images/plant2.jpg', 'another description text...')
And remeber, this should just be an example for you, how to build an extension and not a complete wrap up for the thickbox script.
Ahh and it seems that thickbox has some troubles with jquery 1.3.0 which comes with yii 1.0.2.
Number of downloads: 10
Share this topic:
Page 1 of 1