Related Posts

Creating and modifying plugins.
Post Reply
zafiro17
Regular
Posts: 5
Joined: Wed May 23, 2012 1:44 pm
Contact:

Related Posts

Post by zafiro17 » Sun Oct 27, 2013 4:43 pm

I'm looking for a way to show, on the sidebar, a list of related posts. Ideally, it would just show the list of other articles from within the current article's category. I don't see any obvious way to do this, and it seems like an obvious gap in Serendipity's plugin catalog.

Is there an easy fix I'm not seeing?

I should mention, I see there is an event plguin that does something similar, but it requires manually listing the relevant URLs and their titles. This is better nothing, but not good enough. It seems like the easiest way is just to show on the sidebar a list of other article titles from the same category: this would take one single call to the database to produce.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Related Posts

Post by Timbalu » Sun Oct 27, 2013 5:38 pm

If serendipity_plugin_recententries or serendipity_plugin_showentries (in Sidebar Plugins) are not doing what you want, you might also go the smarty way and use {serendipity_fetchPrintEntries}, details here: http://www.s9y.org/78.html#A2
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

zafiro17
Regular
Posts: 5
Joined: Wed May 23, 2012 1:44 pm
Contact:

Re: Related Posts

Post by zafiro17 » Mon Oct 28, 2013 5:11 pm

Thanks, that helps.

serendipity_plugin_recententries is about 90% of what I was hoping for. What does not seem to exist is a plugin that permits you to add keywords to an entry and then shows a list of related entries based on keywords.

Example: let's say my categories are Intel, SPARC, ARM, RISC, but as I'm typing in an entry, in the extended characteristics I can add keyword "boot sequence" for example and then in the sidebar, any article from any category whose metadata included that keyword would be listed.

I'll leave this post up for a while and see if anyone else is interested in such a thing, and if there's interest maybe it would be worth funding a developer to bring it to life. Seems like not too much work, since the serendipity_plugin_recententries code is already available and provides a good basis for the new code.

User avatar
onli
Regular
Posts: 2231
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Related Posts

Post by onli » Mon Oct 28, 2013 6:29 pm

There is the serendipity_event_freetag-plugin, which does exactly that :-) Though i'm not sure how easy it is to use the sidebar, by default the area below the entry is used.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Related Posts

Post by Timbalu » Mon Oct 28, 2013 6:38 pm

Ups, why did kybernator purge his answer, saying exactly this?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
kybernator
Regular
Posts: 126
Joined: Sat Sep 22, 2012 10:15 pm

Re: Related Posts

Post by kybernator » Mon Oct 28, 2013 11:46 pm

Timbalu wrote:Ups, why did kybernator purge his answer, saying exactly this?
Because he suddenly felt shy and stupid recommending a plugin he doesn't yet use himself, and which gives (as far as he understands) a tag cloud, but not the list that was asked for :oops:

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Related Posts

Post by Timbalu » Tue Oct 29, 2013 1:29 pm

;-)
no need for shyness!
Supporting asked questions is always more or less an educated (sophisticated) guess! :)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply