Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorsallam
    • CommentTimeSep 27th 2006
     
    Greetings

    This was asked several times, and ddejong was so kind to reply to many of these topics. Yet, no specific code was given to do it. So, here I'm asking again: how can we eliminate the 'collections; level, so that plogger defaults to albums directly.

    This is a public demand, because many of us do have a few albums and need to put them all in one collection, so no need to make the visitors click a collection to go to our albums page.

    I hope that ddejong, or someone knowedeable in coding, reads this, and gives us the exact code to edit in gallery.php file.

    Many thanks in advance :)
    • CommentAuthorsweetbrett
    • CommentTimeSep 30th 2006
     
    i'm interested in this too...i was just browsing around to see if anyone has done this before but i haven't seen anything yet. I'm going to start going thru the code, as I suspect it's probably as simple as changing a function call. If/when i figure it out, i'll post it here
    • CommentAuthorsweetbrett
    • CommentTimeSep 30th 2006 edited
     
    ok well here is my gallery.php hack. I only need 1 album for my site, so I didn't want to have to click a collection, then click an album to get to the pictures. I did a quick, dirty hack to make that happen. again, all of this is right in gallery.php:

    /* near the start of function the_gallery: */

    /* removed "collection" from the list of allowed levels. made album the default level, and made the default album '2' which is the value of the album all of my pictures are in. */

    $allowed_levels = array('album','picture','slideshow','search');
    if (!in_array($level,$allowed_levels)) {
    $level = 'album';
    };
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 2;

    /* in fucntion generate_breadcrumb: */

    /* case 'album': removed the collection stuff from the bread cumb */

    else
    $breadcrumbs = '<b>'.$album_name.'</b>';

    break;

    /* case: 'picture': also removed collection info from the breadcrumb */

    $breadcrumbs = $album_link . ' &raquo; ' . '<span id="image_name"><b>'.$picture_name.'</b></span>';
    • CommentAuthorsallam
    • CommentTimeOct 1st 2006
     
    Thanks aweetbrett, but somehow this code didnt work for me:

    $allowed_levels = array('album','picture','slideshow','search');
    if (!in_array($level,$allowed_levels)) {
    $level = 'album';
    };
    $id = isset($_GET["id"]) ? intval($_GET["id"]) : 2;

    it says that no pictures where found in that album. I also tried 0 instead of 2, but it didnt work either.
    • CommentAuthorSkril
    • CommentTimeOct 12th 2006
     
    By the way ... how many albums do you have in total ?