Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: how to add a nofollow to links in sort area

  1. #1
    Join Date
    Sep 2008
    Posts
    177

    Default how to add a nofollow to links in sort area

    I've been trying to tidy up my URL management and have been able to locate most areas where I wanted to tweak nofollow. I'm stuck trying to find where in the code I would be able to change this:

    <div class="resultsheader">Sort Listings By: <a href="/view-listings.html?action=searchresults&amp;sortby=List _Price&amp;sorttype=ASC&amp;cmsrealty=user">Listin g Price</a> : <a href="/view-listings.html?action=searchresults&amp;sortby=Bedr ooms&amp;sorttype=ASC&amp;cmsrealty=user">Bedrooms </a> : <a href="/view-listings.html?action=searchresults&amp;sortby=Bath s&amp;sorttype=ASC&amp;cmsrealty=user">Baths</a> : <a href="/view-listings.html?action=searchresults&amp;sortby=Subd ivision&amp;sorttype=ASC&amp;cmsrealty=user">Subdi vision</a> : <a href="/view-listings.html?action=searchresults&amp;sortby=Sqft &amp;sorttype=ASC&amp;cmsrealty=user">Square Feet</a></div>

    So in search.inc.php :

    I did this although it had no affect:

    changed this:

    $header_title = '<a href="index.php?action=searchresults&amp;sortby=' . $field_name . '&amp;' . $sorttypestring . $guidestring . '">' . $field_caption . '</a>';

    to this:

    $header_title = '<a href="index.php?action=searchresults&amp;sortby=' . $field_name . '&amp;' . $sorttypestring . $guidestring . '" rel="nofollow">' . $field_caption . '</a>';

    I was certain the above was where the change needed to happen. Any ideas where in OR code I might be able to make all of the urls in that sort block results header a nofollow?

    With kind regards,

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: how to add a nofollow to links in sort area

    Quote Originally Posted by mrealty View Post
    Any ideas where in OR code I might be able to make all of the urls in that sort block results header a nofollow?
    Assuming a default "search.inc.php" core file (O-R v.2.5.6), you need to modify two lines:

    Line 1158, from
    PHP Code:
    $header_title '<a href="index.php?action=searchresults&amp;sortby=' $field_name '&amp;' $sorttypestring $guidestring '">' $field_caption '</a>'
    To
    PHP Code:
    $header_title '<a href="index.php?action=searchresults&amp;sortby=' $field_name '&amp;' $sorttypestring $guidestring '" rel="nofollow">' $field_caption '</a>'
    Line 1208, from
    PHP Code:
    $field[$x] = '<a href="index.php?action=searchresults&amp;sortby=' $field_name '&amp;' $sorttypestring $guidestring '">' $field_caption '</a>'
    To
    PHP Code:
    $field[$x] = '<a href="index.php?action=searchresults&amp;sortby=' $field_name '&amp;' $sorttypestring $guidestring '" rel="nofollow">' $field_caption '</a>'
    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  3. #3
    Join Date
    Jan 2007
    Posts
    403

    Default Re: how to add a nofollow to links in sort area

    Not something I had considered or worried about before. Is this of any major SEO benefit? Could the original poster comment on his motivation please?

  4. #4
    Join Date
    Sep 2008
    Posts
    177

    Default Re: how to add a nofollow to links in sort area

    That was the line I missed (1208). Works like a champ! Thanks Eduardo.

    Donation made (although I can't afford to donate $10 for every question, since I have a bazillion of them, I still donate often, and I appreciate the help).

    Transaction ID: ****58532

  5. #5
    Join Date
    Sep 2008
    Posts
    177

    Default Re: how to add a nofollow to links in sort area

    @ zarathustra:

    I have been going through the OR code, while keeping an extremely detailed change log, and changing all of the duplicate and non important URLs to "nofollow." I also have a way to inject meta robots tags on certain OR pages so I can do "noindex" where needed.

    It's sad to see that most folks who setup OR (or web sites in general) think nothing of their URL management. I'll admit, I wasn't so picky about it until a recent mishap that forced me to take a closer look at the management.

    I'm defining a manageable set of URLs that I consider permanent URLs, and am marketing the daylights out of them. If you look closely at the bigger marketing picture, you will see that time is a limited resource. Gbot only has so much time to crawl your site when it visits. If it spends 8 hours per day crawling/recrawling URLs for listings that no longer exist, or URLs of paginated listings that have shifted because of an addition or deletion, then it has that much less time to crawl your "target" pages - if they are even gotten to. Contrary to popular belief, getting traffic is not the goal. Getting users exactly what they ask for in their search engine query and ultimately converting that user to a sale is the goal.

    To achieve this I've got to minimize the junk URLs (like all of the ones listed in this post plus all of the others I've made a nofollow) and the duplicate URLs and focus on the URLs I want to rank high. Another goal is to put a stop to infinite URLs (having URLs crawled for each listing).

    To answer, this is of paramount SEO benefit (keep in mind I'm operating in the context of the addons listed below and I also have roughly seven thousand listings on any given day). I cringe when I see posts from folks who are having their listing pages crawled. The fatal attraction in doing so is that you will be doing just great in the beginning, but as your mismanaged URLs grow in number (towards infinity) gbot gets more and more bogged down in crawling/recrawling all of them and your ranking goes down with it. And by the time you figure out what's going on, you've got an entire database of hundreds or thousands of URLs over at G that you've got to synchronize with your site with absolutely no good way to get rid of the mass number of unwanted URLs.

    I could go on for hours about this, but what I've mentioned so far should suffice as an explanation of motivation for doing the strategically placed nofollows.

    For some good related reading:

    http://en.wikipedia.org/wiki/Nofollow

  6. #6
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: how to add a nofollow to links in sort area

    Quote Originally Posted by mrealty View Post
    Donation made (although I can't afford to donate $10 for every question, since I have a bazillion of them, I still donate often, and I appreciate the help).
    LOL! WE thank you very much! Be cool, nobody is expecting from you a donation for every answer you get at the Forum.
    [EDITED] But... nobody will complain if you do that!!! [/EDITED]


    Quote Originally Posted by mrealty View Post
    ...I'm defining a manageable set of URLs that I consider permanent URLs, and am marketing the daylights out of them. If you look closely at the bigger marketing picture, you will see that time is a limited resource. Gbot only has so much time to crawl your site when it visits. If it spends 8 hours per day crawling/recrawling URLs for listings that no longer exist, or URLs of paginated listings that have shifted because of an addition or deletion, then it has that much less time to crawl your "target" pages - if they are even gotten to. Contrary to popular belief, getting traffic is not the goal. Getting users exactly what they ask for in their search engine query and ultimately converting that user to a sale is the goal. To achieve this I've got to minimize the junk URLs (like all of the ones listed in this post plus all of the others I've made a nofollow) and the duplicate URLs and focus on the URLs I want to rank high. Another goal is to put a stop to infinite URLs (having URLs crawled for each listing). To answer, this is of paramount SEO benefit (keep in mind I'm operating in the context of the addons listed below and I also have roughly seven thousand listings on any given day). I cringe when I see posts from folks who are having their listing pages crawled. The fatal attraction in doing so is that you will be doing just great in the beginning, but as your mismanaged URLs grow in number (towards infinity) gbot gets more and more bogged down in crawling/recrawling all of them and your ranking goes down with it. And by the time you figure out what's going on, you've got an entire database of hundreds or thousands of URLs over at G that you've got to synchronize with your site with absolutely no good way to get rid of the mass number of unwanted URLs...
    I agree 100% - I make your words, my words.

    Eduardo
    Last edited by ebmarques; 06-10-2009 at 12:22 PM. Reason: nobody will complain if you do that

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  7. #7
    Join Date
    Jan 2007
    Posts
    403

    Default Re: how to add a nofollow to links in sort area

    Very interesting stuff. Obvious once you explain it, but something that had previously not occurred to me. Thanks very much for your clarification.

    As a small contribution I would have to wonder if there was a way of achieving this with javascript? Certainly I could make a jQuery script to find matching patterns in url's and apply rel:nofollow to them. I already do something like that to automatically apply little icons to external links....just a cosmetic thing.

    If we could automate this system you are employing it would both eradicate the manual time you are taking to do it, and...a considerable benefit...leave the OR source intact.

    I will put some thought into it and report back.

  8. #8
    Join Date
    Jan 2007
    Posts
    403

    Default Re: how to add a nofollow to links in sort area

    Hmmm. It gets more interesting. My first five minutes of research suggested I was being silly, because I remembered that GoogleBot won't execute javascript!

    However I am now running into articles like this : http://www.seomoz.org/ugc/new-realit...avascript-4930 and this: http://omninoggin.com/web-developmen...ofollow-links/ that suggest that Google is now running scripts before crawling. Anyone have any up to date information?

  9. #9
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: how to add a nofollow to links in sort area

    Quote Originally Posted by zarathustra View Post
    Anyone have any up to date information?
    I don't have any information about Google... But I want to thank you to let me know about ANOTHER great JQuery hint:

    Code:
    jQuery(document).ready(function($){
    $(".CLASSNAME a").attr("rel", "nofollow");
    $(".CLASSNAME a").attr("rel", "");
    });
    I am playing with the above and having A LOT OF FUN!!! Thanks!

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  10. #10
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: how to add a nofollow to links in sort area

    Quote Originally Posted by mrealty View Post
    Any ideas where in OR code I might be able to make all of the urls in that sort block results header a nofollow?
    BTW Mark,

    With the above JQuery hint you don't need to modify the core file!
    You just need:
    Code:
    jQuery(document).ready(function($){
    $(".resultsheader a").attr("rel", "nofollow");
    });
    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

Similar Threads

  1. Replies: 2
    Last Post: 06-07-2009, 11:14 AM
  2. Adding rel=nofollow to homepage URL
    By skosloff in forum General Help (CLOSED)
    Replies: 3
    Last Post: 03-07-2008, 03:40 PM
  3. rel="nofollow" tag in TinyMCE - How do you make this?
    By chops in forum General Help (CLOSED)
    Replies: 3
    Last Post: 07-24-2007, 08:17 AM
  4. Replacing text links with graphic links...
    By mlsa in forum Templates - Help/Ideas/Discussion (CLOSED)
    Replies: 7
    Last Post: 07-13-2005, 10:09 AM
  5. adding links to the agent admin area
    By cellularguy in forum General Help (CLOSED)
    Replies: 5
    Last Post: 06-15-2005, 10:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •