Problems with Galleries

Hi there everyone,

i'm pretty new to concrete5 but i really love how it works.. i did one website yet and am actually working on the second.

here the link to the actual one i'm working on:
EDIT:the site is strangely not working if you dont login.. i added screenshot so you get a picture of the site

well, as you see you have two navigations, one for content and one for the galleries. i can load all the content perfectly via ajax and it will just update my content-div.

anyhow: i tried the same procedure with the galleries, but since i had some problems loading the right javascripts which the gallery blocks used, i forgot about that approach.

now, i kind of started over again. the gallery-navigations is now create through a loop over the existing filesets.
<nav id="nav_gly">
         $filesets = FileSet::getMySets($user = false);
            foreach ($filesets as $fset) {
           echo "<li><a href='#' name='".$fset->getFileSetName()."'>".$fset->getFileSetName()."</a></li>";

then i have a jquery listener:
$("#nav_gly a").live("click",function()
       var glyName = $(this).attr("name");
       var pageToLoad = "/bediff/themes/bediff/scripts/gallery.php";
       $.get(pageToLoad, {"param":glyName}, function(data){
      return false;

so, this is working fine so far and i get into the php-script and get the actual fileset i clicked and therefore want to show later..

BUT: my gallery.php won't work if i add
defined('C5_EXECUTE') or die("Access Denied.");
and always returns ACCESS DENIED.. and that's because i can't use any C5-Loaders and Stuff (Loader::model('file_set');)..

Has anyone a good idea or a better solution to work around my problem?
it is already very well appreciated! ;)

cheers chrisi

1 Attachment

View Replies:
chriisi replied on at Permalink Reply
sorry the right URL for the website is:
marcsublet replied on at Permalink Reply
Perhaps you have to work in a different way:

Try a wonderful (free) module Sortable Fancybox Gallery -
It comes very easy to handle galleries related to a file set.

Then create a page "Gallery" and every time you create a new gallery it's a new child page with it's own URL.

Then it's easy to use autonav or pagelist to create a navigation which lists every galleries below Gallery and you can access them with their native C5 url. You can also add a thumbnail (custom attribute) to the page if needed.

Last step is to set the default view (in the Page types) with placeholder content and add the Page type to the Composer for an easy editing. Then you have a solid as rock gallery system.
chriisi replied on at Permalink Reply
thanks marc,

the only problem i'll probably face: i have to load all the stuff via ajax, and if i tried to load galleries via ajax, i had major issues loading the javascript rightly (as i can recall, it's because the blocks mostly put their js-calls in the head and you won't get it if you just try to load a certain div in the body..
JohntheFish replied on at Permalink Reply
Blocks by AJAX has a template for Sortable Fancybox Gallery
chriisi replied on at Permalink Reply
uhh that sounds great!
JohntheFish replied on at Permalink Reply
The php that responds to your ajax request needs to be in a /tools folder. That way c5 creates a minimal c5 environment, but lets the tool deliver the entire response.

You can also use block actions.

See my AJAX Lessons Howto and associated addon for examples. Its getting a bit dated, but the principles remain valid.
chriisi replied on at Permalink Reply
thanks john,

so that means i can put it under /root/tools or /root/concrete/tools..
well, i tried it.. but i still get the same ACCESS DENIED.. probably i have to call it differently?!

i'll take a look at your ajax-lessons.. thanks!
JohntheFish replied on at Permalink Reply
it would be


Never put anything of your own or changes within
/root/concrete !!!!
chriisi replied on at Permalink Reply

well, i just bought the blocks by ajax and will try to use it with the galleria gallery.. i'll ask u if i need any support!

thanks again!
JohntheFish replied on at Permalink Reply
Before investing too much time, check that Galleria (even without ajax) will render and work in Google Chrome. Last time I checked it completely puked. There are some comments in the Galleria addon forum and on more if you google it.