#userName div missing on search results

gblottergblotter Registered Users Posts: 176 Major grins
edited December 5, 2010 in Bug Reporting
I have implemented a site-specific customized search that I am quite happy with.

However, the display of the search results lists:

"Blotter Family's Keywords Matching"
"Blotter Family's Galleries Matching"
"Blotter Family's Photos Matching"

I want to change this to simply say:

"Keywords Matching"
"Galleries Matching"
"Photos Matching"

The id/class tags don't seem to give me an obvious way to omit "Blotter Family's" from the display. Is there a javascript hack or something to accomplish this?

example here: http://www.blotter.info/search/index.mg?searchWords=greg&searchType=InUser&NickName=Blotter

Seems like this is a forgotten piece (perhaps the only piece) of SmugMug where the "UserName's" info cannot be omitted via

#userName {display: none;}

This is because there is no #userName div in the SmugMug code for search results.

Oddly enough, this is a problem only on the first page. When you go to the second page of the search results, the user name (Blotter Family's) is not displayed.

example here: http://www.blotter.info/search/index.mg?searchWords=greg&searchType=UserImage&NickName=Blotter&SortBy=Recent

I'm filing this as a bug.

Comments

  • bstrongbstrong Registered Users Posts: 53 Big grins
    edited December 5, 2010
    gblotter wrote: »
    I have implemented a site-specific customized search that I am quite happy with.

    However, the display of the search results lists:

    "Blotter Family's Keywords Matching"
    "Blotter Family's Galleries Matching"
    "Blotter Family's Photos Matching"

    I want to change this to simply say:

    "Keywords Matching"
    "Galleries Matching"
    "Photos Matching"

    The id/class tags don't seem to give me an obvious way to omit "Blotter Family's" from the display. Is there a javascript hack or something to accomplish this?

    example here: http://www.blotter.info/search/index.mg?searchWords=greg&searchType=InUser&NickName=Blotter

    Seems like this is a forgotten piece (perhaps the only piece) of SmugMug where the "UserName's" info cannot be omitted via

    #userName {display: none;}

    This is because there is no #userName div in the SmugMug code for search results.

    Oddly enough, this is a problem only on the first page. When you go to the second page of the search results, the user name (Blotter Family's) is not displayed.

    example here: http://www.blotter.info/search/index.mg?searchWords=greg&searchType=UserImage&NickName=Blotter&SortBy=Recent

    I'm filing this as a bug.


    Hi gblotter,

    You could try using this code in your bottom script customizations. You could also be a little more clever and only execute this code on the search results page.

    /**
    * Start code sample
    */
    YUI().use('node', function(Y) {
    var keywordTitle = Y.Node.one('#keywordResults .boxTop h3.title'),
    galleryTitle = Y.Node.one('#galleryResults .boxTop h3.title'),
    photosTitle = Y.Node.one('#photosResults .boxTop h3.title'),
    replaceThis = "Blotter Family's";

    if(keywordTitle) {
    keywordTitle.setContent(keywordTitle.get('innerHTML').replace(replaceThis, ''));
    }

    if(galleryTitle) {
    galleryTitle.setContent(galleryTitle.get('innerHTML').replace(replaceThis, ''));
    }

    if(photosTitle) {
    photosTitle.setContent(photosTitle.get('innerHTML').replace(replaceThis, ''));
    }
    });
    /**
    * End code sample
    */


    I hope this helps you.

    -Brian
  • gblottergblotter Registered Users Posts: 176 Major grins
    edited December 5, 2010
    Very cool - worked great. Thanks for taking the time to post this workaround.
Sign In or Register to comment.