WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Have different thumbnail size for albums than in galleries (14 posts)

  1. mandawahoo
    Member
    Posted 4 years ago #

    I feel like this is a very simple fix, but it has been a long week and my brain is not working! I am setting up an album and the thumbnail for each gallery is taken from a thumbnail within the actual gallery, which has been set to a certain size using the nextgen resize thumbnail function. What I need to do is have larger thumbnails appear in the album (to click INTO each gallery), but still keep the smaller thumbnail size within each gallery. Does that make sense?

    Any advice would be greatly appreciated.
    Thank you!

  2. mandawahoo
    Member
    Posted 4 years ago #

    The only solution I can think of is creating a directory with customized thumbnails, and linking to the filename based on its ID#

    I tried:
    <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $galleryID ?>.jpg" />

    But the galleryID is not pulled in. Any suggestions on how I can do that?

    Thank you,
    Amanda

  3. cdpayne
    Member
    Posted 4 years ago #

    Amanda,

    I'm not sure which "style" you are using on your page, I am using hovercraft. In my case I can edit hovercraft.css in the css directory and change the dimensions in .ngg-album-compactbox .Thumb You need to find the part of the css file that manages the thumbnail attribute size for your style.

    Let me know if it works or if I can help more.

    Regards,

    Chris

  4. mandawahoo
    Member
    Posted 4 years ago #

    I am currently using the expanded rather than the compact. I guess I can change to the compact, but since I want the thumbnails to be larger than the default, it is unfortunate that the only way to make this work is to enlarge the image beyond its true size.

    Thanks for the tip though. I might have to resolve it this way for the time being!

  5. cdpayne
    Member
    Posted 4 years ago #

    Ok, use .ngg-thumbnail img then as that is where the style for the extent album attributes are defined.

    I just tested and by adding values for

    width:200px;
    height:100px;

    as there wasn't anything in this class previously and it works fine in extended display. Mind you if you the width/height ratio isn't to scale the thumbnail might be distorted.

    Chris

  6. mandawahoo
    Member
    Posted 4 years ago #

    Thanks, I was hoping to find an option that didn't involve the CSS and actually involved a separate image than the default thumbnail. I guess this quick fix will have to work for now. Anyone else have any thoughts on how I can make the permalink work?

  7. cdpayne
    Member
    Posted 4 years ago #

    In response to your second post, have you tried this?

    <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" />

    Chris

  8. mandawahoo
    Member
    Posted 4 years ago #

    Yes, thank you! That is exactly what I was trying to get to work!

    Many many thanks. This is great :)

  9. StevenWP
    Member
    Posted 3 years ago #

    Hi all,

    I have the same question as mandawahoo, but I don't know where to paste the code.

    <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" />

    Can somebody explain?

    Thanks in advance!

  10. StevenWP
    Member
    Posted 3 years ago #

    Hi all,

    I think I have figured out where to use the code.
    This is what mine looks like now, but it doesn't work :
    I have created the "albumthumbs" folder & in the CSS file I have set a width and height for the .ngg-thumbnail img class, but the image itself doesn't show up.

    <?php foreach ($galleries as $gallery) : ?>
    
    	<div class="ngg-album">
    		<div class="ngg-albumtitle"><a href="<?php echo $gallery->pagelink ?>"><?php echo $gallery->title ?></a></div>
    			<div class="ngg-albumcontent">
    				<div class="ngg-thumbnail">
    					<img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" />
    				</div>
    				<div class="ngg-description">
    				<p><?php echo $gallery->galdesc ?></p>
    				<?php if ($gallery->counter > 0) : ?>
    				<p><strong><?php echo $gallery->counter ?></strong> <?php _e('Photos', 'nggallery') ?></p>
    				<?php endif; ?>
    			</div>
    		</div>
    	</div>
    
     	<?php endforeach; ?>

    Does anybody have an idea?
    Thank you very much!

  11. StevenWP
    Member
    Posted 3 years ago #

    Hi folks,

    Here I am again :-)
    I have found the answer to my questions.

    When I installed WordPress I decided to change the name of the "wordpress" folder to something obscure. for example: "mywpcore", this was a tip from Chris Coyier & Jeff Starr in the Digging into WordPress book.

    Thats why I think i had to modify the code to get it working:

    <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/mywpcore/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" />

    Is this still safe or is this a security leak?

    I have one last question. Now that we have modified the Nextgen Gallery script, is there a way to add an option in the Gallery administration panel, so the website editor can still easily choose/upload the album thumbnail?

    That would be soooo great!
    Thanks again ;-)

  12. Vidhu
    Member
    Posted 3 years ago #

    Hi...
    I too need the larger thumbnails appear in the album and smaller thumbnails for the gallery. When i tried for the above solutions i don't know how to create customized thumbnails and save it in that albumthumbs folder. I'm working the same for the last couple of days but not getting any desired result.:(

    Any help at this time would be great for me...
    Thanks in advance.

  13. Vidhu
    Member
    Posted 3 years ago #

  14. Sprutt
    Member
    Posted 3 years ago #

    I was also looking for a way to have a different thumb as a preview image for my galleries from the thumbs inside the gallery.

    My solution is to add the image I want to use as the gallery preview image to the gallery, and create a new thumbnail for that image in the size/dimensions I want. Then exclude that image from showing in the gallery.
    Finally, to be able to select that excluded image in the "Preview image" dropdown, just go into manage-images.php and comment out line 275, which is holding the conditional statement for this. It looks like so:

    if ($picture->exclude) continue;

Topic Closed

This topic has been closed to new replies.

About this Topic