Simple Machines Community Forum

SMF Support => Español (Spanish) => Language Specific Support => Modificaciones (Mods) => Topic started by: chaky! on July 19, 2009, 04:59:52 PM

Title: [TIP - Posicionamiento] nofollow
Post by: chaky! on July 19, 2009, 04:59:52 PM
Buenas,


Les traigo un pequeño aporte, que a mas de uno se le debe haber ocurrido, pero en mods oficiales no hay nada.. (aclaro que busque rapidito)


Esto esta probado en SMF 2.0-RC1.2 de todas formas en 1.1.10 no hay grandes diferencias de implementacion...

Bue, explico un toque...

Ya muchos deben conocer el Tag "NoFollow", este elemento lo creo google para optimizar la distribucion del PR, es decir todos los links que salen de una web, su webmaster puede elegir "compartir" su pagerank..

Lo que hace esta modificacion es agregar ese tag, a todos los links que se publiquen en los posts..

Es muy util para los foros de descargas que tienen cientos de links a rapidshare y distintos servidores...

Procedemos con la edicion....

Sources/Subs.php

Buscamos:
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1"  class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1"  class="bbc_link new_win" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',


Reemplazamos por:
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 />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" rel="nofollow" class="bbc_link new_win" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',



Como veran lo unico que se hizo fue agregar rel="nofollow" al href..


Espero que les sirva..


Saludos ;)
Title: Re: [TIP - Posicionamiento] nofollow
Post by: lucas-ruroken on July 19, 2009, 05:24:59 PM
Gracias por el aportes ;)
Title: Re: [TIP - Posicionamiento] nofollow
Post by: Nibogo on July 19, 2009, 05:38:57 PM
De hecho ya existe un mod:

http://custom.simplemachines.org/mods/index.php?mod=1236 (http://custom.simplemachines.org/mods/index.php?mod=1236)
Title: Re: [TIP - Posicionamiento] nofollow
Post by: chaky! on July 19, 2009, 05:55:33 PM
les dije que habia buscado rapido...


Perdon!
Title: Re: [TIP - Posicionamiento] nofollow
Post by: Nibogo on July 19, 2009, 06:01:54 PM
Quote from: chaky! on July 19, 2009, 05:55:33 PM
les dije que habia buscado rapido...


Perdon!

La idea de aportar cuenta, sencillamente aclaro que ya existe un mod
Title: Re: [TIP - Posicionamiento] nofollow
Post by: aristides_03 on July 20, 2009, 11:29:34 PM
gracias por compartir  el info
Title: Re: [TIP - Posicionamiento] nofollow
Post by: Yarinca on April 02, 2012, 12:12:26 PM
a mi me parece que esos dos mods les falta la opción de hacer nofollow solo las urls externas y no las internas... cosa que solucione haciendole un apaño al mod anti-spam links