Not signed in (Sign In)

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

    • CommentAuthorphpnovice
    • CommentTimeAug 12th 2010 edited
    Are there functions I can call that can be used to display the total number of albums and/or images in my gallery?

    This gallery contains [code] images in [code] albums.

    I am using a modified version of the default theme.
    • CommentAuthorboblennon
    • CommentTimeAug 13th 2010
    If the code you are using to display these numbers lies within a plogger installation envelope then there are a number of useful
    functions in the plog-admin-functions.php and plog_functions.php that you can use including:

    count_albums($parent_id = 0)
    count_pictures($parent_id = 0)

    check_mysql($host, $user, $pass, $database)

    It's important to recognize that routines must run in an active Plogger configured environment.

    If you want to display these numbers in one of your standard web pages (outside Plogger) you will need to access the database
    directly with the MySQL interface routines in PHP. You can get a start on how to do this by examining the code in the functions
    mentioned above.
    • CommentAuthorphpnovice
    • CommentTimeAug 13th 2010 edited
    I tried using this in collections.php but it gave me an error.

    <?php count_pictures($parent_id = 0); ?>Fatal error: Call to undefined function count_pictures()
    I am just guessing so forgive me if this is an incredibly stupid mistake.
    • CommentAuthorboblennon
    • CommentTimeAug 13th 2010
    The system is trying to tell you that you have either configured Plogger improperly or not included the plog-admin-functions.php at the location where you tried to tried to invoke the count_pictures function.

    Make sure you are running your code within the envelope.
    • CommentAuthorphpnovice
    • CommentTimeAug 13th 2010
    I see the other functions in collections.php appear to be in plog-functions.php.

    Is plog-admin-functions.php what controls the administration panel? So the theme pages can't access it?

    I am using the default file structure plogger/plog-content/themes/custom/collections.php.

    I don't see how it could be configured improperly, I just upgraded to Version 1.0-RC1 and everything else is working correctly.

    This isn't a big deal it was just something I thought might be easily available.
    • CommentAuthorphpnovice
    • CommentTimeAug 13th 2010
    I see where it gives me the totals under the Manage tab in the administration panel.

    I don't add photos all that often and when I do, it's a whole album, so I can just use regular text and update it manually.