NP_Related.php

The NP_Related plugin can show related items (from your weblog/Nucleus site), related webpages (found by Google), related products (from the Amazon.com catalog) next to your items/articles.

What does it do?

NP_Related effectively uses the words in the title of an item/article as keywords, and uses these to search for similar items/websites/products.

If you place <%Related(local)%> in the Item Body of a template (e.g. your detailed template) then when a blog entry is rendered in a web browser then the entry will contain a list of other blog entries that contain the same words as the title of this blog entry in their body text. So for example, if the current blog entry has the title “is this related” then any other blog entries that contain the text “is this related” in their body text will be listed as related. As mentioned earlier, the title is actually considered to be the entry keywords for the purposes of identifying related entries, and this can be changed. I understand that <%Related(google)%> refers to related web pages courtesy of Google and <%Related(amazon)%> refers to related items for sale at Amazon. e.g. if I have a blog entry called “Gone With The Wind” then <%Related(google)%> will find other web pages about “Gone With The Wind” and <%Related(amazon)%> will find the book and the film on Amazon. I don't use these myself so that's the extent of my knowledge.

Download

VERSION 1

Please follow this forum thread for original version!

VERSION 2

Radek Hulan made some small changes to original code, here is an alternate download:

Download at: http://hulan.info/blog/other/NP_Related.zip

His changes:

  • all google queries are done in UTF-8 to support national characters
  • all query results are converted from UTF-8 to default blog char encoding before being displayed
  • changes in handling of keywords, there were some problems with special characters a mssql query
  • added option to show snippet as well (short link description), default set to true, if set to false, snippet is shown as well, but as a link title
  • possibility to enter keyword DONOTSEARCH for every article which will switch-off searching (local or google)
  • added option for showing “Local results” headline and “Google results” headline, while this will be displayed ONLY if some results are found
  • added option for google languages specification (lang_en|lang_de, etc.)
  • optimized table structure
  • if there are NO RESULTS for Google search, a new row in inserted anyway into _related_cache table with url='NONE', this prevents searching for google results everytime the article is viewed, now, correctly, the search is done every x-hours
  • new CSS class called .snippet{} is used for displaying snippet
  • localsearch does not show current article anymore
  • NO CHANGES to Amazon as I do NOT use it though..

VERSION 3

I've slightly modify original version 0.25.1 contributed by Tim Broddin.

Changelog: Version 0.25.2 by Jiri Kratochvil (based on 0.25.1)

  • remove dependency on nusoap library, now it use native PHP (5.x) suport for SOAP
  • comment out support for amazoon (too lazy check relevant code :)
  • remove modification of admin templates, instead, it use events 'AddItemFormExtras', 'EditItemFormExtras' (It is inspirated by works of Radek HULAN)

I've do it because on my free hosting there is limit for memory usage per script. With original plugin it was going to crash. Thanks to this modification now it works correcty for me.

You can Download it there: http://kl0k.net/media/1/20051102-NP_Related.zip

related.txt · Last modified: 2006/07/05 13:03 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki