Textpattern Forum

You are not logged in. Register | Login | Help

#1 2005-01-18 22:13:47

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

[plugin] [ORPHAN] zem_prblock

zem_prblock is a Textpattern plugin that reduces the incentive for comment spam by blocking PageRank on outgoing links. It also allows attributes such as class and target to be selectively applied to links to external web sites.

Comment spam is usually motivated by web site owners trying to improve their ranking in Google search results. They do this by including links to their web site in comments submitted to many different blogs. Google interprets these links as meaning that the spammer’s web site is very popular.

zem_prblock works by ensuring that Google ignores links to external web sites. It offers two different methods: javascript redirection, and the rumoured-soon-to-be-announced rel=nofollow technique. The plugin only alterss links within a predefined block, and skips local, relative and ‘mailto:’ links.

Download and documentation: link.

This was initially a software ransom, but it’s already paid in full, so it’s available for download now.

YToxMDp7czo0OiJuYW1lIjtzOjExOiJ6ZW1fcHJibG9jayI7czo2OiJhdXRob3IiO3M6MTU6IlRocmVzaG9sZCBTdGF0ZSI7czoxMDoiYXV0aG9yX3VyaSI7czoyNjoiaHR0cDovL3RocmVzaG9sZHN0YXRlLmNvbS8iO3M6NzoidmVyc2lvbiI7czozOiIwLjEiO3M6MTE6ImRlc2NyaXB0aW9uIjtzOjc5OiJBcHBsaWVzIFBSIGJsb2NraW5nIHRvIG91dGdvaW5nIGxpbmtzLCB0byByZWR1Y2UgdGhlIGluY2VudGl2ZSBmb3IgY29tbWVudCBzcGFtIjtzOjQ6ImhlbHAiO3M6MjUzNToiPHA+PHN0cm9uZz56ZW1fcHJibG9jazwvc3Ryb25nPiByZWR1Y2VzIHRoZSBpbmNlbnRpdmUgZm9yIGNvbW1lbnQgc3BhbSBieSBibG9ja2luZyBQYWdlUmFuayBvbiBvdXRnb2luZyBsaW5rcy48L3A+CgoJPHA+Q29tbWVudCBzcGFtIGlzIHVzdWFsbHkgbW90aXZhdGVkIGJ5IHdlYiBzaXRlIG93bmVycyB0cnlpbmcgdG8gaW1wcm92ZSB0aGVpciByYW5raW5nIGluIEdvb2dsZSBzZWF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3ByYmxvY2soJGF0dHMsICR0aGluZykgewoJZ2xvYmFsICR6ZW1fcHJibG9ja19hdHRzOwoKCSR0eXBlID0gaXNzZXQoJGF0dHNbJ3R5cGUnXSkgPyAkYXR0c1sndHlwZSddIDogJ25vZm9sbG93JzsKCSR6ZW1fcHJibG9ja19hdHRzID0gJGF0dHM7Cgl1bnNldCgkemVtX3ByYmxvY2tfYXR0c1sndHlwZSddKTsKCgkkb3V0ID0gcGFyc2UoJHRoaW5nKTsKCglyZXR1cm4gcHJlZ19yZXBsYWNlKCdAPGFccysoW14+XSspPkBlaScsICJ6ZW1fcHJibG9ja19yZXBsYWNlKFwiXFwxXCIsIFwiJHR5cGVcIikiLCAkb3V0KTsKfQoiO3M6NDoidHlwZSI7czoxOiIwIjtzOjU6Im9yZGVyIjtzOjE6IjUiO3M6MzoibWQ1IjtzOjMyOiI2M2Q2MDcyMjZjNjA1NGE4OGM1MDkxNGFmOTM2Mjk2ZiI7fQ==

Alex
tstate

Offline

#2 2005-01-18 23:49:01

ChrisJ
Member
From: Vienna, Austria
Registered: 2004-03-30
Posts: 54
Website

Re: [plugin] [ORPHAN] zem_prblock

I’m sure it works great (like all your plugins do), but – if someone prefers hacks – rel="nofollow" can be easy added to the visitor’s url by changing line 102 in publish/comment.php file to
$name = '<a href="http://'.$web.'" title="'.$web.'" rel="nofollow">'.$name.'</a>';

Offline

#3 2005-01-18 23:58:29

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_prblock

They can also put URLs in the comment text, remember.


Alex
tstate

Offline

#4 2005-01-19 00:36:16

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: [plugin] [ORPHAN] zem_prblock

You know… every time I sit down to implement some feature I want, you go and release a plug-in that does it.


You cooin’ with my bird?

Offline

#5 2005-01-19 01:03:24

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 322
Website

Re: [plugin] [ORPHAN] zem_prblock

As I mentioned on Zem’s site, something like this should be incorporated into Textpattern by default.

Offline

#6 2005-01-19 02:53:46

gonzo409
Member
From: Ohio
Registered: 2004-06-25
Posts: 50
Website

Re: [plugin] [ORPHAN] zem_prblock

I do suppose the overall support of this rel=“nofollow” attribute is better than nothing. Any word on how this effects validation?

Last edited by gonzo409 (2005-01-19 02:54:51)


Liberal. Geek.

Offline

#7 2005-01-19 03:00:20

Andrew
Plugin Author
From: California
Registered: 2004-02-23
Posts: 730
Website

Re: [plugin] [ORPHAN] zem_prblock

perfectly valid in both html & xhtml

Offline

#8 2005-01-19 03:01:38

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_prblock

rel is standard XHTML. target isn’t, which is why my site won’t validate.


Alex
tstate

Offline

#9 2005-01-19 03:21:05

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: [plugin] [ORPHAN] zem_prblock

It appears that google, yahoo and msn have announced support for nofollow
link

Offline

#10 2005-01-19 03:46:04

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] zem_prblock

Good.

Offline

Board footer

Powered by FluxBB