News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

NoFollow All Links v1.0

Started by Nibogo, June 02, 2008, 09:16:58 PM

Previous topic - Next topic

coolfx350

Quote from: Paracelsus on March 11, 2010, 02:20:18 PM
Quote from: GohighVoltage on February 17, 2010, 12:37:34 PM
I am not sure I understand,  This mod makes all links no-follow,  but what do you mean it does it to the internal links too?

Yes. This MOD puts all links in the post area as "no follow", whether they are internal or external. The good part is... you can change this. This is how I did it:

1. Install the NoDoFollow Firefox extension to be able to distinguish the Nofollow from Dofollow links.

2. Install both this MOD and the Internal Links Use Same Window MOD:
http://custom.simplemachines.org/mods/index.php?mod=1255
http://custom.simplemachines.org/mods/index.php?mod=1236

Right now you should notice (with the help of that Firefox extension) that every single link in the post area (signature included) marks as red, which is nofollow, instead of previous blue.

3. The NoFollow MOD adds the rel="nofollow" in 4 places in Subs.php: I left the ones related to "url" and removed the ones related to "iurl" (since iurl is for internal links).

4. Since I don't need the functionality provided by the other MOD, ie, I'm indifferent to whether the internal links open or not in a new window so I simply went to Subs.php and edited the line
   $message = preg_replace('~<a href="'.$internal.'([^"]*?)"([^>]*?)(?:target="_blank")~i'.($context['utf8'] ? 'u' : ''), '<a href="'. $internal2 .'$1"$2', $message);
replacing the target="_blank" by rel="nofollow".

5. You should now notice that every external link continues red and every internal link (ex: hxxp://www.yourforum.com/index.php?topic=12345.0) will now have turned blue again, ie, dofollow.

That's it, hope it helps.




Btw,

Actually, I need an advanced tweak to be able to remove the nofollow from some links of one of my subdomains. Is there some sort of "inline" remove string or a way to add an exception to the code?

That's too complicated and too much work since I have multiple SMF sites.  I hope the OP resolve this issue soon we can all use this mod. thanks.

GohighVoltage

Yes,  way too much work, and too much chance of screwing something up.  I am sure sleepy can fix at some point.  he is really good.

Paracelsus

These extensions are two of the most simple ones made for SMF, adding just a few lines. That's why the hard part is to screw something up. :D

hartiberlin

Hmm,
still no answers or ideas to my questions in my previous message ?

So only posted links inside postings will be set to
No-Follow with these tricks above ?

Can one set in the Membergroups settings, that the
postings from the admin have links
with Follow status ?

Or how can the admin post important links,
that have Follow status ?


What is the latest news about Google and the DO-Follow and
No-Follow informations...

I have in my overunity.com forum a Pagerank of 5.

So if users post their own Domain names in their postings,
do I give up on my Pagerank and will Google thus slap me ?

So would it really be better to encode all links to other sites as No-Follow ?

How can I more easily set  links to my other sites in the
blocks of PortaMX then as Do-Follow and
also could there be a membergroups setting, so one
could decide, which membergroup could be allowed to post Do-Follow
links in their postings ?

Please let me know your views about this, cause there is much confusion
right now about No-Follow and Do-Follow links.

Many thanks.

Regards, Stefan.

Paracelsus

Quote from: hartiberlin on March 22, 2010, 04:05:07 PM
Hmm,
still no answers or ideas to my questions in my previous message ?

So only posted links inside postings will be set to
No-Follow with these tricks above ?

Can one set in the Membergroups settings, that the
postings from the admin have links
with Follow status ?

Or how can the admin post important links,
that have Follow status ?


What is the latest news about Google and the DO-Follow and
No-Follow informations...

I have in my overunity.com forum a Pagerank of 5.

So if users post their own Domain names in their postings,
do I give up on my Pagerank and will Google thus slap me ?

So would it really be better to encode all links to other sites as No-Follow ?

How can I more easily set  links to my other sites in the
blocks of PortaMX then as Do-Follow and
also could there be a membergroups setting, so one
could decide, which membergroup could be allowed to post Do-Follow
links in their postings ?

Please let me know your views about this, cause there is much confusion
right now about No-Follow and Do-Follow links.

Many thanks.

Regards, Stefan.


There isn't a straight answer, because the PageRank algorithm is more complex than what people think (and even with established definitions, experts still interpret it differently). If you want a nice (short) reading about PR: http://www.webworkshop.net/pagerank.html

As for the MOD, if you want to be sure which ones become nofollow and which do not just install the extension NoDoFollow for Firefox and it will highlight in realtime the links. I tried it and only the links where you use the "url" tag went nofollow, if you're and admin and want to post dofollow links just use HTML syntax: "<a href..." and so on, it works for me. The membergroup part isn't possible because there is no Admin panel for this MOD.

Am'

nice

it's possible to add nofollow only in external links ?
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Paracelsus

Quote from: Am' on March 25, 2010, 08:04:02 AM
nice

it's possible to add nofollow only in external links ?

I've just described the procedure.

hartiberlin

I just realized by loooking at a competitior´s website,
that it is really helpful to have many links to internal pages.
This website did NOT have many outside links linking to him,
but he himself has about 40.000 pages linked internally from
his own pages to other of his own pages..

So is there any Mod that also generates links on the fly via keywords to internal
pages with Dofollow ?

( Sorry, a little bit offtopic, but it is important to get to Google page 1 ! )

Paracelsus

Quote from: hartiberlin on March 25, 2010, 01:41:49 PM
I just realized by loooking at a competitior´s website,
that it is really helpful to have many links to internal pages.
This website did NOT have many outside links linking to him,
but he himself has about 40.000 pages linked internally from
his own pages to other of his own pages..

So is there any Mod that also generates links on the fly via keywords to internal
pages with Dofollow ?

( Sorry, a little bit offtopic, but it is important to get to Google page 1 ! )

I think that strategy makes Google put your site on their "blacklist" because it's sort of trying to cheat the system. As I said before, trying to resume the PageRank algorithm to having lots of internal links and few external links is a distorted oversimplification. Read the link I put back there and try to understand what it is written there. If you have a lot of patience and want to really go deep on this you can read this page (they have some very good references at the end with very advanced explanations): http://www.seocompany.ca/pagerank/page-rank-explained.html

Simply put, there isn't an instantaneous method to get to Google page 1 (it would be stupid if that method existed, it would mean a total flaw in PR which doesn't seem to be the case as Google is the most successful web search application to date), what you can do is to have a certain active strategy over time that in the long term might benefit your site's PR.

hartiberlin

Anyway, so is there any linking Mod,
that enables internal links, when it finds internal pages that
are defined in a keyword file ?

Am'

#50
Quote from: Paracelsus on March 25, 2010, 01:17:51 PM
Quote from: Am' on March 25, 2010, 08:04:02 AM
nice

it's possible to add nofollow only in external links ?

I've just described the procedure.

it's not a solution ^^

so, i coded this for users who want to add nofollow for external links only :

in Subs.php, search :

// Cleanup whitespace.
$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />', '<br /> ' => '<br />&nbsp;', '&#13;' => "\n"));


After add :

// Add rel="nofollow" for external links
$name = parse_url($scripturl);
$message = str_replace('<a href="', '<a rel="nofollow" href="', $message);
$message = str_replace('<a rel="nofollow" href="http://'.$name['host'].'', '<a href="http://'.$name['host'].'', $message);
$message = str_replace('<a rel="nofollow" href="http://www.'.$name['host'].'', '<a href="http://www.'.$name['host'].'', $message);


adding nofollow for any external link in message, signature, news ....

for adding nofollow only to external links in message

in Display.php, search :

// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);


After add :

// Add rel="nofollow" for external links
$name = parse_url($scripturl);
$message['body'] = str_replace('<a href="', '<a rel="nofollow" href="', $message['body']);
$message['body'] = str_replace('<a rel="nofollow" href="http://'.$name['host'].'', '<a href="http://'.$name['host'].'', $message['body']);
$message['body'] = str_replace('<a rel="nofollow" href="http://www.'.$name['host'].'', '<a href="http://www.'.$name['host'].'', $message['body']);


but before uninstall "NoFollow All Links v1.0"  ;)
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

!RFAN


rajeshn

Hi,
I just installed this mod (forums dot masterandstudent dot com ). No errors. But when I used Firefox no do follow plugin , the links are do follow?
Can you tell me what could be the problem?
Thanks

rajeshn

Quote from: rajeshn on May 20, 2010, 09:55:58 PM
Hi,
I just installed this mod (forums dot masterandstudent dot com ). No errors. But when I used Firefox no do follow plugin , the links are do follow?
Can you tell me what could be the problem?
Thanks
Adding to the above query,
I am using smf 1.1.1.1 headline theme.

Thanks.



Idiotji

I have just install no follow link mod,but in the post i am not seeing no follow tag,will i have to activate this option??
http://tekloverz.com
This Time Every Thing Is Customized


Idiotji

Quote from: Nibogo on September 16, 2010, 06:51:52 PM
Quote from: Idiotji on September 16, 2010, 05:04:40 PM
I have just install no follow link mod,but in the post i am not seeing no follow tag,will i have to activate this option??

No, code isn't inserted, try re-installing manually

I installed it again and when i open source/sbs.php, i found these codes.
I found 4 nofollow tags in this php file.I m posting these codes and plz tell me wots going wrong.
what should i edit.

Quotearray(
            'tag' => 'iurl',
            'type' => 'unparsed_content',
            'content' => '<a href="$1" rel="nofollow" class="bbc_link">$1</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),
         ),
         array(
            'tag' => 'iurl',
            'type' => 'unparsed_equals',
            'before' => '<a href="$1" rel="nofollow" class="bbc_link">',
            'after' => '</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (substr($data, 0, 1) == \'#\')
                  $data = \'#post_\' . substr($data, 1);
               elseif (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),

array(
            'tag' => 'url',
            'type' => 'unparsed_content',
            'content' => '<a href="$1" rel="nofollow" class="bbc_link new_win" target="_blank">$1</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               $data = strtr($data, array(\'<br />\' => \'\'));
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),
         ),
         array(
            'tag' => 'url',
            'type' => 'unparsed_equals',
            'before' => '<a href="$1" rel="nofollow" class="bbc_link new_win" target="_blank">',
            'after' => '</a>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
                  $data = \'http://\' . $data;
            '),

http://tekloverz.com
This Time Every Thing Is Customized

Idiotji

Hmmmm plz someone help me about this tag....why am i not seeing that no follow tag
http://tekloverz.com
This Time Every Thing Is Customized

Oya

it doesnt put [nofollow] after the links it just quietly sets it to nofollow

if u want teh mod used here that does that its called anti spam links

Advertisement: