Not signed in (Sign In)

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

    • CommentAuthorpascale
    • CommentTimeDec 2nd 2007
     
    Hello,
    I'm trying to make a simple loop using the abstration layer given by the API but in vain.
    I have a gallery test that contain a collection I created with 2 albums with pictures in them) but when I try to loop using collections or albums object, I always got : "No collection yet" !

    This is the code I'm using :

    <?php
    include("plog-globals.php");
    include_once("plog-load_config.php");
    include_once("plog-functions.php");

    if (plogger_has_collections())
    {
    print '<ul class="slides">';
    while(plogger_has_collections())
    {
    $row = plogger_load_collection();
    $desc = plogger_get_collection_description();

    print '<li class="thumbnail"><div class="tag"><a href="' . plogger_get_collection_url() . '">';

    // generate XHTML with thumbnail and link to picture view.
    print '<img class="photos" src="'.plogger_get_collection_thumb().'" title="'.$desc.'" alt="'.$desc.'" />';

    print '</a><br/>';

    print plogger_download_checkbox(plogger_get_collection_id());

    print plogger_get_collection_name().' <br />';
    print '<div class="meta-header">(';

    $num_albums = plogger_collection_album_count();
    print $num_albums . ' ';
    print ($num_albums == 1) ? "album" : "albums";

    print ')</div></div></li>';
    }
    print '</ul>';
    } else {
    print "No collections yet";
    }
    ?>

    I might be missing some initialisation in the first line of codes but I can't figure out which one.
    Please help guys.
    Thank you in advance.
    Pascale.
    •  
      CommentAuthorkent
    • CommentTimeDec 2nd 2007
     
    require('gallery.php'); ..perhaps ?
    • CommentAuthorpascale
    • CommentTimeDec 3rd 2007
     
    whe tried to include "gallery.php" I got a redeclare error.

    Is there any documentation around where I can find an explanation on how to initiate and use the Collection Loop, Album Loop and Picture Loop ?

    Regards.
    Pascale
    • CommentAuthorpascale
    • CommentTimeDec 5th 2007
     
    Can anyone help please
    ;-(

    Regards
    •  
      CommentAuthorkent
    • CommentTimeDec 5th 2007
     
    think this will work..

    <?php
    require('gallery.php');

    plogger_get_header();

    if (plogger_has_collections())
    {
    print '<ul class="slides">';
    while(plogger_has_collections())
    {
    $row = plogger_load_collection();
    $desc = plogger_get_collection_description();
    print '<li class="thumbnail"><div class="tag"><a href="' . plogger_get_collection_url() . '">';
    print '<img class="photos" src="'.plogger_get_collection_thumb().'" title="'.$desc.'" alt="'.$desc.'" />';
    print '</a><br/>';
    print plogger_download_checkbox(plogger_get_collection_id());
    print plogger_get_collection_name().' <br />';
    print '<div class="meta-header">(';
    $num_albums = plogger_collection_album_count();
    print $num_albums . ' ';
    print ($num_albums == 1) ? "album" : "albums";
    print ')</div></div></li>';
    }
    print '</ul>';
    } else {
    print "No collections yet";
    }
    plogger_get_footer();
    ?>
    •  
      CommentAuthormike
    • CommentTimeDec 8th 2007
     
    What file are you editing? If you are editing the theme template files you shouldn't need to include any additional PHP files. Just look at the theme files in \themes\default for an example.