Add Filename to filename

bichobicho Registered Users Posts: 3 Beginner grinner
edited October 5, 2009 in SmugMug Support
I really would need to add "Filename: " infront of the filename... Have tried out some modified js-snippets without success, and have reached the furious I give up-level. Anyone?

Comments

  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited October 4, 2009
    Link to your Smugmug site please and a gallery with filenames on?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • bichobicho Registered Users Posts: 3 Beginner grinner
    edited October 5, 2009
    jfriend wrote:
    Link to your Smugmug site please and a gallery with filenames on?

    http://davidbicho.smugmug.com/Lifestyle-1/BeautyPreview/
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited October 5, 2009
    bicho wrote:
    This will add a "Filename: " prefix onto every caption. If you have some captions that are actually captions rather than filenames, the code would need to be more involved than this in order to figure out which ones are captions and which ones are filenames showing in the caption.

    Just paste this into your bottom javascript:
    onPhotoShow.subscribe(AddFilenameLabel);
    YE.onContentReady("caption_bottom", AddFilenameLabel);
    
    function AddFilenameLabel()
    {
        var obj = YD.get("caption_bottom");
        var str = YAHOO.lang.trim(obj.innerHTML);
        if (str != "")
        {
            obj.innerHTML = "Filename: " + str;
        }
    }
    
    
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • bichobicho Registered Users Posts: 3 Beginner grinner
    edited October 5, 2009
    jfriend wrote:
    This will add a "Filename: " prefix onto every caption. If you have some captions that are actually captions rather than filenames, the code would need to be more involved than this in order to figure out which ones are captions and which ones are filenames showing in the caption.

    Just paste this into your bottom javascript:
    onPhotoShow.subscribe(AddFilenameLabel);
    YE.onContentReady("caption_bottom", AddFilenameLabel);
    
    function AddFilenameLabel()
    {
        var obj = YD.get("caption_bottom");
        var str = YAHOO.lang.trim(obj.innerHTML);
        if (str != "")
        {
            obj.innerHTML = "Filename: " + str;
        }
    }
    
    

    Works like a charm. Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sign In or Register to comment.