Basically what I was thinking was having the addon add a new field called "Related Keywords" and use those to select what keywords you want to use when determining relevant articles.
Basically we would have a new profile type, called a Related News profile, where you can select, in addition to the normal profile options (template, style, category filtering), you can also choose the fields to utilize, how many results to display, minimum word length (if using the word filtering stuff, because no keywords were entered during Submit News).
If no keywords are given during Submit News. simply filter out every word in the article longer than X characters (to be determined in the select Related News profile)
To serve up the results, a hacked viewnews.cgi will be used. Basically, the SQL query will be based upon the keywords entered for the item (or the word filtering code, if no words were entered)
You could call the relatednewssql.cgi like this (just a preliminary mockup):
- Code: Select all
http://www.site.com/relatednewssql.cgi?id=xxx&template=relatednewssql.tmpl
The addon could also be included via SSI and the like. The goal is to be easy to maintain, while being flexible and powerful.
All feedback and input welcome.