Related Entries Plugin
Posted: Thu May 13, 2010 8:04 pm
Hi,
I have seen a number of blogs where a related articles section was below every entry. As far as I found out there is nothing similar for Serendipity. So here is the first release of a plugin I wrote.
The plugin uses the tags created by the freetags plugin to connect articles to each other. If two articles have common tags then they classify as related. So if you publish an article tagged as 'Foo' and 'Bar' then other entries with either the tag 'Foo' or 'Bar' are candidates to be shown in the list. Entries that have the tags 'Foo' and 'Bar' are even more likely to be shown. The is a configuration option to limit the number of links to show.
I thought about using the entry category as well but haven't implemented that yet.
A word of caution: this is the first time I created a plugin, so I'm not sure if this is working in all cases. Especially the way the plugin generates the output (by adding code to $eventData['display_dat']) might not be the proper way. I wanted to have the output between the entry and trackbacks/comments and this gave the best results. I'm using a custom template so there might be issues with the template as well.
Download: serendipity_event_related.zip
Comments and fixes by s9y hackers welcome!
Regards,
Stefan
I have seen a number of blogs where a related articles section was below every entry. As far as I found out there is nothing similar for Serendipity. So here is the first release of a plugin I wrote.
The plugin uses the tags created by the freetags plugin to connect articles to each other. If two articles have common tags then they classify as related. So if you publish an article tagged as 'Foo' and 'Bar' then other entries with either the tag 'Foo' or 'Bar' are candidates to be shown in the list. Entries that have the tags 'Foo' and 'Bar' are even more likely to be shown. The is a configuration option to limit the number of links to show.
I thought about using the entry category as well but haven't implemented that yet.
A word of caution: this is the first time I created a plugin, so I'm not sure if this is working in all cases. Especially the way the plugin generates the output (by adding code to $eventData['display_dat']) might not be the proper way. I wanted to have the output between the entry and trackbacks/comments and this gave the best results. I'm using a custom template so there might be issues with the template as well.
Download: serendipity_event_related.zip
Comments and fixes by s9y hackers welcome!
Regards,
Stefan