Support » Requests and Feedback » [Plugin: NextGEN Gallery] Gallery description text?

  • Hi Alex

    I submitted this request a few months ago on your web site but I have noticed the forums have now been removed so I thought I’d submit it here again so you don’t forget =)

    When creating a gallery in the admin panel, you have the option of adding a title and description for it. But on the actual gallery page at the front end, this information isn’t displayed and there doesn’t seem to be a way to make it show. I’m not fussed about the title showing but I would like to include the description. Has this been implemented yet or is this something you may still be working on?

    Thanks, great plugin!

Viewing 12 replies - 1 through 12 (of 12 total)
  • 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?

    Look in nggfunctions.php

    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.

    Looks good so far

    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;


    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:

    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>';

    $out .= '<h3 class="gallerytitle">'.$gallerycontent-> galdesc.'</h3>';

    Can someone please tell me where do I enter the galleries’ description???

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: NextGEN Gallery] Gallery description text?’ is closed to new replies.