vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Apply "rel=nofollow" attribute to all parsed URLs (https://vborg.vbsupport.ru/showthread.php?t=93780)

seo guy 01-30-2007 12:38 AM

I prefer to have it retroactively change the links - will the file base hack help me?

- it doesn't seem to work retroactively or at all with the pluggin..

what could I be doing wrong? - my templates are from 3.0.3 - I fear this is the problem..

Thank you,

navjotjsingh 01-31-2007 05:23 AM

Excellent Mod! Thanks ... working wonderfully on 3.6.4 forum!

kafi 02-01-2007 08:57 AM

Thanks for this nice one.

I found few questions same as I have, but didnt see the answer.

Could there be a white list or at least to omit nofollow for internal forum_own links?
I have removed post condition so there is too many links now with nofollow for my board...

Thank you!!!

verbs 02-19-2007 12:34 AM

Quote:

Originally Posted by kafi (Post 1171923)
Thanks for this nice one.

I found few questions same as I have, but didnt see the answer.

Could there be a white list or at least to omit nofollow for internal forum_own links?
I have removed post condition so there is too many links now with nofollow for my board...

Thank you!!!

That's a big sticking point for me too....if this is adding internal no-follow links then that's tough.

Another great add on would be the ability to control which forums the no-follow tags are added too.....certain forums that I control I am OK with outgoing no-follow links.

projectego 03-04-2007 03:49 PM

Awesome plugin, kall; works flawless with 3.6.3. ;)

hugh_ 03-15-2007 09:28 AM

This mod doesn't seem to be working for me. I'm using VB 3.5.7 but none of my users' links in posts appear to be inheriting rel=nofollow except for their signatures and vbshout posts where all links are inheriting it. Anyway I'm assuming it's conflicting with something obviously. Has anyone else seen this and what can I do about it?

Thanks...

$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';

if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 6, 7) OR $post['posts'] > 50)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}

ThorstenA 04-09-2007 10:45 PM

How can I exclude my own domain from rel=nofollow?

moveforward 04-14-2007 09:45 AM

Thanks for this plugin. Works great for me on 3.6.5.
Only one issue is that Sig links are not NoFollow.

Smitty 04-14-2007 12:37 PM

Quote:

Originally Posted by ThorstenA (Post 1223654)
How can I exclude my own domain from rel=nofollow?

I am trying this out. Looking at it, if someone has more than 50 posts or is a mod, super-mod or admin the tag is not applied. That said, unless one has a very small forum, it shouldn't be attaching the tag to many internal url's. I see this as useful to keep the hit and run people at bay, so to speak. Actually, My installing it is more of an attempt to better SEO the forums to keep me high in the ratings.

On the other hand I have a very active moderator group so 'spam' posts are usually caught quickly and the links removed or the post (or posts) are deleted and the poster banned (I use Spam Decimator for 2 click convenience - the moderators love it) usually within minutes (there's almost always a mod or me on 24/7).

Well, now I'm off to check some page source to see if it's working as intended or not.

BTW - Running vB 3.5.6

Alfa1 04-17-2007 05:42 PM

I want rel="nofollow" only applied to all outbound links. No matter who posts them. How can this be done?

ThorstenA 04-17-2007 06:00 PM

Quote:

Originally Posted by Alfa1 (Post 1229857)
I want rel="nofollow" only applied to all outbound links. No matter who posts them. How can this be done?

Me too !

kall 04-17-2007 07:14 PM

Given that this has been asked for many times, and I have no idea how, I wish you and everyone else the best of luck in working out a method of determining whether a link is internal or external.

Again, for clarity: I have no idea how to achieve this easily.

kall 04-17-2007 07:19 PM

No idea sorry.

If anyone can, by all means, please tell me.

ThorstenA 04-17-2007 08:42 PM

Quote:

Originally Posted by kall (Post 1229910)
Given that this has been asked for many times, and I have no idea how, I wish you and everyone else the best of luck in working out a method of determining whether a link is internal or external.

Again, for clarity: I have no idea how to achieve this easily.

A link which has this string in it:$variable where $variable is http://www.myforum.com/

jimbocook 04-19-2007 03:50 PM

Using 3.6+ the plugin works fine until a user reaches 1000 posts and then it starts applying the nofollow to their posts. We've had to create a special group and exempt them as a work around. Is anyone aware of a reason the nofollow would kick back in after 1000 posts?

jimbocook 04-24-2007 04:31 PM

At SEOrefugee.com, we had a problem with this plugin inserting the nofollow tags when a user passed the 1,000 post mark. The problem was a comma inserted into the number of posts (e.g. 1,000). We fixed it by changing this line in the plug in:
Code:

        if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
to this (which strips the unwanted comma from the post count):
Code:

        if (!(is_member_of($post, 5, 6, 7)===FALSE) || str_replace(",","",$post['posts']) > 50)

2 FN LOW 06-11-2007 06:48 PM

can anybody tell me if this is working on my forum or not? I am viewing page sources for multiple threads but im not really sure where im suppose to look to see the no follow being used....Actually, i dont see it anywhere really..I want it to be applied to everything posted, dont care if your a mod or have over 367423 posts...So i changed the PHP code to this...Not sure if its right or not..

Code:

global $post;
        // Excempt Mods+ and Users with mor then 50 Posts
        $parsedurl = $parser->handle_bbcode_url($text, $link);
        if (is_member_of($post, 666) OR $post['posts'] > 5000000)

also, my forum is located at www.obsession2speed.com/forums if somebody could take a look at it for me please.

2 FN LOW 06-11-2007 07:02 PM

when i view the page source of this thread i dont see the no follow code where i believe it should be...

http://www.obsession2speed.com/forum...read.php?t=598

if you go down a lil bit when viewing the source code you will come to my post....I notice the URL post is not phrased with the no follow code...why is this?

vbl 07-22-2007 01:52 PM

in the nofollow_plugins.zip, there is one & to much:

in this line:
function handle_bbcode_url_relnofollow(&$parser, $text, $link)

Dave Hawley 07-23-2007 04:19 AM

View Source, Ctrl+F and search for nofollow

vbl 07-23-2007 08:58 AM

unfortunately doesnt work for me @3.6.7PL1
i think there is something wrong with the condition

if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)

^^ seems somehow wrong...?? $post[dont_we_need_some_group_entry_here?]
anyone any idea?

vwdforum 07-23-2007 09:56 AM

Added this to www.vwdforum.com

works, (when I check "view source code") however also for internal links. Anyone found a solution yet?

Gharibe 01-09-2008 02:23 PM

Do Not Work

kall 01-09-2008 07:51 PM

That's probably not a good idea, working can be useful to bring food into the house, and keep the house paid for. I work.

Dave Hawley 01-09-2008 10:11 PM

Quote:

Originally Posted by Gharibe (Post 1418381)
Do Not Work

Ok, you choose not to, but as stated above, it has its rewards :)

clasione 01-13-2008 12:05 PM

I'm running three forums where this works in some instances and not in others.... I have already checked and double checked my user group id numbers to make sure there are not any regular users comming up in groups 5, 6, or 7 but I still find that in some instances the added no follow works on posts and signatures but some instances it just doesn't.... A user will have 3 posts and it will not add the nofollow....

I have tryed all the forums and it works in some places and it doesn't.. Also visiting posts I haven't viewed in a long time to rule out page cache. Can't figure it out.

RaZor Edge 02-19-2008 05:06 AM

I'm using this code on 3.6.8 and it's running fine.

As I want this to work with every user exept my staff, I have removed the part with number of post.

Here's what I am using:

Code:

$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow'))
{
    function handle_bbcode_url_relnofollow($parser, $text, $link)
    {
        global $post;
        // Excempt Mods+ and Users with mor then 50 Posts
        $parsedurl = $parser->handle_bbcode_url($text, $link);
        if (is_member_of(5, 6, 36))
        {
            return $parsedurl;
        }
        else
        {
            return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
        }
    }
}


myown 05-13-2008 11:54 AM

what about 3.7 Gold any idea ?

oldengine 06-13-2008 04:39 PM

It appears to be working in mine.

oldengine 06-22-2008 03:45 PM

Quote:

Originally Posted by clasione (Post 1420612)
I have tryed all the forums and it works in some places and it doesn't.. Also visiting posts I haven't viewed in a long time to rule out page cache. Can't figure it out.

Don't over look that you need to go to Admin > Maintenance > Update Counters
and run "Rebuild Post Cache" and "Empty Signature Cache" to rebuild all those links.

A whitelist ability for your own forum's domain name would be an excellent add-on to this mod.

Greg-J 07-09-2008 04:50 AM

Quote:

Originally Posted by RaZor Edge (Post 1446398)
I'm using this code on 3.6.8 and it's running fine.

As I want this to work with every user exept my staff, I have removed the part with number of post.

Here's what I am using:

Code:

$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow'))
{
    function handle_bbcode_url_relnofollow($parser, $text, $link)
    {
        global $post;
        // Excempt Mods+ and Users with mor then 50 Posts
        $parsedurl = $parser->handle_bbcode_url($text, $link);
        if (is_member_of(5, 6, 36))
        {
            return $parsedurl;
        }
        else
        {
            return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
        }
    }
}


Your code will not work as you are not passing is_member_of() the users current groupid. It should be:

PHP Code:

$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!
function_exists('handle_bbcode_url_relnofollow'))
{
    function 
handle_bbcode_url_relnofollow($parser$text$link)
    {
        global 
$post;
        
// Excempt Mods+ and Users with mor then 50 Posts
        
$parsedurl $parser->handle_bbcode_url($text$link);
        if (
is_member_of($post5636))
        {
            return 
$parsedurl;
        }
        else
        {
            return 
str_replace('href="''rel="nofollow" href="'$parsedurl); 
        }
    }



Greg-J 07-09-2008 07:31 AM

Quote:

Originally Posted by oldengine (Post 1556118)
A whitelist ability for your own forum's domain name would be an excellent add-on to this mod.

That's an easy fix. I tried to write it so it would work universaly, but I can't seem to get $vbulletin->options from within the plugin...

Anyway, use this but replace 'DOMAIN_NAME' with your domain. For instance, if vbulletin.org used this mod they would replace 'DOMAIN_NAME' with 'vbulletin'

PHP Code:

$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!
function_exists('handle_bbcode_url_relnofollow'))
{
    function 
handle_bbcode_url_relnofollow($parser$text$link)
    {
        global 
$post;
        
$parsedurl $parser->handle_bbcode_url($text$link);
        if (
is_member_of($post56) || strpos($parsedurl'DOMAIN_NAME') !== false)
        {
            return 
$parsedurl
        }
        else
        {
            return 
str_replace('href="''rel="nofollow" href="'$parsedurl); 
        }
    }



JPnyc 10-23-2008 04:26 PM

Anyone know why this works for sig links in 3.5 but not in 3.7.x?

JPnyc 10-24-2008 06:53 PM

nevermind, signature cache needed to be released.


All times are GMT. The time now is 05:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01465 seconds
  • Memory Usage 1,846KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete