Skip to:
Content
Pages
Categories
Search
Top
Bottom

bb_rel_nofollow – Does not work !


  • chrisbrocklesby
    Member

    @chrisbrocklesby

    Hi,

    This would be my third post I made on this now (Sorry) (I seemed to have been bozo’ed on my other posts as my posts aint showing on my other computer which I think is off MOD’s – why would you do this ?) but really think this is a serious issue for the bbPress community.

    I like many others have the bb_rel_nofollow filter in place to help against the fight against spam. It some what works but… if I put rel=”follow” in the html markup in a post I can over ride the nofollow filters.

    A example can be seen on post 82/83 of my beta forum: http://www.diyextra.com/forum/topic/this-is-a-test-of-the-lenght-of-the-forum-title-test-123-and-again?replies=19#post-82

    Does anyone know of this problem and does anyone have a patch to this.

    Many Thanks in Advance.

    Chris

Viewing 6 replies - 1 through 6 (of 6 total)

  • chrisbrocklesby
    Member

    @chrisbrocklesby

    I give up – I thought this was a valid bug that the community would be interested in repairing / discussing, spammers will love this one…


    Gautam Gupta
    Participant

    @gautamgupta

    Put this in your theme’s function.php (create one if it is not there):

    <?php
    function change_dofollow_to_nofollow( $content ) {
    return str_replace( array( ' rel="dofollow"', " rel='dofollow'" ), ' rel="nofollow"', $content );
    }
    add_filter( 'post_text', 'change_dofollow_to_nofollow', -1 );
    ?>


    Gautam Gupta
    Participant

    @gautamgupta

    Or you may use this, if the above doesn’t work for you:

    <?php
    function unset_arel( $tags ) {
    unset( $tags['a']['rel'] );
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'unset_arel', -1 );
    ?>


    chrisbrocklesby
    Member

    @chrisbrocklesby

    Hi Gautam,

    Thank you, you are a 100% star ! , I really do think this is a issue that the bbPress team should look in to correcting in the next version of bbpress… This one is a spammer god send.

    Thank you so much for answering I thought I was talking to myself, I hope someone else here finds this info useful to protect there forums.

    Kind Regards,

    Chris

    can you explain what no_follow is?


    chrisbrocklesby
    Member

    @chrisbrocklesby

    Ok… nofollow is a value for a tag called ‘rel’ in a hyperlink, this value tells the search engines to not follow this link and put any value to it (like a recommendation) spammer love it when this is unset and often abuse it…

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar