• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support Legacy SmugMug Customization List of Exposed JavaScript Variables...

Need some help with your New SmugMug Site?

Dgrin Challenges

They're back! Our latest series of Dgrin Challenges, the OOYCZ Challenges (Out of Your Comfort Zone), is a series of challenges to help you improve your photography by stepping out of your comfort zone and trying something new. Our challenge leader says "Consider it like a photography class with no diplomas.". Get started with OOYCZ by reading the Challenge Guide.

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

Looking for a little challenge? The Dgrin Mini-Challenges are a great way to challenge yourself. Take a moment to look through past winners and find the current Mini Challenge here.

From Around the Net

Enjoy a few of our favorite articles from around the 'net. If you have something you think we should see, post it here and we'll have a look.

Journeys

Landscapes

Sports

 
Thread Tools Display Modes
Page 1  of  2
1 2
Old Jan-28-2006, 08:06 PM
#1
dlobel is offline dlobel OP
IMYRLESS
List of Exposed JavaScript Variables...
Hi,

Is there a "published" list of JavaScript variables exposed by SmugMug?

Thanks.

-Dave-
Old Jan-29-2006, 04:24 AM
#2
devbobo is offline devbobo
LR whisperer
devbobo's Avatar
Quote:
Originally Posted by dlobel
Hi,

Is there a "published" list of JavaScript variables exposed by SmugMug?

Thanks.

-Dave-
Hi Dave,

The majority of smugmug customization is done by manipulation of HTML element via id or class tags using CSS or javascript (as per DHTML). There are javascript functions that smugmug use, that can be reused.

With knowing what you are trying to achieve, my best suggestion is to start with the Customization threads in the root of the SmugMug Customization forum.

Otherwise, post some more specific information and I am sure that someone will be able to point you in the right direction.

Another good starting point is to get the "Web Developer" extension for Firefox. It gives you the ability to expose html information like id and class tags inline will browsing the page.

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Jan-29-2006, 12:48 PM
#3
dlobel is offline dlobel OP
IMYRLESS
Hey David,

My quest starts with finding a relatively simple method of accessing the filename of an image as it was originally uploaded (not the SM ImageID). From reading several threads, filename might not yet be easily available, but it maybe possible through some JavaScript Tag manipulation. Or, might be obtainable via the API, but that would be another mountain to climb.

Also, I’ve read that JT maybe implementing some new methods which would allow JS access to filename and other pieces of information.

As for a list of known SM created JavaScript variables, this would help us all be more creative with our SM sites. Think of it as more tools for our toolbox.

I’ve installed FireFox and have looked at the DOM Inspector. And yes, I see that it will display JS variables that are in use. But only the one’s in use. Still doesn’t offer a complete list.

For some, their development scope requires the integration of the API. But there are plenty of users who can equally benefit (and who don’t have the wherewithal to use the API) from a wider breadth of JS variables.

Thanks for listening.

-Dave-


Quote:
Originally Posted by devbobo
Hi Dave,

The majority of smugmug customization is done by manipulation of HTML element via id or class tags using CSS or javascript (as per DHTML). There are javascript functions that smugmug use, that can be reused.

With knowing what you are trying to achieve, my best suggestion is to start with the Customization threads in the root of the SmugMug Customization forum.

Otherwise, post some more specific information and I am sure that someone will be able to point you in the right direction.

Another good starting point is to get the "Web Developer" extension for Firefox. It gives you the ability to expose html information like id and class tags inline will browsing the page.

Cheers,

David
Old Apr-04-2006, 08:33 PM
#4
Andy is offline Andy
4/3s of a photographer
Andy's Avatar
Bump for dlobel, who's still seeking this info / answer.
__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old Apr-04-2006, 08:39 PM
#5
technocraft is offline technocraft
Vexed and Glorious
I asked this question before, nobody seems to have a reference. If you do a view source on a gallery page, you'll get something like this in there:

Code:
	<script type="text/javascript">
		pageType = 'Album';
		pageTypeDetails = '';
		pageScope = '';
		pageDrawBy = '';
		siteUser = 'technocraft';
		community = '';
				galleryStyle = 'smugmug';
		AlbumID = '1302430';
		ImageID = '61293436';
		webServer = 'http://technocraft.smugmug.com';
		commentLink = "/gallery/1302430/1/61293436/Medium#comment";
							var imageIDs = new Array();
		</script>
That's how I found what I needed when I made my paypal buttons (the form contains the image url as the paypal item name).
__________________
-Tony
http://images.tonyschreiber.com
(technocraft.smugmug.com)
Old Apr-05-2006, 05:55 AM
#6
dlobel is offline dlobel OP
IMYRLESS
File Name (filename) as JavaScript variable..why not?
[FONT=Trebuchet MS]Tony,[/FONT]

[FONT=Trebuchet MS]Your method looks great, but doesn’t appear to be scalable. In a sense, when an order is placed, you then need to manually visit back to your smugmug page to determine the actual file name. Though it’s a very good workaround, wouldn’t this be too cumbersome selling large quantities for events, parties and weddings? Thus, not scalable?[/FONT]

[FONT=Trebuchet MS]If we were given the actual File Name (filename) of the original image (as it was when we uploaded it), then the data could be self-sufficient within our own “system”. [/FONT]

[FONT=Trebuchet MS]Though I’ve read in the past that smugmug may give us this JS variable, I don’t see it yet on the page. Since I don’t believe it be a technical challenge, can you (or anyone) think of why, outside of the obvious, the smugmug developers won’t give us this one variable?[/FONT]

[FONT=Trebuchet MS]Thanks.[/FONT]

[FONT=Trebuchet MS]-Dave-[/FONT]

Quote:
Originally Posted by technocraft
I asked this question before, nobody seems to have a reference. If you do a view source on a gallery page, you'll get something like this in there:

Code:
    <script type="text/javascript">
        pageType = 'Album';
        pageTypeDetails = '';
        pageScope = '';
        pageDrawBy = '';
        siteUser = 'technocraft';
        community = '';
                galleryStyle = 'smugmug';
        AlbumID = '1302430';
        ImageID = '61293436';
        webServer = 'http://technocraft.smugmug.com';
        commentLink = "/gallery/1302430/1/61293436/Medium#comment";
                            var imageIDs = new Array();
        </script>
That's how I found what I needed when I made my paypal buttons (the form contains the image url as the paypal item name).
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-05-2006, 08:28 AM
#7
luke_church is offline luke_church
#Grinner
Quote:
Originally Posted by dlobel
[FONT=Trebuchet MS]Tony,[/FONT]

[FONT=Trebuchet MS]If we were given the actual File Name (filename) of the original image (as it was when we uploaded it), then the data could be self-sufficient within our own “system”.
[/FONT]
[FONT=Trebuchet MS][/FONT]
There may be more reasons than one would think. The channel between the uploader and the upload page seems fairly weak. Error messages don't get reported very cleanly, failures are often handled by 'Page contained no data' message etc. So to get the data back in a useful fashion from the uploader, this channel would have to be improved.

These are all things that could be worked upon, but it wouldn't be as trivial as you might imagine. (Or might expect, Java can be a bit torturous in places where you wouldn't expect it to be)

Getting it to work for all the different uploaders could be a bit of a hassle as well.

Then there's the user experience. Smugmug look like they're using some form of unique ID generation system for their file names (A fair bit longer than GUID by the looks of the responses I get from the API, probably because they are used to offer some security protection as well), these aren't exactly the kind of thing you'd want to show Grandma...

Then there are the issues that you probably want to protect the file name from the user. The way that originals are currently acquired is by querying the API for the file name (which is only returned to an authenticated user) and then downloading that file name. The actual download of the file is non-authenticated (if I remember correctly, which I may not), so it's protected by not being able to guess the long string of gibberish that's used as a file name, so you need to be pretty careful who you give it to.

So, whilst it would certainly be possible, it may perhaps be more work than one would initially expect.

Hope this helps,

Luke
__________________
Photography: www.lukechurchphotography.com
SmugSoftware: www.smugtools.com
Old Apr-05-2006, 12:40 PM
#8
technocraft is offline technocraft
Vexed and Glorious
Quote:
Originally Posted by dlobel
Your method looks great, but doesn’t appear to be scalable. In a sense, when an order is placed, you then need to manually visit back to your smugmug page to determine the actual file name. Though it’s a very good workaround, wouldn’t this be too cumbersome selling large quantities for events, parties and weddings? Thus, not scalable?
I didn't know you wanted the actual filename. Many people have asked for that variable I don't know what or where it is.

For my Paypal buttons, they are for purchasing downloadable images - I don't need the *filename*, I need the image as it is located within my smugmug gallery. It's my workaround for the fact that Smugmug has no pay-per-download option. When I get the email from paypal, I use the image links to take me to that image, which I then un-watermark. It's not automatic, but it's not much work either.

I have other solutions for large(r) events.
__________________
-Tony
http://images.tonyschreiber.com
(technocraft.smugmug.com)
Old Apr-05-2006, 12:42 PM
#9
technocraft is offline technocraft
Vexed and Glorious
Luke, I think the OP just wants the image filename to be available as a js variable. It's stored with the image and you can see it used in various functions, though I wish it was easier to get to. I usually have to go to Edit Keywords/Captions bulk to see filenames unless I change the gallery settings to show them...
__________________
-Tony
http://images.tonyschreiber.com
(technocraft.smugmug.com)
Old Apr-05-2006, 02:10 PM
#10
dlobel is offline dlobel OP
IMYRLESS
Luke,

Interesting...response, but not sure if you're on the same page.

My statement wasn't about how images are uploaded or their mechanisms. But regardless of how the images are uploaded, smumug has the original file name. I say this because it is displayed on every page of my gallery (as that's how I have it set), though, only in HTML. And getting to the file name by sifting through HTML is not the way to go as many others on this forum have advised.

So I'm not sure where you were going with your response, but since the filename data is available when displaying the page, just as the AlbumID and ImageID, I don't understand why it too (the filename) can't be loaded into a JavaScript variable just as AlbumID and ImageID.

Maybe one of the programmers could take a few minutes and shed some light. Or maybe the filename data can be put into a JavaScript variable with AlbumID and ImageID.

Thanks.

-Dave-


Quote:
Originally Posted by luke_church
[/color][/size][/font]

There may be more reasons than one would think. The channel between the uploader and the upload page seems fairly weak. Error messages don't get reported very cleanly, failures are often handled by 'Page contained no data' message etc. So to get the data back in a useful fashion from the uploader, this channel would have to be improved.

These are all things that could be worked upon, but it wouldn't be as trivial as you might imagine. (Or might expect, Java can be a bit torturous in places where you wouldn't expect it to be)

Getting it to work for all the different uploaders could be a bit of a hassle as well.

Then there's the user experience. Smugmug look like they're using some form of unique ID generation system for their file names (A fair bit longer than GUID by the looks of the responses I get from the API, probably because they are used to offer some security protection as well), these aren't exactly the kind of thing you'd want to show Grandma...

Then there are the issues that you probably want to protect the file name from the user. The way that originals are currently acquired is by querying the API for the file name (which is only returned to an authenticated user) and then downloading that file name. The actual download of the file is non-authenticated (if I remember correctly, which I may not), so it's protected by not being able to guess the long string of gibberish that's used as a file name, so you need to be pretty careful who you give it to.

So, whilst it would certainly be possible, it may perhaps be more work than one would initially expect.

Hope this helps,

Luke
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-05-2006, 02:12 PM
#11
dlobel is offline dlobel OP
IMYRLESS
Tony,

So when you get an order for a download, you unwatermark the image and let that user download from the smugmug page (assuming you turn off protection too)? If so, then anyone can download that image?

Just curious....thanks.

-Dave-


Quote:
Originally Posted by technocraft
I didn't know you wanted the actual filename. Many people have asked for that variable I don't know what or where it is.

For my Paypal buttons, they are for purchasing downloadable images - I don't need the *filename*, I need the image as it is located within my smugmug gallery. It's my workaround for the fact that Smugmug has no pay-per-download option. When I get the email from paypal, I use the image links to take me to that image, which I then un-watermark. It's not automatic, but it's not much work either.

I have other solutions for large(r) events.
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-05-2006, 08:13 PM
#12
technocraft is offline technocraft
Vexed and Glorious
Quote:
Originally Posted by dlobel
So when you get an order for a download, you unwatermark the image and let that user download from the smugmug page (assuming you turn off protection too)? If so, then anyone can download that image?]
Yes. For autocross, the purchaser is the owner/driver of the car. Not many other people really care about that image. It's also unlikely that I would sell a downloaded image to more than one person in a group or family.

But I do offer two different downloads. The lower-priced one is the "web-size" and corresponds to the 800px smugmug large size image. When this is purchased, I simply leave it in the gallery, just unwatermarked. Obviously, more than the original could download the image. The higher-priced "full-size" download is the smugmug original image. For this I copy the image to an originals-enabled password-protected gallery and send the password to the purchaser.

Dave, from looking at your event photos (and their large custom watermark), I have to assume that you do your print fulfillment outside of smugmug? While I agree that the filename should be a javascript variable along with everything else, I think you're twisting the wrong melon. ;) If you want to do your own fulfillment, why not use a service that offers that... Exposuremanager has feature where you receive a notification of order *then* upload your print-ready versions for that order - or you can simply get notification and do the fulfillment elsewhere entirely. I'm sure the filename is passed in the order info. Just seems that there are better ways than rigging your two systems together...
__________________
-Tony
http://images.tonyschreiber.com
(technocraft.smugmug.com)
Old Apr-06-2006, 01:55 AM
#13
luke_church is offline luke_church
#Grinner
Quote:
Originally Posted by dlobel
Luke,

Interesting...response, but not sure if you're on the same page.


Hehe, I'm quite frequently not, sorry.,


Quote:
My statement wasn't about how images are uploaded or their mechanisms. But regardless of how the images are uploaded, smumug has the original file name.


OK, misunderstanding about which file name you wanted. There are two in operation here, so for example for a file I've just uploaded the image filename is 'TestImage1.jpg' but the Smugmug filename that I thought you wanted is: (suitably corrupted, symbols replaced by . are a another hex character)

OriginalURL = "http://....smugmug.com/photos/63217....0e90826ab4.jpg"

Which is not somethng you're really want to advertise

Sorry for the misunderstanding,

Luke
__________________
Photography: www.lukechurchphotography.com
SmugSoftware: www.smugtools.com
Old Apr-06-2006, 03:13 AM
#14
dlobel is offline dlobel OP
IMYRLESS
Luke, No worries.

I appreciated the reply. Thanks! It's what the forum is all about.

Though, I'm a bit surprised (or maybe not) that no one from smugmug has responded. Without a response, it just confirms my reasoning why they don't offer the filename as a variable.

Time will tell...it always does.

Thanks again - Dave

Quote:
Originally Posted by luke_church
[/color]

Hehe, I'm quite frequently not, sorry.,




OK, misunderstanding about which file name you wanted. There are two in operation here, so for example for a file I've just uploaded the image filename is 'TestImage1.jpg' but the Smugmug filename that I thought you wanted is: (suitably corrupted, symbols replaced by . are a another hex character)

OriginalURL = "http://....smugmug.com/photos/63217....0e90826ab4.jpg"

Which is not somethng you're really want to advertise

Sorry for the misunderstanding,

Luke
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-06-2006, 03:15 AM
#15
dlobel is offline dlobel OP
IMYRLESS
To add to my last post:

Let me add a thank you to Andy for bumping my original thread on this matter.

-D-

Quote:
Originally Posted by dlobel
Luke, No worries.

I appreciated the reply. Thanks! It's what the forum is all about.

Though, I'm a bit surprised (or maybe not) that no one from smugmug has responded. Without a response, it just confirms my reasoning why they don't offer the filename as a variable.

Time will tell...it always does.

Thanks again - Dave

__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-06-2006, 03:44 AM
#16
Andy is offline Andy
4/3s of a photographer
Andy's Avatar
Quote:
Originally Posted by dlobel
To add to my last post:

Let me add a thank you to Andy for bumping my original thread on this matter.

-D-
With pleasure - and thanks for the reminder email - the forum is busy, we have lots going on, I never mind reminders! I'm also making sure the engineers see this thread again... not sure if they'll have anything new to add...
__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old Apr-06-2006, 04:07 AM
#17
dlobel is offline dlobel OP
IMYRLESS
You're welcome Andy.

As for the engineers, I don't believe it's a matter of "adding" comment as it is contributing a comment to this issue. There haven't been any recent direct statements on why we can't have the filename JS variable. And I would believe any comment not from an engineer would just be speculation.

Again, I believe, based on technical soundness, adding filename as a JS variable is technically straightforward.

Thanks again.

-Dave-



Quote:
Originally Posted by Andy
With pleasure - and thanks for the reminder email - the forum is busy, we have lots going on, I never mind reminders! I'm also making sure the engineers see this thread again... not sure if they'll have anything new to add...
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-10-2006, 10:51 AM
#18
dlobel is offline dlobel OP
IMYRLESS
[FONT=Trebuchet MS]Andy,[/FONT]
[FONT=Trebuchet MS][/FONT]
[FONT=Trebuchet MS]Your efforts to revive this thread are applauded, but since we haven’t seen a definitive response from either management (not you) or the development team, it would appear they are avoiding the topic?[/FONT]
[FONT=Trebuchet MS][/FONT]
[FONT=Trebuchet MS]My intention is not to be negative, but was led to believe this was the place to get a direct response on important smugmug technical issues.[/FONT]
[FONT=Trebuchet MS][/FONT]
[FONT=Trebuchet MS]Thanks again.[/FONT]
[FONT=Trebuchet MS][/FONT]
[FONT=Trebuchet MS]-Dave-[/FONT]



Quote:
Originally Posted by Andy
Bump for dlobel, who's still seeking this info / answer.
__________________
-Dave-
http://www.visionlinkimages.com
Old Apr-23-2006, 10:07 PM
#19
DougMunn is offline DougMunn
Addicted to digital.
We need the filename also.
We have a very valid reason for needing the original filename.

I had also posted a request for this feature back in November of last year (http://dgrin.com/showthread.php?t=23309). However, things seem to have fizzled. We would appreciate it if this issue could be addressed again by the programmers.

We specialize in event photography. As such, we sell a number of other photo packages and photo gifts that aren't available for ordering through SmugMug.

At one point, I used to transfer information from my Star*Explorer database files to my site to provide a lookup table to convert SmugMug imageIDs to the original filenames for use to use. WHAT A PAIN to continually have to remember to synchronize database and such. I finally gave up and we quit using the ordering page.

Having the original filename would make it so nice to be able to make our custom ordering page work again.

SmugMug doesn't need to imitate other pro services. If you just add the ability for us to get the original filename, we can make our own pages to handle add'l features.

Please listen up Baldy and OneThumb, adding the original filename will make MANY PEOPLE very happy.

Thanks, Andy for your support.

Doug
Old Apr-24-2006, 06:04 AM
#20
{JT} is offline {JT}
Code Monkey
{JT}'s Avatar
Not trying to avoid the topic, but YOUR important is not always OUR important, right? :)

At any rate, I hear your request and can add it to the list of things we could add. HOWEVER ... you will need to have file names enabled in order for them to show up as a javascript variable.

You could actually hack this request right now if you are impatient. The filename is within the 'detailsFileName' div, just use javascript to remove the extra info inside and you could get it.
Page 1  of  2
1 2
Tell The World!  

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