|
ObfuscateExternalLinks<< Drop Down Menu | Cookbook-V1 | Simple Page Counter >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalThe goal of this add-on is to replace external urls by an obfuscated form. This should avoid/limit spam on wiki pages: the url won't appear in the page SolutionThe FmtUrlLink function is replaced. Each link is replaced by a string made of the hexadecimal value of each characters of the urls. Then the url is replaced by a redirection script able to decode this string. for example, on my wiki, the following link: http://www.pmwiki.org/wiki/CookBook/HomePage is replaced by: http://mywebsite/pmwiki/redirect.php?link=687474703a2f2f7777(approve links).... Discussion
$UrlWhiteList[] = 'www.your.site.web'; $UrlWhiteList[] = 'www.othersite'; $UrlWhiteList[] = 'www.pmwiki.org'; $UrlWhiteList[] = 'www.pmichaud.com'; $RedirectionScriptUrl='http://www.your.site.web/pmwiki/redirect.php(approve links)'; include_once("local/hide_external_links.php");
See AlsoHistory
Comments & Bugs
I don't see why the huge random string is necessary, especially since a redirect is still a link to a target site and would most likely count as perfectly valid on search engines. -- Ari
I thought that url that do not appear clearly as plain text where not taken into account by web search engines? Bad news, I did this for nothing? :-(
Contributors
Copyrightpmwiki-2.2.0-beta68 -- Last modified by {{Gregory}}?
|