How To Add 'nofollow' to Social Plugins

Discussion in 'PHP' started by himanuzo, Jan 25, 2008.

  1. #1
    Have you heard http://push.cx/sociable? And installed it to your WordPress?

    Some way to add 'nofollow' to the social plugins ?

    If you know about it, please write the php code on here. Thanks.
     
    himanuzo, Jan 25, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I downloaded it and did a quick grep through the source, and you will need to edit the following line:

    Line #474

    From:

                    $html .= "<a href=\"$url\" title=\"$sitename\"";
    PHP:
    To (something like):

                    $html .= "<a href=\"$url\" rel=\"nofollow\" title=\"$sitename\"";
    PHP:
    Hope this helps,

    Jay
     
    jayshah, Jan 25, 2008 IP
    qwertie likes this.
  3. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Also, for your reference, the grep result is as follows:

    
    Binary file i18n/sociable-it_IT.mo matches
    i18n/sociable-hu_HU.po:msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
    i18n/sociable-hu_HU.po:msgstr "Sociable megpróbált frissítéseket keresni, de valami miatt ez nem sikerült. Lehet, hogy a PHP beállítások az oka, de az is lehet, hogy egyszerű hálózati gond lépett fel. Ha továbbra is fennáll a probléba, akkor a <a href=\"http://push.cx/sociable\">Sociable oldalán</a> meg tudod nézni, hogy van-e esetleg új verzió."
    i18n/sociable-hu_HU.po:msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
    i18n/sociable-hu_HU.po:msgstr "Elérhető egy új <a href=\"http://push.cx/sociable\">új Sociable verzió</a>"
    i18n/sociable-hu_HU.po:msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
    i18n/sociable-hu_HU.po:msgstr "A <a href=\"http://push.cx/sociable\">Sociable</a>  plugin <a href=\"http://push.cx/\">Peter Harkins</a> védjegye. GNU GPL 2, vagy annál újabb licenc alatt lett közzétéve. Ha tetszik a plugin, vagy kérdésed, ötleted van, akkor írj <a href=\"mailto:ph@malaprop.org\">levelet</a>! <br />Ha a magyar fordítással van valami probléma, akkor keress meg <a href=\"http://kobak.org/kontakt/\">engem</a>"
    Binary file i18n/sociable-de_DE.mo matches
    i18n/sociable-de_DE.po:msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
    i18n/sociable-de_DE.po:msgstr "Sociable versuchte auf ein Update zu prüfen, dabei trat ein Fehler auf. Das kann durch Netzwerkprobleme verursacht sein, kann aber auch an Einstellungen von PHP liegen. Bitte besuchen Sie die <a href=\"http://push.cx/sociable\">Webseite von Sociable</a> um auf ein mögliches Update zu prüfen."
    i18n/sociable-de_DE.po:msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
    i18n/sociable-de_DE.po:msgstr "Eine <a href=\"http://push.cx/sociable\">neue Version</a> von Sociable ist verfügbar."
    i18n/sociable-de_DE.po:msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
    i18n/sociable-de_DE.po:msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> Copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, veröffentlicht unter der GNU GPL Version 2. Wenn Sie Sociable mögen, dann informieren Sie andere über Sociable. Bei Problemen oder auch bei guten Ideen würde ich mich über eine <a href=\"mailto:ph@malaprop.org\">Nachricht </a>freuen."
    i18n/sociable-it_IT.po:msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
    i18n/sociable-it_IT.po:msgstr "Sociable ha provato a cercare un aggiornamento senza successo. Questo errore puo' essere dovuto al modo in cui PHP e' configurato o ad un semplice errore di rete. Visita <a href=\"http://push.cx/sociable\">il sito web di Sociable</a> per un aggiornamento manuale se necessario."
    i18n/sociable-it_IT.po:msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
    i18n/sociable-it_IT.po:msgstr "A <a href=\"http://push.cx/sociable\">Un nuova versione di Sociable e' disponibile</a>"
    i18n/sociable-it_IT.po:msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
    i18n/sociable-it_IT.po:msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> e' copyright 2006 di <a href=\"http://push.cx/\">Peter Harkins</a>, e viene distribuito sotto licenza GNU GPL versione 2 o successiva. Se Sociable ti piace, per cortesia, inserisci un link al sito dell'autore cosi' che altre persone possano venire a conoscenza di questo plugin. Se hai dei problemi nell'uso o delle buone idee da suggerire, <a href=\"mailto:ph@malaprop.org\">scrivimi</a>."
    Binary file i18n/sociable-hu_HU.mo matches
    Binary file i18n/sociable-fr_FR.mo matches
    i18n/sociable-fr_FR.po:msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
    i18n/sociable-fr_FR.po:msgstr "Sociable a essayé de vérifier les mises à jour mais a échoué. Cela est sans doute dû à la configuration PHP. Allez sur le site de <a href=\"http://push.cx/sociable\">Sociable</a> pour faire une mise à jour manuelle."
    i18n/sociable-fr_FR.po:msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
    i18n/sociable-fr_FR.po:msgstr "Un nouvelle version de <a href=\"http://push.cx/sociable\"> sociable est disponible</a>"
    i18n/sociable-fr_FR.po:msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
    i18n/sociable-fr_FR.po:msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> est copyright 2006 par <a href=\"http://push.cx/\">Peter Harkins</a>, libéré sous licence GNU GPL version 2 ou supérieure. Si vous aimez Sociable, renvoyez un lien vers mon site pour que d'autre personnes puisse le découvrir. Pour signaler un bug, une remarques, une idée, <a href=\"mailto:ph@malaprop.org\">écrivez moi</a>."
    sociable.php:Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
    [COLOR="Red"][B]sociable.php:		$html .= "<a href=\"$url\" title=\"$sitename\"";[/B][/COLOR]
    sociable.php:			sociable_message(__('Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href="http://push.cx/sociable">visit the Sociable website</a> to update manually if needed.', 'sociable'));
    sociable.php:		sociable_message(__('A <a href="http://push.cx/sociable">new version of Sociable is available</a>', 'sociable') . ' (' . __('as of ', 'sociable') . $found_update . ').');
    sociable.php:<?php _e('<a href="http://push.cx/sociable">Sociable</a> is copyright 2006 by <a href="http://push.cx/">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href="mailto:ph@malaprop.org">mail me</a>.', 'sociable'); ?>
    wists.js:                '<a href="http://wists.com/"><img src="http://wists.com/mainimages/logo_top_left.gif" border=0></a><br />'+
    wists.js:                '<p>Don\'t like any of these images? <a href="http://www.wists.com/s.php?c=&r='+location+'&title='+document.title +'">Create a thumbnail screenshot</a> instead!</p>'+
    wists.js:                '<table style="float:left;"><tr><td width=120 height=90 valign=middle align=center><a href="http://www.wists.com/" onclick="return Wistlet.submit_form(\''+r+'\');">'+
    
    Code (markup):
    Jay
     
    jayshah, Jan 25, 2008 IP
  4. himanuzo

    himanuzo Well-Known Member

    Messages:
    2,462
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    158
    #4

    Where is the source? wp-content/themes/default/single.php? wp-content/themes/default/index.php? Thx.
     
    himanuzo, Jan 25, 2008 IP
  5. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Why would a plugin be in a themes folder?

    Why not try the location you placed the plugin?
     
    Danltn, Jan 25, 2008 IP
  6. himanuzo

    himanuzo Well-Known Member

    Messages:
    2,462
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    158
    #6

    I have replaced the nofollow at sociable.php, it works!!! Thank you!!
     
    himanuzo, Jan 25, 2008 IP
  7. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #7
    You're very welcome :) It appears I forgot to add the filename earlier, but it was in the grep report ;)

    Jay
     
    jayshah, Jan 26, 2008 IP