WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] v1.0 new template system / thumbnail captions agony (11 posts)

  1. justderek
    Member
    Posted 5 years ago #

    I've read through this thread as well as Alex's documentation, and it all feels very confusing.

    In pre-1.0 versions of NGG, the default thumbnail gallery style (nggallery.css version 1.43) natively supported captions under the thumbnails, like this. But now, in NGG 1.0+, there are no captions, and to get them back requires me to modify a template PHP file (gallery.php) and get it to call a new class in nggallery.css, and then put both files in my theme's root directory. Or in a subdirectory called nggallery, or some combination of the two... I can't tell for sure.

    I appreciate all the development that Alex et al. have done on this plugin, I really do. I'm just frustrated that the new version requires all this hackery from me just for my gallery to look the same as it did before. I don't know PHP. I do know some CSS, which had been enough before.

    I've spent hours on trial-and-error attempts to get this new template setup to show the captions under my thumbnails again, and I'm still nowhere. The post from Web Designer Wall which is the basis of this template system and its documentation so far is nifty, but I'm not trying to do all that. All I want is my gallery to look the same as it used to, and I don't understand why it has to be this difficult to make that happen.

    My still-captionless gallery page is at http://theatreneo.com/?page_id=22. Assuming there isn't a simple way to make the captions reappear without making a template gallery.php file, I guess these are my first questions:

    1. Does my customized nggallery.css file that goes in the root directory of my theme (right?) have to be a complete copy of /wp-content/plugins/nextgen-gallery/css/nggallery.css with my custom template styling added into it, or is it just a stylesheet, i.e., a file that contains my custom styling and nothing else?
    2. In gallery.php, do I need to define the class of my custom template? If so, where? Would it go in line 17, like so:
      <div class="ngg-galleryoverview" id="ngg-gallery-<?php echo $gallery->ID ?>" class="mytemplate">
      If so, is that all or does it go anywhere else in gallery.php as well?
    3. Am I supposed to rename gallery.php before I put it in my theme directory, like gallery-mytemplate.php?
    4. Would this be the right way to call the class in my modified CSS file/stylesheet:
      .mytemplate .ngg-gallery-thumbnail {
      	height: 115px;	/* fix for  inline/IE problem from WP Forums thread @  http://wordpress.org/support/topic/202931?replies=3 */
      }
      
      .mytemplate .ngg-gallery-thumbnail img {
      	border:1px solid #336666;		/* changed from #A9A9A9 */
      }
      
      .mytemplate .ngg-gallery-thumbnail img:hover {
      	background-color: #336666;			/* changed from #A9A9A9 */
      } 
      
      .mytemplate .ngg-gallery-thumbnail span {
      	/* Images description */
      	text-align:left;					/* ddw added styling */
      }
      
      /* For people with longish, long, or LOOONG names */
      	.mytemplate .ngg-gallery-thumbnail span .longish {
      		letter-spacing: -.5px;
      	}
      
      	.mytemplate .ngg-gallery-thumbnail span .long {
      		letter-spacing: -1.0px;
      	}
      
      	.mytemplate .ngg-gallery-thumbnail span .looong {
      		letter-spacing: -1.2px;
      	}
      
      /* show resume,  personal webpage, reel & etc. links in lightbox only, not in thumbnail gallery */
      	.mytemplate .ngg-gallery-thumbnail span .resumelink, .mytemplate .ngg-gallery-thumbnail span .weblink, .mytemplate .ngg-gallery-thumbnail span .reellink, .mytemplate .ngg-gallery-thumbnail span .photolink {
      	display:none;
      	}

      Sorry this post is so long. I really do appreciate any help very much.

  2. monodistortion
    Member
    Posted 5 years ago #

    1. Does my customized nggallery.css file that goes in the root directory of my theme (right?) have to be a complete copy of /wp-content/plugins/nextgen-gallery/css/nggallery.css with my custom template styling added into it?

    Yes.

    2. You shouldn't have to change line 17. It already has class="ngg-galleryoverview" and you can change the ngg-galleryoverview styles on lines 15-20 of nggallery.css

    3. If your template is named gallery-mytemplate.php then you would show the gallery like this [ nggallery id=1 template=mytemplate ]

    4. There's no reason to put .mytemplate before every style unless you have to.

    Are you still working on adding captions below the thumbnails? You'll need to add some php code to your gallery-mytemplate.php file.

  3. justderek
    Member
    Posted 5 years ago #

    Are you still working on adding captions below the thumbnails?

    All the description fields have been input into the Manage Gallery admin screen, if that's what you mean. If your question is whether I am still working on getting the captions to display correctly on my gallery page, then yes, I am still trying.

    You'll need to add some php code to your gallery-mytemplate.php file.

    Do you mean this (copied from Alex's explanation in the previous thread):

    <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box">
    		<div class="ngg-gallery-thumbnail" >
    			<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    				<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    			</a>
    		</div>
            <?php echo $image->description ?>
    	</div>

    If there's more php that also needs to be added/edited, I have no clue what it is or how to do it. As I mentioned earlier, I'm pretty much php-illiterate.

    Thanks, I took the leading .mytemplate out of the styles in my nggallery.css file (duh).

    I now seem to have the files in the right directories, because now I've gotten the captions to display... but unfortunately, they're not displaying the right way. The captions are showing up to the right of the thumbnails as unformatted text, like this. I'm fiddling around with the css to see if I can make them display right, but so far nothing I've tried has worked. Here's the link to my gallery again.

    Thanks again - I really appreciate the help.

  4. justderek
    Member
    Posted 5 years ago #

    I've posted an updated version of this question on the other thread, since it seems to still be active.

  5. johnscane
    Member
    Posted 5 years ago #

    I just updated my site and now I'm feeling your pain! This makes me so made that the option was taken out. I am an artist and I need to have descriptions such as title, medium, size etc. It seems like such a simple thing.
    I hope it gets fixed and works like it used to.

  6. Alex Rabe
    Member
    Posted 5 years ago #

    I need to take out this option to be more flexible for the future. Imagine how many options / settings do you have if all themes are not changed by a template.

    I will add a new template for the next release so a simple description field come back :-)

  7. RGGoode
    Member
    Posted 5 years ago #

    Alex, I am having the same issue and look forward to your next release with a template for the description field as described here. I've also come across another issue which is more pressing... I've posted about it here at Problem with links in Description Field under NexGen Gallery 1.0.2. I've tried to outline the issue as clearly as I can, but in brief, what's happening is this:
    when I add a link in the description field for an image, it seems to be causing an error when the image is placed in a post with the [singlepic=id] tag. The NexGEN effect is disabled, and some of the code is inserted into the post in front of the image.

    As noted in this discussion thread, my usage of the Description Field was working before but is not since I updated from v.0.99.1 to v.1.0.2.

    I love your Plugin and I'm very grateful for all of your hard work developing it. If you need any more information about the error, please let me know.

  8. eclecticmunk
    Member
    Posted 5 years ago #

    Boohooo!!! I've been trying to fix this ever since the latest "better" version came out and I still haven't been able to get alt-text captions under the thumbs.

    I've even tried deleting all my galleries, removing the folders, removing the plugin, dropping the database tables for ngg and reinstalling the whole lot with no luck. I run an organisation that re-homes lost and abused animals, and it's heavily reliant on the galleries. This is a HUGE problem for me. PLEASE help (I don't know CSS or PHP. Which is why I use a plug-in instead of hard-coding stuff.

    If anyone knows how to fix this, please let me know!!

  9. Jackson
    Member
    Posted 5 years ago #

    Here, easy - update your shortcodes:
    [nggallery id=x template=caption]

  10. katzw
    Member
    Posted 5 years ago #

    madjax: is this with the new beta version or 1.0? 1.0 doesn't work with the above shortcode, and i'm a bit scared to update the plugin without knowing.

    thanks,
    kat

  11. katzw
    Member
    Posted 5 years ago #

    nm, took the plunge with the php solution in the other thread instead. woot... and.. *whew*!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags