Thanks, I used page_html and page_footer too, code is there on footer, but no runned. :-( I get this error in IE debugger: jQuery not defined. If I add directly this code, then working. I don't understand...
Here is my code:
$thisplugin->add_filter('gallery_footer','isotope_footer_addons');
function isotope_footer_addons($html)
{
global $ISOTOPESET, $CONFIG, $CPG_PHP_SELF, $JS;
$footblock =
<<< EOT
<script type="text/javascript">
$(function (){
var $container = $('#isocontainer');
$container.imagesLoaded( function(){
$container.isotope({
itemSelector : '.photo'
});
});
$(".tiptip").tipTip();
EOT;
if ($ISOTOPESET['isotope_lbox'] == 1) {
$footblock .= <<< EOT
// Use this example, or...
// $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
// This, or...
// $('#gallery a').lightBox(); // Select all links in object with gallery ID
// This, or...
$('a.lightbox').lightBox({
imageLoading: 'plugins/isotope/lightbox2/images/lightbox-ico-loading.gif',
imageBtnClose: 'plugins/isotope/lightbox2/images/lightbox-btn-close.gif',
imageBtnPrev: 'plugins/isotope/lightbox2/images/lightbox-btn-prev.gif',
imageBtnNext: 'plugins/isotope/lightbox2/images/lightbox-btn-next.gif',
containerResizeSpeed: 350,
keyToClose: 'x',
txtImage: 'Kép:',
txtOf: ', Összesen:',
attribute: 'rel'
});
// Select all links with lightbox class
// This, or...
// $('a').lightBox(); // Select all links in the page
// ... The possibility are many. Use your creative or choose one in the examples above
EOT;
}
$footblock .= <<< EOT
});
</script>
EOT;
$htmlclose = $footblock."</body>";
$html = str_replace("</body>", $htmlclose, $html);
return $html;
}
Here is my direct code to html part, what working:
<script type="text/javascript">
$(function(){
var $container = $('#isocontainer');
$container.imagesLoaded( function(){
$container.isotope({
itemSelector : '.photo'
});
});
$(".tiptip").tipTip();
<?php if ($ISOTOPESET['isotope_lbox'] == 1) { ?>
// Use this example, or...
// $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
// This, or...
// $('#gallery a').lightBox(); // Select all links in object with gallery ID
// This, or...
$('a.lightbox').lightBox({
imageLoading: 'plugins/isotope/lightbox2/images/lightbox-ico-loading.gif',
imageBtnClose: 'plugins/isotope/lightbox2/images/lightbox-btn-close.gif',
imageBtnPrev: 'plugins/isotope/lightbox2/images/lightbox-btn-prev.gif',
imageBtnNext: 'plugins/isotope/lightbox2/images/lightbox-btn-next.gif',
containerResizeSpeed: 350,
keyToClose: 'x',
txtImage: 'Kép:',
txtOf: ', Összesen:',
attribute: 'rel'
}); // Select all links with lightbox class
// This, or...
// $('a').lightBox(); // Select all links in the page
// ... The possibility are many. Use your creative or choose one in the examples above
<?php } ?>
});
</script>