So far, this project consists of the two papers below, with development most likely beginning on Monday, June 18. The originals, Current Status of "Related Links" Modules and Best Related Links Plan can be found at http://www.openject.com/?q=node/30 and http://www.openject.com/?q=node/31 respectively. It is being sponsored by Co-op Tools for Ashoka.org with research and development by Openject Consulting.

  1. Current Status of "Related Links" Modules
  2. Best Related Links Plan

Current Status of "Related Links" Modules

Currently, several Drupal modules provide functionality for displaying related web links that are node specific. The Best Related Links project wishes to find or develop a module that will show these links in a block. Ideally, this module will meet the project's objectives.

As a step in that process, this report was written to investigate the pre-existing modules and provide research on them. We'd like to know what they to, how they work, their development status, and their popularity. For more information on the project and its goals, please have a look at the project's web page located at http://ashoka-dev.org/wiki/BestRelatedLinks.

This report also aims to be a tool for the community. Hopefully, it will provide information to others that have similar or related objectives, and allow for further research and development in this area. These questions have been raised before and discussed previously. Any feedback would be greatly appreciated.

The modules discussed in this paper are the following:

  1. Related Links
  2. Relationship
  3. Weblink
  4. Links Package, links_related module
  5. Keyword Links
  6. Link Attach
  7. Similar Entries
  8. Whatsrelated
  9. Node Relativity
  10. Janode
  1. Related Links (http://drupal.org/node/14267)
    Overview
    This module can create two different blocks. The first is called "Related links" which contains:
    • links that are manually added by the node's author
    • links that are automatically discovered and included from a node's content

    The second block, "Related terms", contains:

    • links to nodes that are in the same category (taxonomy) as the node in question

    Some preferences can be set in administer->related links. Each node type can enable/disable the functionality and each of the link types (parsed or manually added) can be enabled/disabled. There are no controls for the "Related terms" block.

    The basics required by Best Related Terms are covered. Missing options include relationship reporting, new windows for external links, prioritization controls, a new page for many links, locale support, caching (so far), and link checking.

    Design
    The interfaces and coding seem to fit nicely with the Drupal framework. The interfaces are intuitive and easy to find. Known issues:
    • The parsed links option parses unfiltered data. The current implementation is not yet PHP filter friendly.
    • As caching is not yet implemented, the taxonomy linking can be expensive on sites with many nodes.
    • It will only be maintained for 4.7+
    Maturity
    I've tested it on CVS, post 4.7, and it works for me. Technically speaking, there isn't a 4.7 release yet, but the maintainer asserts that there will be when 4.7 is released (which already happened). He plans to add the following, but probably not to 4.7:
    • Option to merge the two blocks together.
    • Option to limit the number of links displayed.
    • Option to specify a 'depth' feature for the related taxonomy nodes feature.
    • Caching support
    • Filter support

    The last update was April 19th. There is one outstanding bug at the time of this writing related to interaction with the "Path" module.

    Deployment
    I couldn't find any examples of this in action, but it worked on my testing site. It's also not very clear how many people are using it. The maintainer was e-mailed on May 24th about this, and he stated that there are no example sites yet.
  2. Relationship (http://drupal.org/node/40611)
    Overview
    This module makes use of ontologies, generally through the use of the RDF. There can be user defined methods for determining how nodes relate to one another. (e.g. from the documentation: "this page REFERS TO that page"). For a full discussion, The "generalized relationship module" discussion may be insightful.

    I also found a hacked up version of an older Related Links module in the author's documentation. It doesn't look like it's being maintained however, and it doesn't work with 4.7. Some of this code may have applications in the future, such as putting it back into Related Links from where it came.

    Design
    Very modular. There are additional modules that fit on top of the core module. These pluggable additions include a metadata module and several for ontology management. Some of these were designed for proof of concept.

    The package appears to be quite powerful and extensible, but may be overkill where implementors simply require basic relationships (e.g. parent, child, & sibling). In an instance such as this, it may make more sense to add the required functionality to the Related Links module than to implement Relationships. Even where custom ontologies are unnecessary, the complexity can be illustrated by mentioning that it actually takes three (3) modules to get relational linking up & running: relationship.module, metadata_blocks.module, and listblock.module.

    Maturity
    This project has been developed primarily for 4.6. The maintainer has checked in a barebones version for 4.7, but it is largely untested. Besides being away for a month, he is quite busy working on other projects, and when working on this one, it is for 4.6 client work.

    This writer was unable to get any functionality working in 4.7/CVS. As such, there can be no discussion on interface design within Drupal. The help section, however, provides necessary information on what to do where. The documentation in general, including the on-line help, is excellent. The concept is described in detail, and there are many examples. In fact, this contributed module is one of the best documented that I've seen.

    Deployment
    The author has a demo available, but it is almost certainly for 4.6. There are also some screenshots available. These provide some information on what it would actually look like.

    There appears to be a lot of interest in this project, as can be gathered from the discussion on version 4.7. The author plans to continue development if he gets funding, but if he doesn't it's reasonable to assume that the public interest will lead to future work in any case.

  3. Weblink (http://drupal.org/project/weblink)
    Overview
    This module enables creation of a new article type with an associated link. Clicks on these links are tracked, and web site monitoring is also possible. These features aren't terribly useful for the Best Related Links project.
    Design
    Weblink is deprecated in favour of the Links Package. In fact, it (Weblink) was completely rewritten for the new package.
    Maturity
    There is a 4.6 version, but the web page clearly states that, "This module is discontinued after CVS/HEAD. please use the modules in links bundle". The CVS timestamp is dated the same as 4.6.
    Deployment
    Some people are using it, or at least were, but the community is (or will be) migrating to the Links Package.
  4. Links Package, links_related.module (http://drupal.org/node/24719)
    Overview
    This package aims to be a "links management package" within Drupal. The base module "links.module" provides an API for globally managing internal and external links a part of a Drupal node. Features include link monitoring, dead link detection, and click tabulation. Two child modules are included.

    The links_related module allows for the addition of link field(s) to nodes. The number of fields can be controlled. Presently, the feature is either enabled or disabled, but further precision is planned.

    The links_weblink module is simply a rewrite of the Weblink module (see above) using the new API. It allows for a central repository of links that can be added and viewed.

    As for relevance to Best Related Links, links_related is somewhat useful in that any attached links could be any related links. The module can also supposedly display embedded links, but it didn't work for me. Unfortunately, the related links must be added manually, and can only be displayed at the bottom of the main content, not in a block. On the other hand, the Links API looks promising as it supports (or plans to support) features that we're looking for such as external link handling with new windows and link validation & monitoring.

    Design
    The design looks promising. The main module, links.module, exists purely to provide an API for others. The two provided extra modules are good examples of this. The API provides a lot of functionality. Categories include URL functions, text search and edit functions (for embedded links), URL hash functions (for speedy lookups), database functions, and link redirection functions. For more information, please see the API documentation.

    There has been some work done for interactivity with other modules. For example, Views support is in the works.

    Maturity
    From the README.txt:
    This module is under very active development, and is NOT yet ready for production release. At this time, it is considered to be ALPHA TEST quality.
    The user interface looks like it's mostly there, but there is some stub code (notably the links search functionality). I tried adding links, but got an error. There are still many unresolved issues.

    The plan was to release something with 4.7, but that didn't happen. The web page says that the code base is being changed constantly, but there hasn't been anything checked in (as of May 26th) in about a month.

    Deployment
    There appears to be lots of interest in this project as features keep coming into the issue cue. So far, the cue consists of two pages, and there is a lot of discussion. I doubt that this is being used anywhere for production. I couldn't find any examples, and the maintainer cautioned strongly against this.
  5. Keyword Links (http://drupal.org/node/13717)
    Overview
    This module allows nodes to be linked by keywords. The content of each node contains a linked list of other nodes with the same keywords, sorted by relevance. This functionality has been superseded by free tagging support in Drupal 4.7.

    There are some minor features that aren't covered by the Drupal's free tagging system:

    • Pictures can be associated with tags
    • Tags within nodes may be designated as source or target only

    The linked list would be useful if it were in a block. As it's not, neither this feature nor this module is something that we're looking for.

    Design
    Keyword Links is a small module, and appears to be using the standard module API. No future plans could be found, and there's no mention of it working with anything else.
    Maturity
    Work was stopped in 4.6, and there is no on-going development. If it works, then it would only be in 4.6, but this has not be tested. The projects appears to be dead. There is no issue cue.
    Deployment
    There is virtually no mention of this module at all. All that could be found was one record of someone having a problem with it, but then this person stopped using it altogether.
  6. Link Attach (http://drupal.org/node/24877)
    Overview
    This module "allows you to attach links from the weblink module to arbitrary nodes, and display them along with the node". It requires Weblink which has been deprecated in favour of links_related in the Links Package. It's not clear what new functionality is added above Weblink. The description offers no explanation as to how the module is different.
    Design
    The documentation is basically non-existent. The above quotation was found in the code for the help section, and no other useful comments/documentation are available. This documentation conflicts with what's written on the web page: "A module that allows you to attach weblinks to other modules." Is the author talking about nodes or modules?

    It is a small module, only 103 lines of code. I'm not really sure how it works as I didn't have a means by which to test it.

    Maturity
    The module is quite dated. The last CVS check-in was in July of 2005. There is obviously no 4.7 version. There is also no issue cue, and nothing indicates that any more work on this well ever be done. It's supposed to be available for 4.6, but there is some evidence that the code doesn't even work for that release.
    Deployment
    The "Try out a demonstration" link on the web page is to a live site, http://www.gamerswithjobs.com/, but there's nothing explaining what part of the site uses Link Attach, or how to access it. The above evidence was all that could be found about other implementations.
  7. Similar Entries (http://drupal.org/node/25974)
    Overview
    From the web site: A module that displays a block with the most similar nodes to the currently viewed one, based on the title and body fields.
    Teasers can be listed with the links as well.

    The functionality provided here is one of the objectives of Best Related Links. I haven't yet found it to be part of any other module researched.

    Design
    The in-line documentation is good.

    There are quite a few controls to configure: Teasers can be enabled or disabled within the listing, taxonomy filtering can be set up, and node types can be set/unset. The number of related links can also be selected. The default is 5 (even though the documentation says 10), but there can be up to 100. I really like how all of the configuration is done in one place, the administer blocks section. Some modules have this split over various pages, and controls can be hard to find.

    The module works by comparing title and body elements of nodes. As expected, better matches are listed first.

    Maturity
    The 4.7 version installs without any problems. There are not many bug reports; it appears to be stable. It looks as though the maintainer is continuing to update the module as time goes on.

    Strangely, however, I couldn't get the block to show up after configuring and enabling it. I even created two page nodes with identical titles and bodies. If anyone have any ideas as to why this is happening, please let me know. I'd very much like to get this block working in 4.7.

    Deployment
    Based on the issue cue and other references on the web, people are using Similer Entries. For example, someone discusses its use on this page. It is also mentioned in the Drupal showcase along with a live example.
  8. Whatsrelated (http://drupal.org/node/24307)
    Overview
    With this module, it's possible to associate internal or external links with specific nodes. These links must be edited manually; there is no automatic creation. The package is therefore quite similar to other modules of this type. However, the attached links are actually nodes themselves.
    Design
    Whatsrelated is based on the node-example module so it follows that design. The code is easy to read, and there are descriptive function headers.

    Surprisingly, the module doesn't seem to come with a standard way to view the associated links. This is left up to the implementors. As an example of how to do this, the author has included a PHP file. There is a caveat in the README:
    Batteries not included, some assembly required. Right now I'm using this by displaying related links through an addition to "node.tpl.php" in a phptemplate theme.

    Maturity
    The module was released for 4.6, but not 4.7. The author has stated that he no longer has any use for it, but will allow others to improve it. Someone submitted a 4.7 patch, but it is currently broken.
    Deployment
    In the Drupal support forum, someone thought that is was confusing and dropped it. The maintainer has a live example of it as the footer of this site.
  9. Node Relativity (http://drupal.org/node/17004)
    Overview
    Node Relativity introduces parent-child relationships between nodes. The description on the web site is helpful so I'll post it here: "This tool allows parent-child relationships between nodes to be established, managed and searched. You can restrict the types of nodes that can be parented and the ordinality of parents. These are used to contextually create links to add new child nodes or attach existing ones. There is also a navigation block that uses a nodes ancestry to list out breadcrumb-style links. Some work is still required on my part for searching through large result sets, but this is a first stab at getting this module working. Several user interface pieces still need work, but it is functional for the most part. The only substantial feature that is missing is the connected-node search page (though the underlying API exists)."

    The node relationship functionality along with the navigation block would be useful for Best Related Links.

    Design
    An article states that the module is "not an easy module to figure out". I agree with this comment as I couldn't get it working myself. I tried simplifying an example case (see below), and couldn't understand how the actions made sense conceptually; they didn't seem intuitive at all.
    Maturity
    The package is available for 4.6 and 4.7. The 4.7 release seems to have been buggy. The last update was within the last month. Most issues should be cleared up soon as there seems to be on-going support.
    Deployment
    Some example steps for using the module (in the real world) are available in the README file. I wasn't able to spend the time installing and configuring all of the required modules in this example, but I did try to impose parent-child relationships on several page nodes. I couldn't find any way to specify the parents or children of these nodes. I thought that perhaps it worked through the taxonomy system, but even that method didn't show a node's relationships when the node was displayed.

    A live version can be found at http://www.alpinecountyca.com/ with an explanation in this comment. It is being used for a project discussed here, and was mentioned at the Vancouver Drupal Conference in February.

  10. Janode (http://drupal.org/node/65206)
    Overview
    This module creates a new node type, Jan's node, that holds link information. The information consists of the URL itself, a title, and a description. Because standard node functionality is available, taxonomy terms can be used to create lists of Janodes. You can therefore build your own web directory.
    Design
    Janode uses the node API. There are some settings in administer->settings->janode. It's all very easy to use. I had no difficulty implementing it: Access control settings are under administer->access control and a node can be created with the "create content" link.
    Maturity
    The module is quite young, and is still in development (even though there is a 4.7 branch). The author is constantly adding to it. It sounds like he'll probably port it to the Links Package at some point.
    Deployment
    There are many people posting feature requests and bugs to the issue cue. Therefore, it seems to be quite popular. I looked around and couldn't find any live sites that are using it though.

In conclusion, some of these modules will be beneficial to the project while others will not. Any plan on how to proceed will likely involve taking pre-existing features of some of these packages and combining them with others. Significant development work will probably be required as well.

Best Related Links Plan

Table of Contents

Introduction
Link Types
Other Features
Future Plans (Links Package Port)
Priorities

Introduction

This is the plan for the Best Related Links project. It is based on research from the Current Status of "Related Links" Modules paper. We'll start with the Related Links module as a base. It already satisfies several of the draft requirements:

  • It works in Drupal 4.7
  • It supports taxonomy links, body links, and manual links (including externals)

Link Types

Extended link type functionality will be added to the module. As mentioned above, taxonomy, body, and manual links are already supported. New link types will include back links, relationship links, and similarity links.

Body Links
Body Links are already supported. However, a new option will allow for the removal of duplicates from the related links listing.
Back Links
This link type pertains to all links that are discovered when an editor adds manual links to a node. The destination node will then have a back link to the originating node. For example, if node A links to node C, and node B also links to node C, then node C will have two (2) back links. One will be node A, and the other will be node B.

In order to implement this sort of functionality with external links, it will be necessary for sites to have some kind of XML feed/subscription similar to RSS. (If a node on site A links to site B, and site B is subscribed to site A, then the node on site B will automatically link back to the node on site A.)

Similarity Links
These links are based on content comparisons of nodes. Node titles and bodies will be compared. Nodes with similar content will have a higher match rating in this category, and are considered more “similar”. For example, if nodes A and B discuss tweedle glomping extensively, then they will “float up” in each other's similarity links listing. If node C discusses tweedle glomping only briefly, it will show farther down in the list. Node D, with no mention of tweedle glomping, won't show up at all.

This functionality already exists in the Similar Entries module. We hope to take code from it, and implant it into the new Related Links.

Relationship Links
Relationship links are based on any relationship that exists between nodes. These can include parent/child/sibling relationships such as those defined in the Relativity module and RDF relationships such as those defined in the Relationship module. There are no immediate plans to add support for these sorts of links, but it may be supported in the future as relationship-style modules become more mature. When the support is added, it will only be available if these other modules are installed.

Therefore, all possible link types (currently) are:

  • body
  • back
  • manual
  • taxonomy
  • relationship
  • similarity

Each supported type can be either enabled, disabled, or greyed out if unavailable. There will also be fields to set the maximum number of displayed links for each and to prioritize them by “weight”. (The weight consists of an integer. Lower integer valued items will be considered “lighter” and will “float up”.)

Other Features

  • Contextualization: There will be a subtitle for each subsection of link types.
  • Full Page View: If more than the maximum number of related links is available, a link is provided to view all related links in a new window.
  • Localization/Internationalization: There will be support for preferred translations and languages in combination with locale.module and il8n.module.
  • Caching: This will reduce server processing.
  • Versions: The module will work with Drupal 4.7+
  • Finite Listing: A maximum number of links to be displayed in the block can be set.

Future Plans (Links Package Port)

Future support for node relationships has been covered. In this section we'll discuss the Links Package, and why/how we plan on making use of it.

The Links Package is still under active development. We have therefore decided to wait until such time as the module is more stable, ready for a production release, before building on its API.

In any case, the package is seen by many to be the definitive means by which to manage links in Drupal. Its functionality satisfies several requirements for the Best Related Links project:

External Linking
The process of the browser visiting links can be trapped with the link redirection functions. This allows for outbound click tracking and the presentation of “you are leaving this web site” type messages or legal disclaimers. New windows can be opened. (Note: There is some debate about whether this is good practise from a UI perspective. See the discussion at http://drupal.org/node/65296.)
Link Popularity
Related links can be listed in order of popularity with the aid of the package's click tracking functionality. Unpopular links can be pruned.
Link Checking
Editors will want to be notified of broken links. This can be accomplished with the API's link monitoring. The concept is that of scanning links at set time intervals. Notifications can be sent when pages have moved, disappeared, or changed.
Click Tabulation
Because click tracking is supported, tabulating clicks would be straightforward.

Priorities

Our priorities for this project, in order of importance (and implementation), are as follows:

  1. link types framework
  2. link contextualization
  3. support for back links
  4. support for similarity links
  5. option to remove duplicate body links
  6. option to set maximum displayable links
  7. full page view
  8. localization/internationalization
  9. caching
  10. support for external back links
  11. port to Links Package
  12. support for relationship links

Comments

bonobo’s picture

Check out the userlink module as well --

We'll be getting it to drupal.org soon, but you can download it here in the meantime --

If there's code in there that can help move your project along, grab what works and leave the rest :)

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

mwu’s picture

This is a great project. Is there an estimated finish date?

colan’s picture

Not yet. I was hoping to be working on it by now, but it looks like I've got some other projects to finish first. Hopefully within the next week or two I'll be able to start getting into it. I'll be patching Related Links by posting to the issue cue. Please check there for updates.

Thanks for the feedback & interest! ;)

colan’s picture

The most recent patches are now available at http://drupal.org/node/74489. Try the most recent one and let me know how it works.

mwu’s picture

with latest version
I can't see the block,
although I've enabled the block
and enabled it for type book.

thank you for working on this.

TomArah’s picture

An intelligent controllable listing of related nodes sounds ideal - and something that most Drupal authors and their users would benefit from.

Any further developments?

colan’s picture

Yes! I just posted the latest edition of what I've been working on. Sorry about it taking so long, but I was working on some higher priority issues for a while, and then I was on vacation. With the posting, I've included a new feature list. Please have a look.

Here is a general to do list, in no particular order:

  • Split the DB column "link" into "path" and "name" to avoid tricky regexes.
  • Look into intermodule issues. There are some reports that Related Links doesn't work well with Book or Path.
  • Review alternate/extra sorting methods for Taxonomy links as described at http://drupal.org/node/75028.
  • Reevaluate the priorities listed above. Items 1, 2, 5, and 6 are done while items 3, 4, 7 -> 12 remain.

Thoughts are always welcome!

colan’s picture

I tried it and it works for me. Do you have any further details? Specific link types, etc.?

sanjulian’s picture

I have running a modified version of weblinks module running in 4.7 at http://www.ovallito.cl/enlaces

Modifications were made according instructions published at http://drupal.org/node/22218

The modified version is available here: http://www.ovallito.cl/descargas/docs/weblink.zip

doc2@drupalfr.org’s picture

VERY USEFUL POST INDEED! Even for Drupal 5.x

YET, Drupal 5.x knows a module that could help many people and deserve to be quoted here. It's called relevant_content and allows to display related nodes PER NODE TYPE, according to taxonomy similarities.

http://drupal.org/project/relevant_content

geoline’s picture

Thanks for this very usefull overview, it is a great article

Summit’s picture

Hi,

Is the links_package stable enough (version 1.8) for you to implement this into?
I think so, but am not a expert.
Please respond.
Thanks in advance!
greetings,
Martijn

colan’s picture

I'm not sure. This project got dropped a while ago, so it never got to the later stages. In fact, it's been a long time since I've even thought about it. If any of you would like to take this on, please do; I'm no longer working on it, and probably won't be in the future.