Support » Plugin: NGG Video Extend » [Plugin: NGG Video Extend] Feature request: Not show description in gallery template

  • Since this plugin uses the description field as the insert, when you view a gallery that uses the description template it adds the shortcode to the page and makes it look nasty.

    It would be nice to exclude it.

    It could be done in nggallery’s templates by parsing for [flv and if return=true to not show the description for the file, but could it be possible from within this plugin?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Thorned Rose


    Hiya, can you confirm that this has been resolved as this issue does not occur on our test server. Thanks! 🙂

    Yes it is resolved. But the plugin makes it where you cannot use html in the description field. I believe somehow the plugin should insert it’s own field for video urls instead of using the description field.

    I totally agree. It’s VERY frustrating that we can no longer use HTML in the description field!! I’m desperately trying to find a way around this … any suggestions?

    I actually came up with an (albeit clumsy) solution to this. Here’s what I did …

    1. In the file ngg-video-extend.jss (located in the ngg video extend plugin files) I erased the following code

    $(".ngg-gallery-thumbnail span").each(function (arr){
    	var theText = $(this).text();
    	if("[nggvid]") > -1) {
    		var theURL = theText.substring(theText.indexOf("[nggvid]")+8, theText.indexOf("[/nggvid]"));
    		var theReplacement = theText.replace("[nggvid]" + theURL + "[/nggvid]", "");

    2. In the file gallery-caption.php (located in the nextgen gallery plugin folder titled ‘view’) I added a class of ‘details’ to the span tag (I also moved the anchor tag over to encompass the span tag). So the whole ngg-gallery-thumbnail-box code looks like this

    <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
      <div class="ngg-gallery-thumbnail" >
        <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
          <?php if ( !$image->hidden ) { ?>
          <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
          <?php } ?>
          <span class="details"><?php echo $image->caption ?></span>

    3. In the description of the videos I wrapped my [nggvid][/nggvid] code in a span, so the whole description looks something like

    <h2>Bright Lights Dark City</h2>
    <h3>The rising of the sun</h3>

    4. Finally, in my theme’s style sheet I add this to hide the ugly shortcode

    .ngg-gallery-thumbnail:hover span.details {

    And that took care of it. It’s a bit annoying b/c now not only do I have to have my client use the shortcode in the description (it should totally have it’s own field I think), but I also have to ask him to wrap it in a div. However, I’m just happy to have a solution, and I’m SUPER grateful for this awesome plugin, small complaints aside. 😉

    FYI, for me changing the anchor tag to include the whole caption also has set up a lot more flexibility in styling. On hover over the thumbnail I can have background images and/or description text (ow with html!).

    I have a better one that will make it easier for your client. I commented out all the code in the ngg-video-extend.js file (You can delete all of it if you like but I decided to comment it out) and then I insert this:

    $(“.ngg-gallery-thumbnail a”).each(function (arr){
    if ($(this).attr(“title”).substr(0,5)==”Video”){

    I got this code from here

    You can change the width and height for the shadowbox to whatever you like. But instead of wrapping the video url in [nggvid][/nggvid] and putting it into the description box you can put the video url in the title box. Put the title on the first line in the description box and it will show up above the video in the shadowbox. You can now put html in the description if needed. I can’t remember if I may have done anything else… but try that and let me know if that works. I think it will be more simple for your client – I have a client using the same format with no problems.

    I was so psyched for this to work! However, when I tried it I ran into a couple of problems. First, the video player was the wrong size and no amount of changing the sizes in the above code would change that. (weird!) And secondly in order to get it to work I had to start the title out with “Video:” … since everything in the gallery is a video it doesn’t make sense to have “Video:” at the start of every description.

    Sadly I am too much of a javascript moron to know how to fix these two issues! I was feeling pretty proud of myself before for getting this all to work but now that I know someone else has come up with a more elegant solution for the client I want it!

    Any chance you can help me figure it out?

    THANKS!! 🙂

    I think you still have to set the size in the Shadowbox JS plugin options as well to the size you want. I’m not testing this right now – but I noticed under both the code and Shadowbox JS are set to the same width and height.
    As for the Video thing try this:

    $(“.ngg-gallery-thumbnail a”).each(function (arr){
    if ($(this).attr(“title”).substr(0,5)){

    I using my gallery for both images and video… however, you’ve got me thinking if the “Video” is necessary to use both.

    At first that didn’t do the trick, but somehow after playing around a bit it’s all working … thank you so much! This is MUCH more elegant than having to post the link wrapped in [nggvid] and <span> tags!! 🙂

    Glad to be of help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: NGG Video Extend] Feature request: Not show description in gallery template’ is closed to new replies.