|
|
Thread Tools | Display Modes |
|
#1
|
|
|
IMYRLESS
|
List of Exposed JavaScript Variables...
Hi,
Is there a "published" list of JavaScript variables exposed by SmugMug? Thanks. -Dave- |
|
|
|
|
#2
|
||
|
technicolored
|
Quote:
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 |
|
|
|
||
|
#3
|
||
|
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:
|
|
|
|
||
|
#4
|
|
|
panasonikon
|
Bump for dlobel, who's still seeking this info / answer.
|
|
|
|
|
#5
|
|
|
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> |
|
|
|
|
#6
|
||
|
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:
|
|
|
|
||
|
#7
|
||
|
#Grinner
|
Quote:
[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 |
|
|
|
||
|
#8
|
||
|
Vexed and Glorious
|
Quote:
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. |
|
|
|
||
|
#9
|
|
|
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...
|
|
|
|
|
#10
|
||
|
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:
|
|
|
|
||
|
#11
|
||
|
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:
|
|
|
|
||
|
#12
|
||
|
Vexed and Glorious
|
Quote:
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... |
|
|
|
||
|
#13
|
|||
|
#Grinner
|
Quote:
Hehe, I'm quite frequently not, sorry., Quote:
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 |
||
|
|
|||
|
#14
|
||
|
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:
|
|
|
|
||
|
#15
|
||
|
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:
|
|
|
|
||
|
#16
|
||
|
panasonikon
|
Quote:
|
|
|
|
||
|
#17
|
||
|
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:
|
|
|
|
||
|
#18
|
||
|
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:
|
|
|
|
||
|
#19
|
|
|
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 |
|
|
|
|
#20
|
|
|
Code Monkey
|
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. |
|
|
|
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|