| 1 |
# freelinking.module -- a freelinking filter for Drupal
|
| 2 |
---
|
| 3 |
|
| 4 |
by [ea. Farris] [1], with portions adapted from work done by Christopher
|
| 5 |
Whipple on his [wiki.module] [2].
|
| 6 |
|
| 7 |
## What it does
|
| 8 |
|
| 9 |
freelinking.module allows content authors to link to other pieces of
|
| 10 |
content (ie., nodes) in the Drupal site easily, using CamelCase words
|
| 11 |
and freelinking delimiters, currently defined as double-square brackets
|
| 12 |
( [[ and ]] ).
|
| 13 |
|
| 14 |
When enabled, the freelinking filter searches the body of nodes looking
|
| 15 |
for "CamelCase" style words (words that begin with a capital letter and
|
| 16 |
have one or more capitalized words run together) and words or phrases
|
| 17 |
enclosed in double-square brackets [[like this]]. These words become
|
| 18 |
clickable to a node with the words as the title. If no node so titled
|
| 19 |
exists, the link will attempt to create the node and present the user
|
| 20 |
with the node creation form, with the title already filled in.
|
| 21 |
|
| 22 |
In addition to these simple linking styles, freelinking.module also
|
| 23 |
supports an expanded syntax using the double-square bracket method.
|
| 24 |
Freelinks containing a bar (or pipe, '|') will link different text to
|
| 25 |
the target. For example, [[this is what's shown|this is the target]]
|
| 26 |
will link the text "this is what's shown" to content titled "this is the
|
| 27 |
target," or, if that doesn't exist, the create content page will be
|
| 28 |
shown with "this is the target" as the title.
|
| 29 |
|
| 30 |
Freelinks within double-square brackets can also contain URLs that begin
|
| 31 |
with http://. So links like this [[Drupal Web Site|http://www.drupal.org]]
|
| 32 |
are acceptable, as is [[http://www.drupal.org]], which will show the URL
|
| 33 |
in the body and link it.
|
| 34 |
|
| 35 |
## Installation and activation
|
| 36 |
|
| 37 |
For installation instrutions, and for information on how to activate
|
| 38 |
this module, see INSTALL.txt
|
| 39 |
|
| 40 |
## Configuration
|
| 41 |
|
| 42 |
Currently, freelinking.module supports the following configuration
|
| 43 |
options:
|
| 44 |
|
| 45 |
- What kind of node will the filter attempt to create if a target node
|
| 46 |
was not found? This can be any node type. A simple flexinode with
|
| 47 |
title and body, that is editable by anyone, could turn Drupal into a
|
| 48 |
wiki. Defaults to 'blog.'
|
| 49 |
|
| 50 |
- What kind of node will be searched for, when looking up a title? This
|
| 51 |
should be the same as the creation node type, above, or new
|
| 52 |
freelinking-created content won't ever be found. Defaults to 'no
|
| 53 |
restrictions,' meaning all content types are eligible to be the target
|
| 54 |
of a freelink.
|
| 55 |
|
| 56 |
- If you don't want to turn CamelCase words into links, you can turn
|
| 57 |
that off. It defaults to on.
|
| 58 |
|
| 59 |
Other options planned, but not yet implemented, include:
|
| 60 |
|
| 61 |
- Flexible delimiters for phrases. Double-square brackets are used by
|
| 62 |
the interwiki.module [3], so this filter should give some choice as to
|
| 63 |
what will be used as the freelinking delimiters.
|
| 64 |
- Restrict freelinking to nodes created by the same user. For example,
|
| 65 |
Author1 writing a blog entry with freelinks should expect his links to
|
| 66 |
resolve to other content by him, and not just any content on the site.
|
| 67 |
This would give multi-authored sites into several private wikis, each
|
| 68 |
linking only to his or her own content.
|
| 69 |
|
| 70 |
## "freelinks" menu option
|
| 71 |
|
| 72 |
When the freelinking.module is activated, a "freelinks" menu choice
|
| 73 |
appears on the navigation menu. Clicking this brings up a page showing
|
| 74 |
all the freelinks currently indexed in the Drupal site, along with a
|
| 75 |
link to either "view this content" or "create this content." With this
|
| 76 |
page, users can find content that is the target of a link, but doesn't
|
| 77 |
yet exist, "filling in the gaps," so to speak. This feature came about
|
| 78 |
because of a feature request at http://drupal.org/node/20405 .
|
| 79 |
|
| 80 |
---
|
| 81 |
References
|
| 82 |
|
| 83 |
[1] : mailto:eafarris@gmail.com
|
| 84 |
[2] : http://ninjafish.org/project/wiki
|
| 85 |
[3] : http://drupal.org/project/interwiki
|
| 86 |
|
| 87 |
---
|
| 88 |
freelinking.module by ea.Farris <eafarris@gmail.com>
|
| 89 |
$Id: README.txt,v 1.2 2005/04/28 01:16:16 eafarris Exp $
|