Simple Ads Manager
[resolved] Optionally add rel="nofollow" to ad links (4 posts)

  1. Gabriel Dobersch
    Posted 4 years ago #

    It would be nice to be able to define rel="nofollow" attribute for the outgoing links of an ad. Maybe it's possible to add an optional "rel" input field at the banner code management page.


  2. Gabriel Dobersch
    Posted 4 years ago #

    It seems that there are already some lines of code that aim towards this issue - but as yet they are commented out. So I hardcoded the nofollow attribute into the source.

    In file "ad.class.php" (main plugin directory) around the lines 100 and 500 there are lines where the actual banner link gets build:

    $aStart = "<a $outId href='{$ad['ad_target']}' target='$target' ".">";

    to which I just added the nofollow attribute like so:

    $aStart = "<a $outId href='{$ad['ad_target']}' rel='nofollow' target='$target' ".">";

    That does the trick for me as I do not need the option to activate and deactivate rel=nofollow on a per banner basis.

  3. Michael Shinosky
    Posted 3 years ago #

    That's works until the plugin needs updating....

  4. Gabriel Dobersch
    Posted 3 years ago #

    Of course, it's just a workaround until the plugin developer provides such an option - less-than-ideal but working.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.