May be an undereducated question here...
SavannahMan
Registered Users Posts: 142 Major grins
Forgive my ignorance, I'm still kinda new to the html scene. I'm thinking about having a section on the homepage that would show the most viewed picture of the week, moth or whatever. Are there any built in features I can take advantage of here? Any input would be appreciated. :dunno
0
Comments
I wonder who can hack this faster, DevBobo, bigwebguy, or Luke?
Gentleman, start your engines!
Portfolio • Workshops • Facebook • Twitter
Don.
Dang, I hate turning challenges down...
Sorry guys, I'm out of this one, I don't have any time to give this until the end of next week, at the earliest.
Some comments, if it helps anyone out:
-> Doing this dynamically from Smugmug is probably bad news. This would mean that the generation technique for the page has to access the Smugmug stat's cache. That's a protected area, so you'd have to be extremly careful to ensure that no information leaked from the protected code to the unprotected code. I wouldn't be at all keen on trying to do that
-> Doing this (Client puill) across 2 webservers is probably fairly easy, but you'd certainly want to do some caching, as the stat lookup operations are kind of expensive for Smugmug and also kind of slow. An alternative would be to use a 3rd part stat generator, and talk to that. I don't know whether any of the services offer something that you could talk to in Javascript. You'd want one of the web hacks for that.
(And now the way I would do it )
-> Trying to do this local machine push is probably close to trivial. Have your local machine XML-RPC into your account once a day and grab the stats. It can then locally process the data, produce some HTML that matches your styles and HTTP-POST it into the customisation fields.
The last bit might be slightly fragile, but we could easily add comment delimit markers into the custom code to make it safe.
But, you'd have a latency of how ever often you ran the process on your local machine (of course this could be automated)
I would guess that a SmugTool could probably be knocked together in a few hours to do this once the statistics grabbing API was implemented, and tested, which it isn't.
Good luck, and if the others chicken out , get back to me in a couple of weeks and I'll see what I can do...
Luke
SmugSoftware: www.smugtools.com
FOUL ;-)
SmugSoftware: www.smugtools.com