please help me make 2 galleries work on the same page
Permalink Browser Info Environment
hi i have a site here:http://www.decacake.co.uk/our-cakes/birthday-novelty-cakes/...
you can see that i am trying to use two sortable galleries because my client seems to like using portrait and then landscape pictures.
my problem is that lightbox is not working with 2 galleries on the same page. is there a work around for this please?
thanks.
you can see that i am trying to use two sortable galleries because my client seems to like using portrait and then landscape pictures.
my problem is that lightbox is not working with 2 galleries on the same page. is there a work around for this please?
thanks.
Type: | Discussion |
---|---|
Status: | New |
i have one gal in the page defaults. then on the page i make from the template i add another when its needed.
i have cleared the cache with no change
this is a page i am testing on:
www.www.decacake.co.uk/our-cakes/testing...
light box is working with one gal. but if i add another it doesnt do anything when clicking a image.
i do have some custom js files being loaded. but when i remove these js files in the template and test. the light box still doesn't show but now it will go through to a separate page with the image instead of doing nothing.
Do you have any ideas of what could be causing this?
thanks
i have cleared the cache with no change
this is a page i am testing on:
www.www.decacake.co.uk/our-cakes/testing...
light box is working with one gal. but if i add another it doesnt do anything when clicking a image.
i do have some custom js files being loaded. but when i remove these js files in the template and test. the light box still doesn't show but now it will go through to a separate page with the image instead of doing nothing.
Do you have any ideas of what could be causing this?
thanks
I have no idea what is causing this... but if you're able to upgrade your site to the most recent version of Concrete5 (5.6.0.2), and then upgrade SortableFancyboxGallery to the most recent version (1.17), that should fix the problem because there is some code in the newest version of C5 that handles multiple javascript files better than older versions.
Otherwise, I haven't a clue (sorry).
Otherwise, I haven't a clue (sorry).
ok thank for that. my php version is needs upgrading before i can install new c5. :P
thanks
thanks
i can see that
jquery.fancybox-1.3.1.css?v=fd209705009c9cd89ea54c4fa566f384" />
is loaded twice in the source code.
i have copied over some single files from the latest concrete 5.
so i just nicked concrete/elements footer_required.php and header_required.php and used them in my old version of C5. i edited the header_required to not load jquery.
by using this code:
if ($u->isRegistered()) {
$this->addHeaderItem($html->css('ccm.base.css'), 'CORE');
$this->addHeaderItem($html->javascript('jquery.js'), 'CORE');
$this->addHeaderItem($html->javascript('ccm.base.js'), 'CORE');
}
i then added my own jquery to my template. using:
<?php
$u = new User();
$g = Group::getByName('Administrators');
$p = new Permissions($c);
if($u->isSuperUser()||$u->inGroup($g)){
?>
<?php
} else {
?>
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<?php
}
?>
this now at least goes through to another page when clicking a image. (using 2 gals)
jquery.fancybox-1.3.1.css?v=fd209705009c9cd89ea54c4fa566f384" />
is loaded twice in the source code.
i have copied over some single files from the latest concrete 5.
so i just nicked concrete/elements footer_required.php and header_required.php and used them in my old version of C5. i edited the header_required to not load jquery.
by using this code:
if ($u->isRegistered()) {
$this->addHeaderItem($html->css('ccm.base.css'), 'CORE');
$this->addHeaderItem($html->javascript('jquery.js'), 'CORE');
$this->addHeaderItem($html->javascript('ccm.base.js'), 'CORE');
}
i then added my own jquery to my template. using:
<?php
$u = new User();
$g = Group::getByName('Administrators');
$p = new Permissions($c);
if($u->isSuperUser()||$u->inGroup($g)){
?>
<?php
} else {
?>
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<?php
}
?>
this now at least goes through to another page when clicking a image. (using 2 gals)
ok i fixed it
fixed it
i had to comment out
$this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.1.pack.js'));
on line 20 of:
sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/controller.php
and hardcode it into my theme with:
<script type="text/javascript" src="/packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/fancybox/jquery.fancybox-1.3.1.pack.js?v=fd209705009c9cd89ea54c4fa566f384"></script>
fixed it
i had to comment out
$this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.1.pack.js'));
on line 20 of:
sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/controller.php
and hardcode it into my theme with:
<script type="text/javascript" src="/packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/fancybox/jquery.fancybox-1.3.1.pack.js?v=fd209705009c9cd89ea54c4fa566f384"></script>
Also, can you tell me if one of them is in a global area, or in a stack, or in the page defaults... but maybe the other one isn't?