View Full Version : adding text to smugmug direct-link!?
rainforest1155
Feb-04-2005, 08:22 AM
I just discovered in dkoyanagi's challenge thread (http://dgrin.com/showthread.php?t=5844) that you can add stuff between the smugmug direct-link filename and the jpg extension and the picture still works.
for example: http://rainforest1155.smugmug.com/photos/15029377-S-whatever-I-want-to-say.jpg
As long you take the dash "-" to separate the words, it seems to work.
The browser loads it as a new image and therefore every instance creates a new hit at smugmug.
Why does this work anyways? The only use of it I can imagine would be that we're able to track back where a hit came from. For example when I post a picture here I would add "-dgrin" and for another forum something else. To bad the actual statisticts put everything together and it doesn't work.
So is this additional information actually recorded and if yes, is there a way to access it? (:bow Nikolai??!!)
I hope somebody can clear this up for me! :scratch
Thanks,
Sebastian
Nikolai
Feb-04-2005, 09:47 AM
I just discovered ...
So is this additional information actually recorded and if yes, is there a way to access it? (:bow Nikolai??!!)
I hope somebody can clear this up for me! :scratch
Thanks,
SebastianI seriously doubt it's recorded. More likely, smugmug server parses the name by dashes or dots. First it gets to ID, then gets another token (I checked, it needs a dash after the modifier for this trick to work) to get the image's modifier, and then simply jumps to the file extension, effectively ignoring everything else you put in between. I can see a programmer taking that approach.
EDIT: Checked if it works with dot after the modifier. It does:-)!
Here's the sample: http://nik.smugmug.com/photos/15095873-M.Hey%20it%20works%20like%20this,%20too!.jpg. I originally put spaces in the text, they were automatically replaced by %20, kinda standard for web. Note that I even put the exclamation mark at the end, before the last dot. And smugmug engine simply ignored it:-)
Meaning - no, it's not in the record, server simply lets you access the image this way. Kinda convenient to provide an additional description next to a - totally meaningless from the human p.o.v. - image id.
I will use this trick now in forums posting - makes it easier to find stuff:-)
Thanks!:thumb
Cheers!:1drink
BMWRider
Feb-04-2005, 09:55 AM
Whoa. That's weird. :huh
rainforest1155
Feb-04-2005, 09:57 AM
I seriously doubt it's recorded. I can see a programmer taking that approach.
I will use this trick now in forums posting - makes it easier to find stuff:-)Yeah I had that programmer-idea in my mind too, but I was somehow hoping that there's more behind it and now you destroyed all my hopes with your I-am-a-programmer-and-now-how-all-the-others-do-it-post! :splat
Never the less I am glad I could provide you with a helpful trick. :D
Leaves just the question why dkoyanagi used this feature to add a "1" to his filename?! *heading over to ask him*
EDIT: Guess I wasn't crazy enough to try the space and dot-thingy. :D
onethumb
Feb-04-2005, 10:32 AM
I just discovered in dkoyanagi's challenge thread (http://dgrin.com/showthread.php?t=5844) that you can add stuff between the smugmug direct-link filename and the jpg extension and the picture still works.
for example: http://rainforest1155.smugmug.com/photos/15029377-S-whatever-I-want-to-say.jpg
As long you take the dash "-" to separate the words, it seems to work.
The browser loads it as a new image and therefore every instance creates a new hit at smugmug.
Why does this work anyways? The only use of it I can imagine would be that we're able to track back where a hit came from. For example when I post a picture here I would add "-dgrin" and for another forum something else. To bad the actual statisticts put everything together and it doesn't work.
So is this additional information actually recorded and if yes, is there a way to access it? (:bow Nikolai??!!)
I hope somebody can clear this up for me! :scratch
Thanks,
Sebastian
For the record, here's the background on the photo URLs:
All we really need is the ImageID and Size. They should be first and second, respectively, and seperated by a dash:
http://onethumb.smugmug.com/photos/2725366-M.jpg
We get that this link is to ImageID # 2725366 and size Medium.
If, however, you make any changes to the photo (watermarking, rotation, color correction, replacement, etc), we change the URL to ensure the browsers retrieve the new information (don't accidentally cache it longer than we need it to):
http://onethumb.smugmug.com/photos/2725366-M-1.jpg
We call it the image's Serial number, and it gets bumped every time the image is changed.
Smugmug ignores the Serial from the client, for the most part, simply because you can't trust clients. :) So an unintended side-effect is that you can write anything you'd like in place of the serial number - we just use it to fool a web browser's cache.
I'm not entirely sure I'd bet on our URL layout staying the same forever, but I don't anticipate any changes, so you might be safe.
Have fun :)
Don
rainforest1155
Feb-04-2005, 10:46 AM
Thanks Don, that makes perfectly sense to me.
Brings up the question if the dgrin search engine also looks into filenames for keywords?
onethumb
Feb-04-2005, 10:49 PM
Thanks Don, that makes perfectly sense to me.
Brings up the question if the dgrin search engine also looks into filenames for keywords?
I doubt it, because vBulletin *sucks*. (vBulletin is the forum software dgrin runs on). It's horribly written, I'm surprised it works at all.
Mining filenames for keywords is something reserved for only well-coded software, methinks. :)
Don
rainforest1155
Feb-05-2005, 10:44 AM
I doubt it, because vBulletin *sucks*. (vBulletin is the forum software dgrin runs on). It's horribly written, I'm surprised it works at all.
Mining filenames for keywords is something reserved for only well-coded software, methinks. :)Great choice for dgrin.:D
So you practically say it's going to be more likely that smugmug adds custom statistic support (depending on the ID used) then vBulletin to add filename search?! :wink
Just kidding....but I certainly would like to have the possibility to track down my hits in some way.
The referrer stuff is too much to track as you said in some other thread sometime ago?! Or is something happening in this direction?
Thanks,
Sebastian
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.