Compose tips

input formats:
  • Filtered HTML:
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><div><span><h1><h2><h3><h4><h5><img>

      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 DescriptionYou TypeYou Get
      Anchors are used to make links to other pages.<a href="http://westernchallenge.org">The Western Challenge Tour</a>The Western Challenge Tour
      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>Coded
      Unordered 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>
      1. First item
      2. 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 div.
      No help provided for tag span.
      Header<h1>Title</h1>

      Title

      Header<h2>Subtitle</h2>

      Subtitle

      Header<h3>Subtitle three</h3>

      Subtitle three

      Header<h4>Subtitle four</h4>

      Subtitle four

      Header<h5>Subtitle five</h5>
      Subtitle five
      No help provided for tag img.

      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 &amp; for an ampersand & character. For a full list of entities see HTML's entities page. Some of the available characters include:

      Character DescriptionYou TypeYou Get
      Ampersand&amp;&
      Greater than&gt;>
      Less than&lt;<
      Quotation mark&quot;"
    • 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.
    • 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 print or return statement 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.

    • To add a lightbox to your images, add rel="lightbox" attribute to any link tag to activate the lightbox. For example:

      <a href="image-1.jpg" rel="lightbox" title="my caption">image #1</a>

      The title attribute in the link tag is optional. The addition of this attribute enables the display of a caption with the image displayed in the lightbox.

      If you have a set of related images that you would like to group, then you will need to include a group name between square brackets in the rel attribute. For example:

      <a href="image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
      <a href="image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
      <a href="image-3.jpg" rel="lightbox[roadtrip]">image #3</a>

      There are no limits to the number of image sets per page or how many images are allowed in each set.

      If you wish to turn the caption into a link, format your caption in the following way:

      <a href="image-1.jpg" rel="lightbox" title='<a href="http://www.yourlink.com">View Image Details</a>'>image #1</a>

    • Image links from G2 are formatted for use with Lightbox.V2
    • Images can be added to this post.
    • You may link to files uploaded with the current node using special tags. The tags will be replaced by the corresponding files. For example: Suppose you uploaded three files (in this order):

      • imag1.png (referred as file #1)
      • file1.pdf (referred as file #2)
      • imag2.png (referred as file #3)
      [inline:1=test]  or  [inline:imag1.png=test]
      will be replaced by <img src=imag1.png alt=test>
      [file:1=test]  or  [file:imag1.png=test]
      will be replaced by <a href=imag1.png>test</a>
      [attachment:2=test]  or  [attachment:file1.pdf=test]
      will be replaced by <a href=file1.pdf.png>test</a>
    • You may quickly link to image nodes using a special syntax. Each image code will be replaced by thumbnail linked to full size image node. Syntax:

      [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id]

      Every parameter except node_id is optional.

      Typically, you will specify one of size, width, or height, or none of them. If you use size=label, where label is one of the image size labels specified on the image settings page, the size associated with that label will be used. The sizes "thumbnail", "preview", and "original" are always available. If you use width=n or height=n, the image will be scaled to fit the specified width or height. If you use none of them, the thumbnail image size will be used.

      If you specify nolink=1, no link will be created to the image node. The default is to create a link to the image.

      Alternatively, if you specify node=id, a link will be created to the node with the given id.

      The align, hspace, vspace, border, class, and style parameters set the corresponding attributes in the generated img tag.

    • Web page addresses and e-mail addresses turn into links automatically.
  • Full HTML:
    • Web page addresses and e-mail addresses turn into links automatically.
    • 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.
    • To add a lightbox to your images, add rel="lightbox" attribute to any link tag to activate the lightbox. For example:

      <a href="image-1.jpg" rel="lightbox" title="my caption">image #1</a>

      The title attribute in the link tag is optional. The addition of this attribute enables the display of a caption with the image displayed in the lightbox.

      If you have a set of related images that you would like to group, then you will need to include a group name between square brackets in the rel attribute. For example:

      <a href="image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
      <a href="image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
      <a href="image-3.jpg" rel="lightbox[roadtrip]">image #3</a>

      There are no limits to the number of image sets per page or how many images are allowed in each set.

      If you wish to turn the caption into a link, format your caption in the following way:

      <a href="image-1.jpg" rel="lightbox" title='<a href="http://www.yourlink.com">View Image Details</a>'>image #1</a>

    • Image links from G2 are formatted for use with Lightbox.V2
    • Images can be added to this post.
    • You may link to files uploaded with the current node using special tags. The tags will be replaced by the corresponding files. For example: Suppose you uploaded three files (in this order):

      • imag1.png (referred as file #1)
      • file1.pdf (referred as file #2)
      • imag2.png (referred as file #3)
      [inline:1=test]  or  [inline:imag1.png=test]
      will be replaced by <img src=imag1.png alt=test>
      [file:1=test]  or  [file:imag1.png=test]
      will be replaced by <a href=imag1.png>test</a>
      [attachment:2=test]  or  [attachment:file1.pdf=test]
      will be replaced by <a href=file1.pdf.png>test</a>
    • You may quickly link to image nodes using a special syntax. Each image code will be replaced by thumbnail linked to full size image node. Syntax:

      [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id]

      Every parameter except node_id is optional.

      Typically, you will specify one of size, width, or height, or none of them. If you use size=label, where label is one of the image size labels specified on the image settings page, the size associated with that label will be used. The sizes "thumbnail", "preview", and "original" are always available. If you use width=n or height=n, the image will be scaled to fit the specified width or height. If you use none of them, the thumbnail image size will be used.

      If you specify nolink=1, no link will be created to the image node. The default is to create a link to the image.

      Alternatively, if you specify node=id, a link will be created to the node with the given id.

      The align, hspace, vspace, border, class, and style parameters set the corresponding attributes in the generated img tag.

    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img>

      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 DescriptionYou TypeYou Get
      Anchors are used to make links to other pages.<a href="http://westernchallenge.org">The Western Challenge Tour</a>The Western Challenge Tour
      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>Coded
      Unordered 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>
      1. First item
      2. 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.

      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 &amp; for an ampersand & character. For a full list of entities see HTML's entities page. Some of the available characters include:

      Character DescriptionYou TypeYou Get
      Ampersand&amp;&
      Greater than&gt;>
      Less than&lt;<
      Quotation mark&quot;"
    • 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 print or return statement 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.