Thanks for the note, currently it’s not displayed, I will have a look to make it more flexible
Any update on this? I’d love to have this on my site.
I’m very interested in this as well. Would it be possible to just give us a pointer as to where to look to add the code ourselves?
Alex, thanks for the quick response.
Here’s what I did. It may not be pretty code, as I’m new to this, but it works.
In the nggCreateGallery function, I added:
global $wpdb;
$galleriesOfAlbum = $wpdb->get_results('SELECT * FROM '.$wpdb->nggallery.' WHERE gid ='.$galleryID, OBJECT);
$galleriesOfAlbum = ngg_emulate_objekt_k($galleriesOfAlbum);
$gallerycontent = $galleriesOfAlbum[$galleryID];
near the beginning, and then added:
$out .= '<h3 class="gallerytitle">'.$gallerycontent->title.'</h3>';
to show the title where I wanted it.
If there is a more elegant way to do this, please let me know.
Alex, where would I have to look if I’d like to use HTML within the gallery description?
When I add br-tags as line-breaks, they get displayed just as plain text. I’ve been searching the code for strip_tags. Is this the right thing to look for? And where?
Thanks a bunch!
Hey, just created a quick solution myself!
In nggfunctions.php I added:
$gallerycontent = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
$gallerydesc = nl2br($gallerycontent->galdesc);
/*
$gallerydesc can be used as a variable for the gallery's description.
nl2br() enters a <br />-tag wherever a line-break has been entered
into the Gallery Description text-field in the NGG backend.
*/
Oh, and I’ve replaced
global $wpdb;
with
global $wpdb, $nggRewrite;
at the top of the particular function I’m using the variable in.
Think I got the code to display the descrip from here: http://wordpress.org/support/topic/170908?replies=6
I have tried to follow Jowens example. all that comes up is the gallery title not the actual description. or is that all that should be displayed, how can I display the gallery description. thanks!
I figured it out. I had to change the following from Jowens example
$out .= '<h3 class="gallerytitle">'.$gallerycontent->title.'</h3>';
to
$out .= '<h3 class="gallerytitle">'.$gallerycontent-> galdesc.'</h3>';
Can someone please tell me where do I enter the galleries’ description???