WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Album & Gallery title display (20 posts)

  1. det100
    Member
    Posted 5 years ago #

    Can the title of Album or Gallery be displayed?

  2. _ap_
    Member
    Posted 5 years ago #

    Albums title:

    open nggfunctions.php

    search this (line 390-400)

    *********************************************

    if (!empty($sortorder)) {
    $gallery_array = unserialize($sortorder);
    }

    $out = '<div class="ngg-albumoverview">';

    if ( is_array($gallery_array) )
    $out .= nggCreateAlbum( $gallery_array, $mode, $albumID );


    *********************************************

    and replace this:

    *********************************************

    if (!empty($sortorder)) {
    $gallery_array = unserialize($sortorder);
    }

    $albumName = $wpdb->get_var("SELECT name FROM $wpdb->nggalbum WHERE id = '$albumID' ");

    $out = '<div class="ngg-albumoverview"><h1>'.$albumName.'</h1>';

    if ( is_array($gallery_array) )
    $out .= nggCreateAlbum( $gallery_array, $mode, $albumID );


    *********************************************

  3. Alex Rabe
    Member
    Posted 5 years ago #

    Better -> look for the template album-compact.php or album-extend.php

  4. mamax
    Member
    Posted 5 years ago #

    Hi,

    I want also to display the gallery Title, while a gallery is displayed.

    I check in the gallery.php template and I added the line:
    <h3><?php echo $gallery->title ?></h3>

    But it doesn't work. what is the variable contaning the gallery title?

    Regards

  5. Francesco
    Member
    Posted 5 years ago #

    same problem mamax... any news??

  6. infected
    Member
    Posted 5 years ago #

    Better -> look for the template album-compact.php or album-extend.php

    Hi alexrabe!

    Could you explain which code have to be inserted in this files to display the album titles? I tried _ap_´s code but it doesn´t work.

    Thanks!

  7. infected
    Member
    Posted 5 years ago #

    *PUSH*

    Anyone could help?

  8. sjardim
    Member
    Posted 5 years ago #

    To display the gallery title, look here:
    http://wordpress.org/support/topic/228884

    But I can't display the album title yet.

  9. infected
    Member
    Posted 5 years ago #

    Thanks for the link! As you can see here (screenshot) the gallery titles are displayed well... That´s not the problem. But the screenshot shows 3 albums that are listed on one page. To get a better overview which gallery belongs to which album it would be better to display the album titles. This is what it should look like (screenshot 2).

  10. audios89
    Member
    Posted 5 years ago #

    Infected, I apologize for hijacking threads like this, but on the screenshots you posted, I was wondering how to get multiple compact albums to line up with one another like that. When I enter the code to add one on my page they always stack on top of one another. What do I need to do in order to make them adjacent like this? Many thanks!

  11. infected
    Member
    Posted 5 years ago #

    @audios89: Go to gallery options into the gallery tab. There you enter 0 at column count as well as count of pics per side.

    After that you can display each album with

    [album id=1 template=compact]

    [album id=2 template=compact]

    [album id=3 template=compact]

    and so on...

    If you have an idea how to display the album titles above each album you´re welcome.

  12. audios89
    Member
    Posted 5 years ago #

    @infected. Thanks for the input, although even with a 0 in both said columns, I still get this stacking issue. Those 0 values are affecting the gallery layout itself, and not the album(s) layout.

    You can see that on this page: http://www.leydigproject.com/?page_id=34

    the problem is pretty obvious. I am unsure of how to fix this. Sorry, don't have any idea about getting the album titles to appear above atm. Any other ideas? Thanks

  13. infected
    Member
    Posted 5 years ago #

    I don´t really understand your problem... I take a look at the linked website. It looks like you have created 2 albums. Each of them contains 1 gallery. Put both galleries in 1 album, then they´re displayed side by side.

  14. audios89
    Member
    Posted 5 years ago #

    Ah, that worked. So simple, I guess the most obvious solutions are sometimes the most difficult!

  15. infected
    Member
    Posted 5 years ago #

    I can´t imagine, that nobody has a solution for the album title problem. Any help is welcome. I tried to contact the plugin author (alexrabe) but he also do not response to my mail...

  16. Alex Rabe
    Member
    Posted 5 years ago #

    If I understand you correct then you would like to display the album name ?

    <?php echo $album->name?>

    This should work with v1.1

  17. infected
    Member
    Posted 5 years ago #

    Many many thanks! This works perfectly!

  18. ia
    Member
    Posted 5 years ago #

    I tried to use <?php echo $album->name?> in a custom album template but it says "Album overview" instead of the name of the album. When I add

    $album = nggdb::find_album( get_query_var('album') );

    beforehand, the text goes blank. var_dump($album) gives bool(false).

    Is there any way to add the album title in the template without modifying the core code as advised by _ap_?

    Edit: Using WP 2.8.2 & NextGen Gallery 1.3.5.

  19. Kitefr
    Member
    Posted 5 years ago #

    same problem like me sofimi :/

    i'll wait a solution for this ^^

  20. leeluv
    Member
    Posted 5 years ago #

    same problem for me
    *push*

    I want to display the album title of the gallery in the gallery overview. the first page it is displayed. after changing page I didn't get $album->name anymore.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.