neverslair hacks - useing jquery with wt_gallery
28.06.2008 21:30 Age: 1214703000
You like typo3, you like jquery for your javascript ajax needs, and you use wt_gallery? then this is definitely for you.
Every coder knows this problem, you are using your javascript library of choice, and need a picture gallery, now there are many galleries available for typo3, each one with its own nice lil features and gimmicks, each one using its own javascript library of choice.
I am currently using jm_gallery on my page, but since that one is totally missing ajax stuff, and i wanted to play around with the functions anyways, i decided to test around some galleries on my local development web.
There are quite some galleries with ajax support, but none of em actually let me choose different javascript libraries. There is also perfectlightbox and kj_lightbox2, those are pretty nice, but not exactly fitting my needs with the read-images-from-folder thing.
Soon i had wt_gallery on my view, cause it nearly fitted all my needs, it let me choose which javascript library i actually want to use for what, and supports folder readout, cat view, list view and single view. But since i am using jquery for javascript stuff on my web, and had already jquery_thickbox installed, and wt_gallery only support kj_lightbox2 or perfectlightbox, i decided on hack the jquery_thickbox support into it.
And here is how it is done
$content = '<a href="uploads/tx_wtgallery/popup/'.$image_result.'" rel="lightbox" title="">';
$content .= $imagetag;
$content .= '</a>'; And place right under it: } elseif ($js_popup == 'thickbox' AND t3lib_extMgm::isLoaded('jquery_thickbox',0)) {
$content = '<a href="uploads/tx_wtgallery/popup/'.$image_result.'" rel="gallery55" title="" class="thickbox">';
$content .= $imagetag;
$content .= '</a>';
}
- 1. install jquery_thickbox on your system
- 2. install wt_gallery on your system
- 3. edit the file typo3conf/ext/wt_gallery/pi1/class.wtgallery_pi1.php and search for the following code:
$content = '<a href="uploads/tx_wtgallery/popup/'.$image_result.'" rel="lightbox" title="">';
$content .= $imagetag;
$content .= '</a>'; And place right under it: } elseif ($js_popup == 'thickbox' AND t3lib_extMgm::isLoaded('jquery_thickbox',0)) {
$content = '<a href="uploads/tx_wtgallery/popup/'.$image_result.'" rel="gallery55" title="" class="thickbox">';
$content .= $imagetag;
$content .= '</a>';
}
- 4. edit the file typo3conf/ext/wt_gallery/ext_typoscript_constants.txt and search for the following code:
- Links: typo3.org/extensions/repository/view/wt_gallery/2.6.3/ typo3.org/extensions/repository/view/jquery_thickbox/2.1.1/ bugs.typo3.org/view.php
- Files:
T3X_wt_gallery-2_6_3-z-200806282103.t3x1.4 M
Displaying results 1 to 2 out of 2
SEO4u Internet Marketing
Wednesday, 27-01-10 23:20
Great post did you ever update to new versions? There seems to have been lots of changes in wt_gallery. Thanks from: SEO internet marketing Company.
Andreas Luthmann
Wednesday, 24-09-08 07:50
well done!
