1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

NoFollow in PhpBB forum posts - How to add?

Discussion in 'phpBB' started by vex, Dec 24, 2007.

  1. #1
    How can I add "nofollow" to PhpBB forum posts? In fact, I don't know how to add nofollow at all.

    Thanks guys! Any help is appreciated! :)
     
    vex, Dec 24, 2007 IP
  2. epsilonstudios

    epsilonstudios Peon

    Messages:
    77
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    phpbb2? phpbb3??

    bb3 is in viewtopic.php

    find
    $message = bbcode_nl2br($message);
       $message = smiley_text($message);
    Code (markup):
    after add
    $message = preg_replace('/(class="postlink")/','class="postlink" rel="nofollow" target="_blank"',$message);
    Code (markup):
    That will also open links in new window
     
    epsilonstudios, Dec 24, 2007 IP
  3. vex

    vex Peon

    Messages:
    158
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wow, epsilonstudios, your message is so clear, thanks. But can you tell me the PhpBB2 version also? Coz my question was originally for PhPBB2. Thanks in advance! :)
     
    vex, Dec 25, 2007 IP
  4. mds

    mds Active Member

    Messages:
    256
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Normally i think it should be the same. If you use a phpbb its worth it if you can take a look at phpbb hacks site for Mods that will better your site
     
    mds, Dec 26, 2007 IP
  5. Tom@S

    Tom@S Active Member

    Messages:
    252
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    is this nofollow usefull?Will then my forum more atractive for google?
    and this make nofollow only links in forum or in footer and etc too?It is important if i want to change link or so.How can i see if it is work?
    thx
     
    Tom@S, Jan 5, 2008 IP
  6. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #6
    i think you can do this with your robots.txt file
     
    trichnosis, Jan 7, 2008 IP
  7. usa666

    usa666 Well-Known Member

    Messages:
    468
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    110
    #7
    this did the trick tyvm
     
    usa666, Jan 20, 2009 IP
  8. dwhswebhosting

    dwhswebhosting Well-Known Member

    Messages:
    96
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #8
    Wow great snip, thanks!
     
    dwhswebhosting, Mar 30, 2009 IP
  9. surfgimp

    surfgimp Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Andrew,
    Thank you very much for this code. It's helped me a lot. I've tweaked it slightly to allow for the decent users on my forum. I'll trigger it if users have posted less than a certain amount.

    	if ($user_cache[$poster_id]['posts'] < 75)
    	{
    		$message = preg_replace('/(class="postlink")/','class="postlink" rel="nofollow" target="_blank"',$message);
    	}
    Code (markup):
    Obviously the way to go would be to have this value accessible via the admin panels but for now it does the job.

    Thanks again
    Steve
     
    surfgimp, Oct 29, 2009 IP
  10. klkhosting

    klkhosting Well-Known Member

    Messages:
    403
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    135
    #10
    Thanks no i don't have to give backlinks to those other nofollow sites
     
    klkhosting, Nov 2, 2009 IP
  11. Stephen20

    Stephen20 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    That's exactly what I have been searching for! Only one question: Is it possible to add the nofollow-attribute just on external links? I'm afraid adding it also on internal links might give trouble with search engine spiders. Thanks!
     
    Stephen20, Jul 21, 2010 IP
  12. Stephen20

    Stephen20 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Problem solved with "Prime Links"-Mod
     
    Stephen20, Jul 21, 2010 IP
  13. Hardgainer

    Hardgainer Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I love the update for allowing the no-follow to only be active for users with a minimum post count, but it still allows do-follow links in signatures. Does anyone know how to do the same thing for user signatures?
     
    Hardgainer, Dec 2, 2010 IP