A number of ready-to-use filters are included in the Freelinking framework (e.g. Nodetitle. Nid, User, Google search, Drupal search, Drupal projects, Wikipedia, etc.). This help file describes the purpose of the included filters and how to use them.
The Freelinking link format is:
[[indicator:target|title|tooltip|arg1|arg2|…]]
Everything except the target is optional. If you do not specify an indicator the default configured for the text format will be used. See the page Administration » Configuration » Content authoring » Text formats and editors.
The indicator is used to select which filter to use.
There are three built-in filters (Nowiki, Showtext, Redact) These filters will not generate links. In addition to these, the project includes a small set of optional plugin filters, which you may enable specifically on a text format as desired.
Below is an overview of all the filters which are included in the project:
This filter will strip the nowiki-indicator and will preserve the rest of the text, including the double brackets, verbatim.
Example:
[[nowiki:this is not a freelink]]
becomes:
[[this is not a freelink]]
This filter is similar to the Nowiki filter, however, will also strip double brackets before showing the text.
Example:
[[showtext:this is not a freelink]]
becomes:
this is not a freelink
This filter works like the Showtext filter for logged in users, however, will redact/conceal marked up content from the page before showing the text to the anonymous user.
Example:
[[redact:sensitive stuff]]
becomes:
sensitive stuff
for logged in users, and
******
for anonymous users.
The Node title plugin allows users to create links based on the title of a node. You may restrict the plugin to a subset of content types, but by default all node types are allowed. Note that users without access to the node will be unable to see the link.
Example:
[[nodetitle:First page]]
becomes:
<a class="freelink freelink-nodetitle freelink-internal" title="Click to view a local node." href="/node/1">test</a>
This plugin also introduces the concept of a “fallback”. A fallback is an option that will be used when the target cannot be found. A fallback may also be to use a different plugin. The following options are allowed to be used as fallbacks for the Node title plugin:
Allows to link to a node for when a user knows the node entity id.
Example:
[[nid:2]]
becomes:
<a class="freelink freelink-nid freelink-internal" title="Click to view a local node." href="/node/2">First page</a>
Allows to link to a user by user entity id.
Example:
[[user:1]]
becomes:
<a class="freelink freelink-user freelink-internal" title="Click to view a user profile." href="/user/1">admin</a>
Example:
[[user:admin]]
becomes:
<a class="freelink freelink-user freelink-internal" title="Click to view a user profile." href="/user/1">admin</a>
Allows directly linking to a path by a relative path.
Example:
[[path:/breaking-news]]
becomes:
<a class="freelink freelink-path freelink-internal" title="Click to view a local node." href="/breaking-news">Breaking news</a>
Allows linking to a file by file name. The plugin must be configured with the file system scheme to use e.g. public or private.
Example:
[[file:logo.png]]
becomes:
<a class="freelink freelink-file freelink-internal" title="Click to view a local file." href="http://
freelinking_search.inc
Example:
[[search:test]]
becomes:
<a class="freelink freelink-search freelink-internal" title="Search this site for contents like “test”." href="/search/node/test">test</a>
Allows linking to an external page by absolute url.
Example:
[[https://groups.drupal.org/frontpage]]
becomes:
<a class="freelink freelink-external" title="Click to visit an external secure URL." href="https://groups.drupal.org/frontpage">https://groups.drupal.org/frontpage</a>
You may configure Freelinking to poll the URL for title and availability, but this may lead to slow page loads.
Example:
[[google:drupal]]
becomes:
<a class="freelink freelink-google freelink-external" title="Search Google for contents like “drupal”." href="http://www.google.com/search?q=drupal&hl=en">Google Search "drupal"</a>
Use the short name of the project as the target. You may configure Freelinking to poll the URL for title and availability, but this may lead to slow page loads.
Example:
[[drupalproject:freelinking]]
becomes:
<a class="freelink freelink-drupalproject freelink-external" title="Click to view project Drupal.org." href="http://drupal.org/project/freelinking">Drupal.org: “freelinking”</a>
Use the Drupal.org nid as the the target. You may configure Freelinking to poll the URL for title and availability, but this may lead to slow page loads.
Example:
[[drupalorg:1]]
becomes:
<a class="freelink freelink-drupalorgnid freelink-external" title="Click to view node on Drupal.org." href="http://drupal.org/node/1">Drupal.org: “#1”</a>
The indicators supported by this plugin are: wikibooks, wikipedia, wikinews, wikiquote, wikisource and wiktionary.
Example:
[[wikipedia:Main Page]]
becomes:
<a class="freelink freelink-wikipedia freelink-external" title="Click to visit a wikipedia page." href="http://en.wikipedia.org/wiki/Main_Page">Main_Page</a>