Options

Announcing PhotoRank

124678

Comments

  • Options
    flyingdutchieflyingdutchie Registered Users Posts: 1,286 Major grins
    edited April 4, 2006
    Getting all your popular photos in a list (JavaScript)
    Hi everyone,

    I'll post this in the JavaScript section as well.
    Here is sample code that retrieves the list of your popular photos and stores it into a JavaScript Array. Depending on your site, you can show this array in your logo, for example.

    Note, this is for JavaScripters. You'll have to know how to integrate this code into your own header/logo/banner. In my case that means updating the JavaScript array g_logoImgs.
    [B]var g_logoImgs = new Array();[/B]
    g_logoImgs[g_logoImgs.length] = "/photos/1111111-Th.jpg"; // Bell Lady
    g_logoImgs[g_logoImgs.length] = "/photos/2222222-Th.jpg";  // Downtown Statue
    g_logoImgs[g_logoImgs.length] = "/photos/3333333-Th.jpg"; // Hyannis Boat
    // etc...
    // etc...
     
    var g_popularList = null;
    var g_listsMerged = false;
    [B]function getPopularList()[/B]
    {
        if (g_popularList)
            return;
        var list = document.getElementById("popularPhotosList");
        if (!list)
        {
            var strList = [I]_getCookie[/I]("T_popList");
            if (strList && strList.length > 0)
                g_popularList = strList.split(",");
            return;
        }
        var imgs = list.getElementsByTagName("IMG");
        if (!imgs || imgs.length == 0)
            return null;
        var i;
        var ret = new Array();
        for (i = 0; i < imgs.length; i++)
            ret[ret.length] = imgs.src.replace(/Ti/, "Th").replace(/.*\/photos\//, "/photos/");
        g_popularList = ret;
        [I]_setCookie[/I]("T_popList", ""+g_popularList);
    }
     
    [B]function mergeLists()[/B]
    {
        if (g_listsMerged)
            return;
        if (!g_popularList)
            return;
        // Append popular list to end of g_logoImgs.
    [B]  var i;[/B]
    [B]  for (i = 0; i < g_popularList.length; i++)[/B]
    [B]  {[/B]
    [B]      g_logoImgs[g_logoImgs.length] = g_popularList[I];[/I][/B]
    [B]  }[/B]
        g_listsMerged = true;
    }
    

    Then call this code to make it all happen (during a <body> onload event, for example).
    getPopularList();
    mergeLists();
    

    Now the list of logo/banner images g_logoImgs is updated with the most popular images.

    (PS: There are two other functions called by this code: _getCookie and _setCookie. I wrote my own, but i think that SmugMug already has some implementation of this)
    I can't grasp the notion of time.

    When I hear the earth will melt into the sun,
    in two billion years,
    all I can think is:
        "Will that be on a Monday?"
    ==========================
    http://www.streetsofboston.com
    http://blog.antonspaans.com
  • Options
    flyingdutchieflyingdutchie Registered Users Posts: 1,286 Major grins
    edited April 4, 2006
    2 wishes
    1. Be able to move the popular photo list Up or Down (no tricky CSS/Javascript should be required. It should work just like the 'galleries box', the 'keyword list', etc.)
    2. Be able to assign a gallery style to your popular photo list.

    Thanks! :D
    I can't grasp the notion of time.

    When I hear the earth will melt into the sun,
    in two billion years,
    all I can think is:
        "Will that be on a Monday?"
    ==========================
    http://www.streetsofboston.com
    http://blog.antonspaans.com
  • Options
    BarbBarb Administrators Posts: 3,352 SmugMug Employee
    edited April 4, 2006
    Andy wrote:
    This was fixed. Thanks again Barb, for alerting us to it deal.gif

    Well I'm glad it wasn't just me imagining something! That happens occasionally rolleyes1.gifThx for the quick fix!
    Barb
    Smug since 2006
    SmugMug Help
    PhotoscapeDesign
  • Options
    savannahgasavannahga Registered Users Posts: 225 Major grins
    edited April 4, 2006
    How to change color of "most popular photos" text?

    Andy wrote:
    Thanks for the suggestion, it's a good one.

    You can easily move the popular photos section around your page, you are a power or pro user. It's just some css, easily doable with the good folks in the customization forum.

    Take a look at how BWG has pimped his popular goodness already clap.gifclap.gif
    http://bigwebguy.smugmug.com/

    You can make a post in the customization forum on how to move it up on your page.
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 4, 2006
    savannahga wrote:
    How can I make the popular thumbs small just like at bigwebguy's site?

    Linkage in my siggy. Firefox, and the firefox web developer tool - both are FREE. Get them - and then you can easily see the CSS, and you can edit your CSS on your site, WITHOUT yet making any changes to your live site.

    Once you have the tools, make a post in the customization forum, and we'll get your sorted out.

    deal.gif
  • Options
    smugbugsmugbug Registered Users Posts: 20 Big grins
    edited April 5, 2006
    I noticed that the new "Photorank" setting under Customize Gallery can't be saved as a settings template. So you can't enable/disable Photorank for a bunch of galleries at once using "Bulk settings".

    I like the Photorank idea, but I don't like that the thumbs icons show up over an image when you mouse over it. I also don't like how Smugmug keeps making it difficult to revert things to the way they were before. New features should be disabled by default.
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 5, 2006
    smugbug wrote:
    I noticed that the new "Photorank" setting under Customize Gallery can't be saved as a settings template. So you can't enable/disable Photorank for a bunch of galleries at once using "Bulk settings".
    I'll report this. Should be able to apply it to a template as the other settings.
    smugbug wrote:
    I like the Photorank idea, but I don't like that the thumbs icons show up over an image when you mouse over it. I also don't like how Smugmug keeps making it difficult to revert things to the way they were before. New features should be disabled by default.

    Thanks for the feedback, smugbug. We hope you'll like it enough to use it!
  • Options
    JamesJWegJamesJWeg Registered Users Posts: 795 Major grins
    edited April 5, 2006
    onethumb wrote:
    Without revealing too much about how the system works (both because I don't want people to abuse it and because it's a fast moving target at the moment), relying on views and comments would limit your ability to benefit from this (unless you're in Critique style, where you'd probably get some traction).

    Mind explaining what you don't like about the thumbs deal, and if there's a way we can improve it?

    No worries if it's just not your thing - but if you think it COULD be your thing with a little work, I'm all ears.

    Don

    The number one thing would be the gawdy colors again, more on this later though, it has been a normal two wheeled tuesday, I am not exactly sober.
    friday.gif and I should put a little though into this one.

    James.
  • Options
    colourboxcolourbox Registered Users Posts: 2,095 Major grins
    edited April 5, 2006
    I browsed smugmug after midnight and popular keywords told me that it's got nothing, because it's a new day. That prompts a suggestion. Could the "day's" popular keywords be made the most popular keywords in the last rolling 24 hours instead? It would prevent the daily emptying of the list, and you would also avoid having a smugmug member in some part of the world staring at an empty popular keywords list at 3 in the afternoon local time.

    Other than that...wow, the new changes rock!
  • Options
    BaldyBaldy Registered Users, Super Moderators Posts: 2,853 moderator
    edited April 5, 2006
    colourbox wrote:
    I browsed smugmug after midnight and popular keywords told me that it's got nothing, because it's a new day. That prompts a suggestion. Could the "day's" popular keywords be made the most popular keywords in the last rolling 24 hours instead? It would prevent the daily emptying of the list, and you would also avoid having a smugmug member in some part of the world staring at an empty popular keywords list at 3 in the afternoon local time.

    Other than that...wow, the new changes rock!
    We debated that intensely and aren't wedded to the current scheme. I stayed up tonight to watch what would happen and it seemed kindof exciting, no? It empties and then fills with all kinds of new stuff in a hurry.

    One of the things we were stumbing over was the wording for the last 24 hours. It would have to be longer as Today's photos didn't seem to be clear enough if it was a rolling 24.
  • Options
    colourboxcolourbox Registered Users Posts: 2,095 Major grins
    edited April 5, 2006
    Baldy wrote:
    We debated that intensely...I stayed up tonight to watch what would happen and it seemed kindof exciting, no? It empties and then fills

    I can think of a widespread precedent, and that is forum post listings. When I come across a new forum, I immediately look for the "recent posts" link because it's a fast way to see what's hot across the entire board. I quickly realized that forums fell into two categories: Those that use a rolling Recent Posts link, and those that cut off at midnight in some time zone. The latter were less fun to use, because if you happened to log in just after somebody's midnight, you lost the ability to see any activity from just a few minutes ago!

    Dgrin has such a link (New Stuff), which is what I bookmark...and it's a rolling list.

    While it may be exciting to see it empty and fill up after midnight, I would counter that we can watch it shift continuously throughout the day, anyway. There's just that one span of time when keywords just...disappear, and I thought that might make it look like nothing's going on at smugmug.

    You can do it the way you feel is best, this is not a critical function (to me) and it's fair enough that we can post and discuss our opinions on this great service that keeps gaining value.

    There is still that issue of what to call a rolling keyword list...no ideas here yet.
  • Options
    ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 5, 2006
    Order of critique galleries in smugmug browse page?
    This is a place where randomization or just plain rotation would be good since it would give everyone an equal chance at critiques, good or bad, popular or not. Shots that are not popular would get the visibility they need to have a chance.

    Right now, it seems the algorithm is "Andy first then everyone else."
    If not now, when?
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 5, 2006
    rutt wrote:
    This is a place where randomization or just plain rotation would be good since it would give everyone an equal chance at critiques, good or bad, popular or not. Shots that are not popular would get the visibility they need to have a chance.

    Right now, it seems the algorithm is "Andy first then everyone else."

    Gee, thanks, Rutt. You know better than that, c'mon. I'm under the same rules as anyone else.

    My boids gallery is just the last new gallery set to "critique" style. Go ahead and make one of your own, and soon you will supplant me.

    Let's keep the discussions on the new browse/popular features here in this thread. I had to move your post.
  • Options
    ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 5, 2006
    I thought about this. Why not make the voting record of pictures available to their owners? I don't see how this gives away any important secret about how the data is used to calculate rankings. I think it would be very helpful input to the photographers, just as useful as comments and the stars.

    I understand this might not happen right away. Take it as a feature request, please. I also understand that means you won't comment on it very much.
    If not now, when?
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 5, 2006
    rutt wrote:
    Take it as a feature request, please. I also understand that means you won't comment on it very much.

    Then, you know where it goes deal.gif
    http://www.dgrin.com/showthread.php?t=29858
  • Options
    ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 5, 2006
    Andy wrote:
    Gee, thanks, Rutt. You know better than that, c'mon. I'm under the same rules as anyone else.

    My boids gallery is just the last new gallery set to "critique" style. Go ahead and make one of your own, and soon you will supplant me.

    Let's keep the discussions on the new browse/popular features here in this thread.

    You didn't look carefully enough for the invisible smiley.

    Seriously, rotation or randomization would really be good here. There are tons of critique galleries and when I dug through, not many comments.
    If not now, when?
  • Options
    ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 5, 2006
    Andy wrote:
    Then, you know where it goes deal.gif
    http://www.dgrin.com/showthread.php?t=29858

    Jeez, I need telepathy lessons to figure out where to post. It seems you'll move stuff where you want it anyway.
    If not now, when?
  • Options
    ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 5, 2006
    Andy wrote:
    Then, you know where it goes?

    Where the sun don't shine?
    If not now, when?
  • Options
    JamesJWegJamesJWeg Registered Users Posts: 795 Major grins
    edited April 5, 2006
    I had noticed that since this was added browseing was dragging on some systems. So I turned it off and sure enough it speed back up, bummr that it is causeing a speed issue.

    James.
  • Options
    BassAnglerBassAngler Registered Users Posts: 104 Big grins
    edited April 5, 2006
    Nice feature!!

    I was able to pull mine off the home page and create a new link. Works nice!!

    thumb.gif
  • Options
    raptorcaptorraptorcaptor Registered Users Posts: 3,968 Major grins
    edited April 5, 2006
    Popular gallery
    Ben wrote:
    http://jrphotos.smugmug.com/popular/

    just create your own link/own button to it. :)

    Okay, I got the link working!

    Right now it seems as long as a photo has a vote selected it will show up in my gallery. Is there any way to limit the number of photos, like it does for the homepage?

    http://www.raptorcaptor.com/popular/rolleyes1.gif
    Glenn

    My website | NANPA Member
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 5, 2006
    Okay, I got the link working!

    Right now it seems as long as a photo has a vote selected it will show up in my gallery. Is there any way to limit the number of photos, like it does for the homepage?

    http://www.raptorcaptor.com/popular/rolleyes1.gif

    clap.gif

    Hi Glenn,

    No not for that link - that's all of your Popular photos. The Popular Photos Box on the homepage though, can be set in terms of number of photos.

    And may I say - WOWOWOW your work is stunning! ----> I'm going back for more!
  • Options
    raptorcaptorraptorcaptor Registered Users Posts: 3,968 Major grins
    edited April 5, 2006
    Andy wrote:
    clap.gif

    Hi Glenn,

    No not for that link - that's all of your Popular photos. The Popular Photos Box on the homepage though, can be set in terms of number of photos.

    And may I say - WOWOWOW your work is stunning! ----> I'm going back for more!

    Thanks Andy!rolleyes1.gif
    Glenn

    My website | NANPA Member
  • Options
    DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited April 6, 2006
    Is anyone voting thumbs down? I find myself either giving it a thumbs up, or giving it a pass...
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • Options
    dogwooddogwood Registered Users Posts: 2,572 Major grins
    edited April 6, 2006
    i have
    If it's a truly awful photo that truly looks like a poor snapshot, I give it a thumbs down. I must admit-- I wasn't thrilled about this new feature but it's sucked me in... it's a little like passing a car wreck... I just can't resist looking!

    Portland, Oregon Photographer Pete Springer
    website blog instagram facebook g+

  • Options
    asamuelasamuel Registered Users Posts: 451 Major grins
    edited April 6, 2006
    rutt wrote:
    You didn't look carefully enough for the invisible smiley.

    Seriously, rotation or randomization would really be good here. There are tons of critique galleries and when I dug through, not many comments.

    I second that. I would love for my titchy galleries to be critiqued. I guess this is a new option in customise galleries? I'm looking for it, but cannie find it...I go look under the bedrolleyes1.gif
    where's the cheese at?

    http://www.samuelbedford.com
  • Options
    asamuelasamuel Registered Users Posts: 451 Major grins
    edited April 6, 2006
    seriously, tried again, cannot find any way of getting some gallereis critiqued. ne_nau.gif

    Having said that, I am a bit blind. anyone point me in the right direction?
    where's the cheese at?

    http://www.samuelbedford.com
  • Options
    Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 6, 2006
    asamuel wrote:
    seriously, tried again, cannot find any way of getting some gallereis critiqued. ne_nau.gif

    Having said that, I am a bit blind. anyone point me in the right direction?

    Did you force the gallery style to the critique style?
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • Options
    asamuelasamuel Registered Users Posts: 451 Major grins
    edited April 6, 2006
    Mike Lane wrote:
    Did you force the gallery style to the critique style?

    err...Im a standard user, I dont think I can force gallery styles. Does that mean Im out?
    where's the cheese at?

    http://www.samuelbedford.com
  • Options
    JamesJWegJamesJWeg Registered Users Posts: 795 Major grins
    edited April 6, 2006
    JamesJWeg wrote:
    I had noticed that since this was added browseing was dragging on some systems. So I turned it off and sure enough it speed back up, bummr that it is causeing a speed issue.

    James.

    As an update, I am only noticing the drag on older machines running XP, my macs and newer XP systems are not affected. On an older XP system it is a really annoying amount of drag. All of these are running firefox.

    James.
Sign In or Register to comment.