• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization Now you can force gallery thumbnails to be larger :)

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #127 (If I Could Catch a Rainbow), cambyses.

Voting is now open for DSS #128 (Sunrise or Sunset). Voting is open through May 16th at 8:00 PM PDT

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Page 2  of  14
1 2 3 4 5 6 12 Last »
Old Oct-30-2011, 03:13 PM
#21
pgman is offline pgman
Major grins
Is it possible to change the size of the thumbnails in the gallery itself?

Thanks
__________________
Thanks
http://foto-biz.com
The Business of Being a Photographer -- Lightroom Q&A
Old Oct-30-2011, 04:32 PM
#22
Lamah is offline Lamah OP
Software developer
Quote:
Originally Posted by pgman View Post
Is it possible to change the size of the thumbnails in the gallery itself?

Thanks
I think that SmugMug has a setting for this in their JavaScript, I'll have a poke around.

EDIT: Looks like viewers automatically get large thumbnails on large screens (>1600 pixels wide), are you sure you want to override this? Small thumbs seems like a good compromise to get more thumbnails to fit in that space, otherwise the page sizes get smaller.

Last edited by Lamah; Oct-30-2011 at 04:49 PM.
Old Oct-30-2011, 05:00 PM
#23
Lamah is offline Lamah OP
Software developer
Quote:
Originally Posted by pgman View Post
That looks great. I noticed that your Recent Photos box has a stretchy width, and on large displays you are ending up with the second line of thumbnails having fewer thumbs on it than the first (or worse, two full lines and a third line with just two thumbs on it). If you decide on a fixed number of rows to display, like 2, you can solve that. Just set # of photos to something large like 20, then add this to your CSS:

Code:
#recentPhotosBox .boxBottom { height:350px; overflow:hidden; }
Adjust that height to change the number of rows to display.
Old Nov-01-2011, 05:16 PM
#24
dbveto is online now dbveto
Major grins
dbveto's Avatar
Ok I installed this but it did not center so and the album descriptions got cut off. I removed the scripts but the thumbnails have not change back. How can I revert back?
__________________
Dennis
http://www.realphotoman.com/
Work in progress
http://www.realphotoman.net/ Zenfolio 10% off Referral Code: 1KH-5HX-5HU
Old Nov-01-2011, 05:23 PM
#25
Lamah is offline Lamah OP
Software developer
Quote:
Originally Posted by dbveto View Post
Ok I installed this but it did not center so and the album descriptions got cut off. I removed the scripts but the thumbnails have not change back. How can I revert back?
You've still got the code in your head tag section.
Old Nov-01-2011, 05:31 PM
#26
dbveto is online now dbveto
Major grins
dbveto's Avatar
Quote:
Originally Posted by Lamah View Post
You've still got the code in your head tag section.
I removed it, but a couple of my album descriptions are cut off?
__________________
Dennis
http://www.realphotoman.com/
Work in progress
http://www.realphotoman.net/ Zenfolio 10% off Referral Code: 1KH-5HX-5HU
Old Nov-01-2011, 07:32 PM
#27
Lamah is offline Lamah OP
Software developer
You've also got the code in the end of your CSS section.
Old Nov-01-2011, 09:52 PM
#28
dbveto is online now dbveto
Major grins
dbveto's Avatar
Quote:
Originally Posted by Lamah View Post
You've also got the code in the end of your CSS section.
Thanks I have all my thumbs and my descriptions are all showing.
__________________
Dennis
http://www.realphotoman.com/
Work in progress
http://www.realphotoman.net/ Zenfolio 10% off Referral Code: 1KH-5HX-5HU
Old Nov-22-2011, 08:30 AM
#29
Paris is offline Paris
Designer Photographer
Lamah... wondering how I can make my gallery thumbs 'smaller'.
Any thoughts?
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Old Nov-24-2011, 02:19 PM
#30
Lamah is offline Lamah OP
Software developer
Yup, that's possible, do you want to convert all your thumbnails to the smaller versions?
Old Nov-24-2011, 02:38 PM
#31
Paris is offline Paris
Designer Photographer
YES... I just find that 5x5 rows of thumbs take up too much space and really detract from the main photo.
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Old Nov-24-2011, 02:56 PM
#32
Lamah is offline Lamah OP
Software developer
Oh, you just mean the thumbs inside the gallery, like on this page: http://www.richardparisphotography.c...45002541_jJA3c ?

You can do that by adding this line to your top JavaScript in the advanced customizer:

Code:
SM.SmugMug.config.autoThumbSize = false;
Old Nov-24-2011, 03:49 PM
#33
Paris is offline Paris
Designer Photographer
Those for sure, however, I would also like to make the Gallery pages thumbs smaller.
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Old Nov-24-2011, 03:56 PM
#34
Lamah is offline Lamah OP
Software developer
In that case, here's a modification of the "make thumbnails larger" script which makes them smaller instead:

In the advanced customization, add this to the end of your CSS:

Code:
/* Force gallery thumbnails to be smaller version 5
 * Ref: http://www.dgrin.com/showthread.php?t=207570
 */
#galleriesBox .photo img[src*="/random.mg?"],
#sharedGalleries .photo img[src*="/random.mg?"],
#featuredBox .photo img[src*="/random.mg?"],
#shareGroups .photo img[src*="/random.mg?"],
#subcategoriesBox .photo img[src*="/random.mg?"],
#categoriesBox .photo img[src*="/random.mg?"] {
  display:none;
}
Add this to the end of your Head Tag:

Code:
<!-- Force gallery thumbnails to be smaller version 5 -->
<!-- Ref: http://www.dgrin.com/showthread.php?t=207570 -->
<script type="text/javascript">
if (typeof SM.Homepage != 'undefined')
	SM.Homepage.RandomThumbManager = function(config) {
		var _defaultConfig = {};
		var _config = YAHOO.lang.merge(_defaultConfig, config);
		var _getRandomThumbInfo = function(albumsInfo) {
			var postArray = [];
			var postData = "tool=getAlbumRandomThumbsInfo";

			albumsInfo = albumsInfo.replace(/Thumb/g, "Tiny");

			postArray.albumsInfo = albumsInfo;
			var handleSuccess = function(response) {
				try {
					var returnedData = YAHOO.lang.JSON.parse(response.responseText);
					var thumbsInfo = returnedData.randomThumbsInfo;
					_drawRandomThumbs(thumbsInfo);
				} catch (x) {
				}
				return;
			};
			var handleFailure = function(response) {
				return;
			};
			var callback = {
				'success' : handleSuccess,
				'failure' : handleFailure,
				'scope' : this
			};
			for ( var i in postArray) {
				postData += "&" + i + "=" + postArray[i];
			}
			var xhr = YAHOO.util.Connect.asyncRequest('POST', '/rpc/homepage.mg',
					callback, postData);
		};
		var _drawRandomThumbs = function(randomThumbsInfo) {
			var numberOfThumbs = randomThumbsInfo.length;
			var currentThumb;
			var imageElement;
			for ( var i = 0; i < numberOfThumbs; i++) {
				currentThumb = randomThumbsInfo[i];
				imageElement = YD.get(currentThumb.albumID + '_'
						+ currentThumb.albumKey);
				if (imageElement && imageElement !== 'undefined') {
					YD.setStyle(imageElement, 'background', 'url('
							+ currentThumb.url + ') center no-repeat');
					imageElement.height = currentThumb.height;
					imageElement.width = currentThumb.width;
				}
			}
		};
		this.drawRandomThumbs = function(albumsInfo) {
			_getRandomThumbInfo(albumsInfo);
		};
	};
</script>
And add this to your Bottom JavaScript:

Code:
//Force gallery thumbnails to be smaller version 5
//Ref: http://www.dgrin.com/showthread.php?t=207570

YE.onDOMReady(function() {
	var boxids = [ "galleriesBox", "categoriesBox", "subcategoriesBox", "shareGroups", "featuredBox", "sharedGalleries" ];
	
	for (var i = 0; i < boxids.length; i++) {
		YD.getElementsByClassName("miniBox", "div", boxids[i], function(miniBox) {
			YD.removeClass(miniBox, 'albumLarge');

			var photoDiv = YD.getFirstChild(miniBox);
	
			var thumb = YD.getFirstChild(YD.getFirstChild(photoDiv));

			var src = thumb.src;

			if (src.match(/\/random\.mg\?/))
				thumb.src = 'http://cdn.smugmug.com/img/spacer.gif';

			YD.removeClass(photoDiv, 'photoLarge');
			YD.addClass(photoDiv, 'photo');			

			// Switch URLs from Tiny to Thumb size (150x150 pixel)
			thumb.src = src
					.replace(/\/Th\//g, "/Ti/")
					.replace(/-Th(-\d+)?\.jpg/g, "-Ti$1.jpg")
					.replace(/Size=Thumb/g, "Size=Tiny");

			/* If we can tell if the image is vertical or horizontal, pre-stretch the image
			 * that's already there.
			 */
			if (thumb.width && thumb.height) {
				if ((thumb.width >= 150 || thumb.height >= 150) && !src.match(/spacer\.gif/)) {
					if (thumb.width > thumb.height) {
						YD.setStyle(thumb, "width", "100px");
						YD.setStyle(thumb, "height", "auto");
					} else {
						YD.setStyle(thumb, "width", "auto");
						YD.setStyle(thumb, "height", "100px");
					}
				} 
			}
		});
	}	
});
Old Nov-24-2011, 04:01 PM
#35
Paris is offline Paris
Designer Photographer
Unreal man!
I have asked for this fix since I joined this group and everyone said it was not possible and you did it with a line. Brilliant.
Thank you!
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Old Nov-25-2011, 07:12 AM
#36
Paris is offline Paris
Designer Photographer
Hey Lamah,
I love the small thumbs...

QUESTION: Is it possible to limit the number of rows down?

BTW... I see you live in New Zealand. I have a friend who is working on the new Hobbit movie.
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Old Nov-25-2011, 01:26 PM
#37
New England Photography is offline New England Photography
Beginner grinner
New England Photography's Avatar
Hey Lamah,
Can you post the latest and greatest version of your modification?. It would make life easier for us who want to make our thumbs bigger but dont want to spend the weekend messing with the CSS code.

Thanks,
Stan
Old Nov-25-2011, 01:31 PM
#38
dbveto is online now dbveto
Major grins
dbveto's Avatar
Quote:
Originally Posted by New England Photography View Post
Hey Lamah,
Can you post the latest and greatest version of your modification?. It would make life easier for us who want to make our thumbs bigger but dont want to spend the weekend messing with the CSS code.

Thanks,
Stan
That code is in the first post.
__________________
Dennis
http://www.realphotoman.com/
Work in progress
http://www.realphotoman.net/ Zenfolio 10% off Referral Code: 1KH-5HX-5HU
Old Nov-25-2011, 06:13 PM
#39
Lamah is offline Lamah OP
Software developer
Quote:
Originally Posted by Paris View Post
QUESTION: Is it possible to limit the number of rows down?
Yes, that is possible. You can set the number of photos per page to a fixed number by adding this to your Bottom Javascript:

Code:
if (typeof SM.stretchy != 'undefined') {
	var numFixedPhotosPerPage = 2;
	
	var oldAutoCheckWidth = SM.stretchy.autoCheckWidth;
	
	SM.stretchy.autoCheckWidth = function() {
		var result = oldAutoCheckWidth();
		
		return [Math.min(numFixedPhotosPerPage, result[0]), result[1], result[2]];
	};
}
This code is set to restrict the number of photos per page to 2, so you might want to change that to a larger number on the second line.

If you want a fixed number of rows, rather than a fixed number of photos, things get a bit more complicated. Put this in your Bottom JavaScript instead:

Code:
/* Fixed number of thumbnail rows, version 1. Ref: http://www.dgrin.com/showthread.php?p=1704739#post1704739 */
if (typeof SM.stretchy != 'undefined') {
	var maxThumbRows = 2;
	
	var oldStretchyAutoCheckWidth = SM.stretchy.autoCheckWidth;
	var oldStretchyInit = SM.stretchy.init;

	var thHeight = [];

	SM.stretchy.init = function(attr) {
		thHeight.Tiny = SM.stretchy.findTrueSize('TinyPhotoSample').height;
		thHeight.Thumb = SM.stretchy.findTrueSize('ThumbPhotoSample').height;
		
		return oldStretchyInit.call(SM.stretchy, attr);
	};
	
	SM.stretchy.autoCheckWidth = function() {
		var result = oldStretchyAutoCheckWidth();

		var newThumbCount = result[0];
		var newSize = result[1];
		var proposedThumbSize = result[2];

		var thumbHeight = thHeight[proposedThumbSize];
		var thumbsPerColumn;

		switch (newSize) {
			case "Small":
				thumbsPerColumn = 3;
				if (proposedThumbSize === "Thumb") {
					thumbsPerColumn = 2;
				}
				break;
			case "Medium":
				thumbsPerColumn = 4;
				if (proposedThumbSize === "Thumb") {
					thumbsPerColumn = 3;
				}
				break;
			case "Large":
				thumbsPerColumn = Math.round(600 / thumbHeight);
				break;
			case "XLarge":
				thumbsPerColumn = Math.round(768 / thumbHeight);
				break
			case "X2Large":
				thumbsPerColumn = Math.round(960 / thumbHeight);
				break;
			case "X3Large":
				thumbsPerColumn = Math.round(1200 / thumbHeight);
				break;
			default:
				thumbsPerColumn = 1;
		}

		var newThumbHoriz = Math.ceil(newThumbCount / thumbsPerColumn);
		
		newThumbCount = Math.min(newThumbCount, newThumbHoriz * maxThumbRows);
		
		return [ newThumbCount, newSize, proposedThumbSize ];
	};
}
Quote:
BTW... I see you live in New Zealand. I have a friend who is working on the new Hobbit movie.
Neat :). Probably half of New Zealand will get roped in as extras too lol.

Last edited by Lamah; Nov-25-2011 at 06:23 PM.
Old Nov-28-2011, 12:25 PM
#40
Paris is offline Paris
Designer Photographer
Thanks again! Works great.
__________________
Thanks,
Richard.
http://www.richardparisphotography.ca/
Page 2  of  14
1 2 3 4 5 6 12 Last »
Tell The World!  
Similar Threads Thread Starter Forum Replies Last Post
Gallery Square Thumbnails...NOT MomaZunk SmugMug Customization 2 Sep-15-2010 03:22 PM
Making gallery thumbnails larger. Lani SmugMug Customization 2 Sep-12-2010 04:43 PM
Large Gallery Thumbnails Soppy SmugMug Customization 1 Sep-04-2010 12:07 PM
Problems w. Thumbnail Stye & HTML voicelit SmugMug Customization 14 Aug-03-2010 08:25 AM
Force gallery comments to display on gallery pages only? DJDigitalDave SmugMug Customization 0 Mar-02-2010 05:39 AM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump