Not signed in (Sign In)

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

    • CommentAuthorjack
    • CommentTimeOct 9th 2005 edited
     
    I want to use those names as titles at the top of my page, in the place where I normally would add the wordpress tag single_cat_title(); or single_month_title();.

    I tried something like this:

    <?php
    $album_name = $_REQUEST['album_name'];
    echo $album_name;
    ?>

    but that's not working, probably because that variable hasn't been defined yet.
    •  
      CommentAuthormike
    • CommentTimeOct 9th 2005 edited
     
    Jack, if you download the latest version of the code you can see a function that I just wrote called generate_title() (in gallery.php), you can modify this to suit your needs.

    Then at the top of gallery.php, you can modify the $inHead variable to change the page title. For example,

    $title = generate_title($_GET["level"], $_GET["id"]);

    $gallery_url = $config["gallery_url"];
    $inHead = <<<EOT
    <link rel="stylesheet" type="text/css" href="${gallery_url}css/gallery.css" />
    <script type="text/javascript" src="${gallery_url}dynamics.js"></script>
    <title>${config[gallery_name]}: $title </title>
    EOT;
    • CommentAuthorjack
    • CommentTimeOct 10th 2005
     
    Thanks Mike. With a little tweaking of the function it worked. Although I had to cut and paste that function into the beta version of gallery.php, because the latest nightly (yesterday) doesn't work for me. I sent Anti an email about this. Large pictures instead of thumbs are shownm and no data is saved from the options menu (thumbnail height + yes/no intermediate image).

    But couldn't this function be made a little bit more userfriendly, like how WordPress uses its single_cat_title() etc.? So this would become album_title() and collection_title(). It's easier to place this line somewhere in the document than what I had to do.
    • CommentAuthorPieperLy
    • CommentTimeAug 10th 2006 edited
     
    hello,

    for the first: thanks for the great script.

    i have a problem with title-tag:
    i want titles - generate from collectionname or albumname, but code at the top from mike dont work.
    the error:
    Fatal error: Call to undefined function: generate_title() in /homepages/...

    my know-how on php is very little - but can anyway help me?

    oh, ...and sorry for my bad english.

    reagards from germany
    uwe

    ------------------------------------------

    hello again,

    i have found answer on http://www.plogger.org/forum/comments.php?DiscussionID=608&page=1#Item_13

    thanks and regards
    uwe