| 1 |
javanaut |
1.3 |
$Id: README.txt,v 1.2 2004/10/23 19:46:52 javanaut Exp $
|
| 2 |
|
|
|
| 3 |
|
|
The attached_node module allows users to include a representation of a node within
|
| 4 |
|
|
the body of another node. The content of a node can thus be embedded within a
|
| 5 |
|
|
Drupal page, or within a blog post, or with a box or DIV or any other HTML
|
| 6 |
|
|
statement. The format of the representation of the embedded node depends on
|
| 7 |
|
|
stylesheet settings (see the attached_node class in
|
| 8 |
|
|
modules/attached_node/attached_node.css).
|
| 9 |
|
|
|
| 10 |
|
|
A common use of this module is to embed image nodes within other HTML content. If
|
| 11 |
|
|
you have the image.module installed and properly configured this module is able to
|
| 12 |
|
|
display inline images with any node content.
|
| 13 |
javanaut |
1.2 |
|
| 14 |
|
|
|
| 15 |
|
|
|
| 16 |
|
|
INSTALLATION
|
| 17 |
|
|
|
| 18 |
javanaut |
1.3 |
1. Unpack the attached_node distribution into the modules directory.
|
| 19 |
javanaut |
1.2 |
|
| 20 |
javanaut |
1.3 |
2. Enable the attached_node module in the administer --> modules page
|
| 21 |
javanaut |
1.2 |
of the admin section.
|
| 22 |
|
|
|
| 23 |
javanaut |
1.3 |
3. Once enabled, there will be new option within the "input formats" area of the
|
| 24 |
|
|
"administer" area of Drupal. To get to it, go "input formats" (admin/filters), and
|
| 25 |
|
|
then click on the first "Configure" link, under "permissions and settings". This is
|
| 26 |
|
|
the configure link for "filtered HTML".
|
| 27 |
|
|
|
| 28 |
|
|
Within this page (admin/filters/1), be sure that the box for "Attached Node Filter -
|
| 29 |
|
|
Allows you to create meta tags that link to other nodes" is checked off. Then click
|
| 30 |
|
|
the "Save configuration" button.
|
| 31 |
|
|
|
| 32 |
|
|
Alternatively, you can pick whichever filter you want (not just "Filtered HTML") to
|
| 33 |
|
|
add attached_node functionality to.
|
| 34 |
|
|
|
| 35 |
|
|
|
| 36 |
|
|
WHAT IT DOES
|
| 37 |
|
|
|
| 38 |
|
|
Once you have enabled the attached node filter as described above, you (or any user
|
| 39 |
|
|
who can post) can add an embedded reference to any page using the syntax:
|
| 40 |
javanaut |
1.2 |
|
| 41 |
javanaut |
1.3 |
[node:##]
|
| 42 |
javanaut |
1.2 |
|
| 43 |
javanaut |
1.3 |
To do this, the page/node must be using "Filtered HTML" as its input format. That
|
| 44 |
|
|
can be set as the default, or it can be turned on a node by node basis.
|
| 45 |
|
|
|
| 46 |
|
|
|
| 47 |
|
|
|
| 48 |
|
|
ADVANCED CONFIGURATION/USAGE
|
| 49 |
javanaut |
1.2 |
|
| 50 |
|
|
If you want your users to be able to configure how the nodes are rendered, you
|
| 51 |
javanaut |
1.3 |
can click on the "configure filters" tab of the same "Filtered HTML" filter.
|
| 52 |
|
|
Here, in the "Attached Nodes codes" section, you can specify node properties
|
| 53 |
|
|
that users are allowed to override. A common thing to override is the "title"
|
| 54 |
|
|
property.
|
| 55 |
javanaut |
1.2 |
|
| 56 |
|
|
There is one exception to this, and that is for image nodes. There is a parameter
|
| 57 |
|
|
named "res" that users set to specify the resolution of the image to display.
|
| 58 |
|
|
This has to match one of the pre-rendered resolutions configured on the image
|
| 59 |
|
|
admin page.
|
| 60 |
|
|
|
| 61 |
|
|
Click on the "rearrange filters" tab to set the order in which filters are
|
| 62 |
|
|
applied. Since the Attached Node filter outputs HTML with line breaks and other
|
| 63 |
|
|
things, you'll probably want this filter to be the last one applied to the output.
|
| 64 |
|
|
If, for instance, the HTML filter is run after the Attached Node filter, then
|
| 65 |
|
|
much of the output could be rearranged or removed. Just give it a large (heavy)
|
| 66 |
|
|
weight. The default is 10, which should send it to the bottom of the
|
| 67 |
|
|
list (where it belongs).
|
| 68 |
|
|
|
| 69 |
|
|
|
| 70 |
javanaut |
1.3 |
ADVANCED USAGE
|
| 71 |
javanaut |
1.2 |
|
| 72 |
|
|
The tag format is fairly simple. The most basic tag would be in the following form:
|
| 73 |
|
|
|
| 74 |
|
|
[node:<node id>]
|
| 75 |
|
|
|
| 76 |
|
|
Parameters follow the <node id> part and are comma separated name="value" pairs:
|
| 77 |
|
|
|
| 78 |
|
|
[node:123,res="640x480"]
|
| 79 |
|
|
[node:123,res="original",title="Original version of the picture"]
|
| 80 |
|
|
|
| 81 |
|
|
Note that the values must be encased in double quotes. This is to allow users
|
| 82 |
|
|
to include commas in the value. The side effect is that double quotes cannot
|
| 83 |
|
|
be used (currently) without causing problems.
|
| 84 |
javanaut |
1.3 |
|
| 85 |
|
|
Thanks to:
|
| 86 |
|
|
Rich Cowan for documentation suggestions and contributions.
|
| 87 |
|
|
|
| 88 |
javanaut |
1.2 |
|
| 89 |
|
|
Questions/comments/etc:
|
| 90 |
|
|
mark@nullcraft.org
|
| 91 |
|
|
|
| 92 |
|
|
Mark Howell
|
| 93 |
|
|
(javanaut)
|