compose tips
- Each email address will be obfuscated in a human readble fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.
Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div align> <div> <font> <table> <embed> <object>
This site allows HTML content. While learning all of HTML may feel intimidating, learning how to use a very small number of the most basic HTML "tags" is very easy. This table provides examples for each tag that is enabled on this site.
For more information see W3C's HTML Specifications or use your favorite search engine to find other sites that explain HTML.
Tag Description You Type You Get Anchors are used to make links to other pages. <a href="http://bootleggerschronicles.com">The Bootlegger's Chronicles</a>The Bootlegger's Chronicles Emphasized <em>Emphasized</em>Emphasized Strong <strong>Strong</strong>Strong Cited <cite>Cited</cite>Cited Coded text used to show programming source code <code>Coded</code>CodedUnordered list - use the <li> to begin each list item <ul> <li>First item</li> <li>Second item</li> </ul>- First item
- Second item
Ordered list - use the <li> to begin each list item <ol> <li>First item</li> <li>Second item</li> </ol>- First item
- Second item
Definition lists are similar to other HTML lists. <dl> begins the definition list, <dt> begins the definition term and <dd> begins the definition description. <dl> <dt>First term</dt> <dd>First definition</dd> <dt>Second term</dt> <dd>Second definition</dd> </dl>- First term
- First definition
- Second term
- Second definition
No help provided for tag img. No help provided for tag div. No help provided for tag div. No help provided for tag font. Table <table> <tr><th>Table header</th></tr> <tr><td>Table cell</td></tr> </table>Table header Table cell No help provided for tag embed. No help provided for tag object. Most unusual characters can be directly entered without any problems.
If you do encounter problems, try using HTML character entities. A common example looks like & for an ampersand & character. For a full list of entities see HTML's entities page. Some of the available characters include:
Character Description You Type You Get Ampersand && Greater than >> Less than << Quotation mark "" - Images can be added to this post.
- Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.
- Web page addresses and e-mail addresses turn into links automatically.
- If you include a textual smiley in your post (see chart below), it will be replaced by a graphical smiley.
-
Using custom PHP code
If you know how to script in PHP, Drupal gives you the power to embed any script you like. It will be executed when the page is viewed and dynamically embedded into the page. This gives you amazing flexibility and power, but of course with that comes danger and insecurity if you do not write good code. If you are not familiar with PHP, SQL or with the site engine, avoid experimenting with PHP because you can corrupt your database or render your site insecure or even unusable! If you do not plan to do fancy stuff with your content then you are probably better off with straight HTML.
Remember that the code within each PHP item must be valid PHP code - including things like correctly terminating statements with a semicolon. It is highly recommended that you develop your code separately using a simple test script on top of a test database before migrating to your production environment.
Notes:
- You can use global variables, such as configuration parameters, within the scope of your PHP code but remember that global variables which have been given values in your code will retain these values in the engine afterwards.
- register_globals is now set to off by default. If you need form information you need to get it from the "superglobals" $_POST, $_GET, etc.
- You can either use the
printorreturnstatement to output the actual content for your item.
A basic example:
You want to have a box with the title "Welcome" that you use to greet your visitors. The content for this box could be created by going:
print t("Welcome visitor, ... welcome message goes here ...");If we are however dealing with a registered user, we can customize the message by using:
global $user; if ($user->uid) { print t("Welcome $user->name, ... welcome message goes here ..."); } else { print t("Welcome visitor, ... welcome message goes here ..."); }For more in-depth examples, we recommend that you check the existing Drupal code and use it as a starting point, especially for sidebar boxes.
-
Flash Filter
The basic syntax for embedding a flash file (.swf), flash movie (.flv) or audio file (.mp3) is:
[flash:filename.swf]
If you would like to override SWF Tools and flash player default settings, you can specify additional parameters. For example:
Flash Filter will accept following parameters:- params : You can specify values for output inside <param>
tags with the <embed> html. Typical values are
bgcolor and wmode. Example:
params="wmode=true&&bgcolor=#00FF00" - flashvars : You can specify values for output as flashvars, which
become available to the flash player. Refer to the
documentation of the flash player you are using to
know what flashvar options are available.
Example:
flashvars="autostart=true&&volume=80" - files : Optional list of files to be passed, you'll normally define
files relative to your Drupal files directory.
Example:
files="name1=image.jpg&&name2=movie.flv" - methods : Optional information about how to display the file. The most
common usage is to specify a particular media player and
thus override the settings page.
Example:
methods="player=onepixelout_mp3"
WARNING: with params, flashvars and othervars, pass multiple values separated by &&.
- params : You can specify values for output inside <param>
tags with the <embed> html. Typical values are
bgcolor and wmode. Example:
- Restrict text by wrapping in [restrict:roles=<comma separated roles>] and [/restrict]. If you just use [restrict] and [/restrict], it will default to allowing any authenticated user (but not any anonymous users) access.
-
Gallery2 Filter:
You can link to items in your embedded Gallery2 using a special code. This code will be replaced by a thumbnail image that is linked to the actual item in your Gallery.
Syntax:
[G2:item_id n=number type=type size=number class=name frame=name album_frame=name item_frame=name]- item_id (required): This is the item ID from Gallery2. If you look at the URL of the item, this is the last number. Note that if the item_id is a single photo, n must be 1.
- n (suggested): This is the number of photos you want the block to show. It will override whatever is set in the defaults (initially 1). Note: this will change past instances where you did not set n -- the reason for its suggested use.
- type: The default type of gallery block. Any of the following may be used: randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem. Note that for n=1, selectedItem is automatically chosen regardless of this parameter.
- class: The block that Gallery2 returns is wrapped in a DIV so additional styling can be done. The classes for this DIV are located in g2_filter.css. Included with the module are "left", "right", and "nowrap". These position the image block to the left or right or on a line all its own with the text not wrapping. You can also add your own class(es) to the CSS file and they will automatically be available.
- size: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option (for Gallery2.2 and above) will use the gallery image that is closest in size, and so may end up using a smaller image and expanding it (lower quality). If so, use "exactsize". For Gallery2.1, if you want your size to be bigger than the thumbnail size for that image as defined in your Gallery2, you must select "Full Size" in the gallery settings page (but note that the full image will be returned and then resized by the browser, so it may take a while to download).
- exactsize: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option always ensures that the image is scaled from a larger image and so image quality is maintained. This only works for Gallery2.2 and above.
- frame/album_frame/item_frame: You can use just "frame" to assign a frame to the thumbnail regardless of whether it's for an album or a single item. Using aframe will only affect albums and iframe will only affect single items. Frames included with the default Gallery 2 install are: bamboo, book, brand , dots, flicking, gold, gold2, polaroid, polaroids, shadow, shells, slide, solid, notebook, wood.
- Acidfree inline tags It is possible to change the way the [acidfree:nnn] tags look by adding a few name/value pairs. Note that any value that has spaces in it must be quoted either with single quotes ' or with double quotes ". Currently, the choices are:
- title: use this string as the caption (Note that you can have the node title be the default caption by modifying the setting in admin/settings/acidfree)
- align: {left,right}
- size: {M, WxH} where M=max dimension and WxH=WidthxHeight
- link: 'none', 'album', or relative or absolute url e.g. http://www.google.com or node/59. If set to none, thumbnail will not be a link. If set to album, link will point to album of selected item.
- popup: any value. If set, it will cause the link to be a popup link
- style: CSS style information for the image
- class: additional class for the image
- [acidfree:1234 size=300 align=right] - right aligned thumbnail of node 1234 with max dimension of 300 pixels
- [acidfree:4321] - left aligned thumbnail of node 4321 (default thumbnail size)
- [acidfree:3241 align=left size=320x240] - right aligned thumbnail of node 3241 with size = 320x240
- [acidfree:3241 title='This is a different title' size=320 popup=true link="http://mysite.dom/"] - left aligned thumbnail of node 3241 with a title set, size = 320x240, link pointing to mysite.dom and target=blank_ set in the anchor
- [acidfree:3241 link=none class='my-image your-image' style="border: 2 px grey inset;"] - left aligned thumbnail of 3241, default size, class set and new style info
- Every email address in the input text will be replaced with its ascii equivalent.
- You may create links to items stored in our weblink registry using a special syntax. The weblink codes will be replaced by a links to visit the real websites. Syntax:
[weblink:node_id](to use the first link for that node),[weblink:node_id/link_id](to use a specific link for that node) or[weblink:http://a.weblink.example.com/](to specify a raw URL).

