• I whipped this up pretty quick using the filter code from Six Apart’s rel=nofollow spam catching plugin.

    Here’s the link to the plugin: https://www.phaedo.cx/includes/wpNofollow.php.zip

    The source: https://phaedo.cx/includes/wpNofollow.phps

    It basically just filters anchor tags and adds in the rel=nofollow attribute. Google, MSN, and Yahoo! all announced support today for this tag. You can read more about it here: https://phaedo.cx/archives/2005/01/18/support-for-nofollow/ there are links to everyone’s announcements.

    The comment text filtering is automatic, but if you want comment_author_link to return a link with the attribute in it, you need to replace the call to that function in wp-comments.php with the function in my script named comment_author_link_nofollow().

    this is my first plugin for WP and I’m sure I’ve not done everything 100% correct, so please feel free to comment and criticize, I can take it ??

Viewing 15 replies - 1 through 15 (of 36 total)
  • Thread Starter clintology

    (@clintology)

    Here’s MT’s announcement of their plugin: https://www.movabletype.org/news/2005/01/movable_type_nofollow_p.shtml

    I’m sure this will be supported natively in a future point release of 1.2 and definately in 1.5?

    This might be a more consise description on how to use my plugin: https://phaedo.cx/archives/2005/01/18/wp-nofollow/

    ??

    Cool…but I see an issue here. This rel=nofollow punishes legitimate commenters IF ALL LINKS are given the nofollow attribute. I don’t mind it when Podz comes to my site, posts comments, and of course, leaves the URL to his site. I want the various services to know that Podz’s site is a site worth ranking.

    So, how do we filter out the spam crap and keep promoting those good sites?

    EDIT: Also, if you have some quality spam blocking tools in use, then in theory, these links won’t make it to live status on your blog.

    As Shelley said, this is 3 years too late, and what happenes when people use this attribute for “evil” purposes?

    Too many questions already

    It’s the search engines that created the ranking hysteria, and it’s the common blogger and webmaster that has paid the price. Three years too late, indeed.

    clintology, I wish I’d seen your plugin earlier before I started (and nearly finished) writing my own. Anyway, good work.

    gregorsmith, I can’t imagine any way this could be used for “evil” purposes. The nofollow attribute doesn’t punish the sites linked to or reduce their pagerank; it only prevents their pagerank from being increased by that link.

    And NuclearMoose, if you want to increase somebody’s pagerank, link to their site in your blog. It’s good karma, anyway. ??

    Edit: clintology: one small bug; it doesn’t appear to work on URLs that have automatically been hyperlinked by WP’s make_clickable() function. I believe adjusting the filter’s priority will fix this.

    Swirlee…
    Allowing a visitor to put a link on my site is the same as putting a link on myself, is it not? It’s a link from my site, regardless.

    Allowing a visitor to put a link on my site is the same as putting a link on myself, is it not? It’s a link from my site, regardless.

    Well, now that we have the rel=”nofollow” attribute, that is only the case if you want it to be. I would rather be able to set links that I actively endorse (e.g. in blog posts and in my blogroll) apart from links that everybody else, including spammers, have put on my site.

    I’ve read a number of opinions along the lines of “well this is irrelevant if you have a decent anti-spam system installed”. It’s half-right: if every blogger (and forum/guestbook/wiki/etc. administrator) had a decent anti-spam system installed, this would be irrelevant. But the fact is the vast majority don’t, and that means comment spam continues everywhere else, PageRank gets polluted, and my search results get worse. rel=”nofollow” is worth implementing because if the major blog software publishers and services all implement it (and Google says the big ones already are, including Matt) then the entire inscentive behind comment spam disappears.

    [Self-moderated]

    This is getting off-topic to the thread. Any continuation will result in all off-topic posts being deleted.

    Well, let’s examine this very group of people you’re talking about. People who don’t know how to manage the technical details of their site? People who don’t care about or know how to solve comment spam? I’d say that 95% of these people are using Blogger, LiveJournal, and SixApart’s TypePad. Those people will be following (no pun intended) the nofollow initiative whether they like it or not. Most of them won’t even notice.

    The other 5%? Well, it’s hardly worth mentioning, but it’s comprised of a couple of small groups:

    1. People in hosted scenarios where their blog software was installed for them. Most hosting companies which install software for customers are security-conscious and keep such software current, so most of these folks will join the nofollow bandwagon and might not even notice.
    2. Folks who installed blog software themselves. Many of these people will upgrade their software sooner or later (especially MT users who are paying for the privilege). Some won’t, but do you suppose they’ll make a dent?
    3. People with old, abandoned blogs. Spam comments accumulate on these old sites. Fortunately for us, sites like this have next to no PageRank, so our search results aren’t affected much anyway.

    So, which users am I missing?

    (Oh, I suppose this will get deleted. Egh. And I felt so good about it.)

    I’m of the opinion that this is a nice feature to have, but not something that should be on by default. My site has yet to ever have a spam comment go live and they all sit in moderation till I hit delete.

    However the people that read my blog and post to it are doing me a service by commenting, so why would I not give them something in return like a link back and free rank boost?

    When I post on other people’s blogs I’m not creating spam, I’m posting my viewpoint to be shared with people, and if people like it they click through for other things that I’ve said on other subjects. If all goes well, then the incestous blog community works and my blog gets more popular while the people whose blogs I comment on also get more popular, everybody wins and when I search for my name, I get ranked higher.

    Again, there is nothing wrong with this, but rather than punish everyone indiscriminately why not instead allow users to choose to let thier commenters get some google love?

    works fine in wordpress 1.5
    https://www.soulcore.de

    It gives me

    Warning: Wrong parameter count for preg_grep() in /srv/www/siriux.net/html-data/wp-content/plugins/wpNofollow.php on line 29

    Warning: Bad arguments to join() in /srv/www/siriux.net/html-data/wp-content/plugins/wpNofollow.php on line 30

    Did not have the time to look into its code, but maybe someone has a patch already?

    It’s the PREG_GREP_INVERT parameter for preg_grep. It needs PHP >= 4.2.0. I’ll have a look at its logic later to patch the plugin to be PHP 4.1 compatible.

    Thread Starter clintology

    (@clintology)

    I’m not sure how this plugin would be modified to allow for selective application of the attribute. Anyone have any ideas?

    1. Excellent plugin

    2. Excellent idea that Google, Yahoo, MT etc. support the new tag

    3. Bloggers have polluted search engines for to long, not every link comment is so important to be spidered and considered for page ranking

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Nofollow Plugin for WordPress 1.2’ is closed to new replies.