Can the title of Album or Gallery be displayed?
Can the title of Album or Gallery be displayed?
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 );
*********************************************
Better -> look for the template album-compact.php or album-extend.php
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
same problem mamax... any news??
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!
*PUSH*
Anyone could help?
To display the gallery title, look here:
http://wordpress.org/support/topic/228884
But I can't display the album title yet.
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).
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!
@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.
@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
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.
Ah, that worked. So simple, I guess the most obvious solutions are sometimes the most difficult!
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...
If I understand you correct then you would like to display the album name ?
<?php echo $album->name?>
This should work with v1.1
Many many thanks! This works perfectly!
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.
same problem like me sofimi :/
i'll wait a solution for this ^^
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.
This topic has been closed to new replies.