Support » Plugins » [Plugin: Sociable] NoFollow

  • Resolved videoazzurri


    I use Sociable 3.2.3 with WordPress 2.8.
    Is it possible to set the links of Sociable without rel=”nofollow”?
    What to do?


Viewing 4 replies - 1 through 4 (of 4 total)
  • it’s possible and easy.
    But you have to add a few code (that will be overwritten when you update the plugin).

    There are (at least 🙂 two ways:
    – hard coded (nofollow will be output, always)
    – prety cool upgrade (selectable option in the backend)

    [The Hard coded way]
    around line 588, you will find

    $link .= "<a rel=\"nofollow\"";

    replace it with:

    $link .= "<a";

    and you have it! maybe next time you’ll try by yourself! 🙂

    [The pretty cool way]
    do the Hard Coded method, and continues:

    around line 592, after:

    if (get_option('sociable_usetargetblank')) {
    	$link .= " target=\"_blank\"";

    write the following:

    if (get_option('sociable_usenofollow')) {
    	$link .= " rel=\"nofollow\"";

    around line 782, after:

    } else {

    add this:

    if (isset($_POST['usenofollow']) && $_POST['usenofollow']) {
    } else {

    around line 834, after:
    $usetargetblank = get_option('sociable_usetargetblank');
    $usenofollow = get_option('sociable_usenofollow');

    and finally, around line 924, after:

    <input type="checkbox" name="usetargetblank" <?php echo (get_option('sociable_usetargetblank')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use <code>target=_blank</code> on links? (Forces links to open a new window)", "sociable"); ?>


    		<th scope="row" valign="top">
    			<?php _e("Use 'nofollo' rel tag:", "sociable"); ?>
    			<input type="checkbox" name="usenofollow" <?php echo (get_option('sociable_usenofollow')) ? ' checked="checked"' : ''; ?> /> <?php _e("Use <code>rel=nofollow</code> on links? (Forces search engines to 'not follow this link' because it's outside our site)", "sociable"); ?>

    and you will have the ‘followed’ 😉 option in your Backend.

    do backups, and let the force be with you 🙂

    Dear tarrero, really thanks for your answer!
    Now I will try your code.


    Really perfect!
    I used your code and now I have the nofollow option in my backend.
    All function perfectly!
    Only 2 little statements for the other users who will read your code:
    1) My numbers of code’s lines are different (I use WordPress 2.8 and Sociable 3.3);
    2) In your last grey window I corrected “Use ‘nofollo’ rel tag;” with “Use ‘nofollow’ rel tag;”.

    Thanks again!

    All OK in Sociable 3.3.1 also.
    This code works good!


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Sociable] NoFollow’ is closed to new replies.