Admin link - not displaying when logged out

When I am logged out of zenphoto I cannot see the Admin link down the bottom of the page, when I am logged in I can.

The code being used to display this is:

<?php printAdminLink('Admin', '', ' | '); ?>

Is there anyway to print the admin link whether I am logged in or out, or something like a "Log In" to be displayed if I am not logged in without creating a link manually like this?

Admin

Thanks in advance,

Dave (FatalCure)

Comments

  • The following is a bit of code that I've used in the theme that I've developed for the wiki tutorial that I'm writing. Feel free to download the theme or use this bit of code if you like.

    What it does is show the following if you are not logged in:
    ZenPhoto 1.0.2 / Login

    And shows the following if you are logged in:
    ZenPhoto 1.0.2 / Admin / Sort Gallery / Logout

    Here's the code:
    `

    <?php<br />
    echo 'ZenPhoto ';

    printVersion();

    if (zp_loggedin()) {

    printAdminLink('Admin', ' / ', ' / ');

    printSortableGalleryLink('Sort Gallery', 'Manually Sort the Gallery');

    echo ' / Logout';

    } else {

    echo ' / ';

    printLink(WEBPATH.'/zen/admin.php', Login');

    }

    ?>

    `
  • Cheers
  • trisweb Administrator
    You can always just visit the /zen/admin.php url to log-in, and if you use the same computer it should stay logged-in with no disadvantage (except of course if you share the account). I can see where a login link would be useful though.
  • I am just really lazy.. /zen/admin.php takes longer then a click on a link.
  • you could just add a static link to zen/admin.php in your theme file...
  • trisweb Administrator
    Yep, that'd work. If you're logged in, it'll take you there, if not, it'll prompt for a login :)
Sign In or Register to comment.