Rady pro psaní

formáty vstupu:
  • Filtered HTML:
    • The Views module allows administrators to create dynamic lists of content for display in pages or blocks. It is possible to insert those lists into existing node bodies and blocks, but such inclusion requires that PHP filtering be turned on. The Insert View module allows any user to insert view listings using tag syntax, without the need for PHP execution permissions. The Insert View tag syntax for embedding a view is relatively simple:

      [view:my_view]

      is replaced by the content listing corresponding to the named view (in this case, my_view).

      [view:my_view=5]

      limits the listing to 5 entries.

      [view:my_view=10=1,2,3]

      limits the listing to 10 entries, and passes a comma delimited list of arguments (in this case 1, 2, and 3) to the view.

      Here's an example you could use with the default view named "tracker" which takes a user ID as an argument:

      [view:tracker=5=1]

      In short this tag says, "Insert the view named tracker, limit the number of results to 5, and supply the argument/user ID 1."

      Sometimes you want to pass an argument without placing a limit on the number of results. You can do that by leaving the limits position empty, like so:

      [view:my_view==1]

      You can use a pager with your view by using the following syntax (note: you must set a limit which will serve as the number of nodes per page):

      [view_pager:my_view=3]
    • 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.

    • Použití vlastního PHP kódu

      Pokud umíte skriptovat v PHP, Drupal vám dává možnost přidat skript, jaký chcete. Spustí se při prohlížení stránky a dynamicky se připojí ke stránce. Získáte tak ohromnou flexibilitu a sílu, ale samozřejmě také nebezpečí, pokud napíšete špatný kód. Pokud nejste dobře obeznámeni s PHP, SQL nebo engine systému, vyhněte se experimentům s PHP, protože můžete poškodit databázi nebo způsobit špatné zobrazení nebo dokonce bezpečnostní riziko ve svém webu! Pokud nemáte v plánu nějaké vymyšlenosti, raději si zkuste vystačit s obyčejným HTML.

      Nezapomínejte, že PHP kód musí být vždy validní - včetně správných ukončení příkazů středníky. Vysoce doporučujeme odladit kód zvlášť s použitím jednoduchého testovacího skriptu a testovací databáze, než ho spustíte v ostrém provozu.

      Poznámky:

      • V rozsahu svého PHP kódu můžete použít globální proměnné (např. konfiguraci), ale pamatujte, že hodnota, kterou přidělíte globálním proměnným, jim zůstane i později při zpracování v engine systému.
      • register_globals je nyní standardně nastaveno na off. Informace z formulářů získáte ze "superglobálních" polí $_POST, $_GET atd.
      • Pro výstup obsahu můžete použít buď print nebo return.

      Jednoduchý příklad:

      Chcete mít box s titulkem "Vítejte", kterým pozdravíte návštěvníky. Obsah tohoto boxu vytvoříte takto:

       print t("Vítejte... tady patří uvítání...");
      

      Pokud přijde registrovaný uživatel, můžeme uvítání upravit:

       global $user;
        if ($user->uid) {
          print t("Vítejte $user->name, ...tady přijde uvítání ...");
        }
        else {
          print t("Vítejte,... tady přijde uvítání ...");
        }
      

      Podrobnější příklady najdete v existujícím kódu Drupalu, ze kterého můžete vycházet (hlavně pro postranní boxy).

    • If you include a textual smiley in your post (see chart below), it will be replaced by a graphical smiley.
      Smileys
      SmileyAcronyms
      ;);) ;-) :wink:
      :p:p :-p :tongue:
      :sushi::sushi:
      :tired::tired:
      :steve::steve:
      :Sp:Sp :-S) :sick:
      :star::star:
      :8):8) :8-) :shy:
      :O:O :-O :shock:
      :*:* :-* :sexy:
      :santa::santa:
      :((:(( :-(( :cry:
      :quest::quest:
      :~:~ :-~ :puzzled:
      :party::party:
      :X:X :-X :oups:
      :exmark::exmark:
      :mail::mail:
      :love::love:
      :D:D :-D :lol:
      0:)0:) 0) 0:-) :innocent:
      :hat::hat:
      H)H) H:) H:-) :grade:
      :glasses::glasses:
      :):) :-) :smile:
      |(|( \\( :angry:
      :arrow::arrow:
      :(:( :-( :sad:
      :beer::beer:
      :bigsmile::bigsmile:
      $)$) $-) :cash:
      8)8) 8-) :cool:
      J)J) J-) :crazy:
      :crown::crown:
      :davie::davie:
      S)S) S) :drunk:
      >)>) >-) :evil:
      :|:| :-| :stare:
      :ghost::ghost:
    • Webové a e-mailové adresy jsou automaticky převedeny na odkazy.
    • If you include a word in your post that's filtered (usually foul language), it will be replaced by the filtered version of the word.
    • Automaticky se rozeznávají řádky a odstavce. Automaticky se vloží značky pro zalomení řádku <br />, začátek <p> a konec </p> odstavce. Pokud nejsou odstavce rozeznány, prostě přidejte pár prázdných řádků.
    • BBCode Guide

      BBCode allows you to specify formatting rules for your text, even if you are not allowed to use HTML in your posts. BBCode originated from the forum software named PHPBB, and this site has a special implementation of it.

      In BBCode terms, you use "tags" to add formatting to your text. Every tag is enclosed in [ and ] brackets. If you want to mark some region in your text, you need to use an opening tag and a closing tag. Closing tags start with [/, as you will see in the examples below. If you mistype a tag or forget to close it, you will not get the desired formatting.

      Simple text formatting

      BBCode allows you to make some parts of your texts stand out from the context by adding [b]old, [i]talic, [u]nderlined and [s]trikeout formatting to them. The [color], [size] and [font] tags allow you to change the color, size and font of portions of the text you enclose with these tags. Both require a parameter (which colour, how big, what font) that is suffixed to the name of the tag by an equals sign (example below). You should not repeat the parameter in the closing tag!

      You can specify any recognized color name (red, blue, green, white, etc.) or a hexadecimal color value (#CDCDCD, #FFFFFF, etc.) as the parameter of a [color] tag. The [size] tag allows you to set the font size between 6 and 48, 6 being the smallest size. Note that using very large text is considered by many to be annoying, and it is seldom a good idea to try to attract more attention to your post in this way. The [font] tag can be set to any valid font face, such as Arial, Arial Black, Courier, Courier New, Helvetica, Impact, Times New Roman, Verdana, etc.

      usagedisplay
      I [b]need to do[/b] this by the weekend I need to do this by the weekend
      John said that [i]we should[/i] ask her John said that we should ask her
      I [u]would not like to[/u] offend you I would not like to offend you
      Let's correct this [s]mispelled[/s] misspelled word Let's correct this mispelled misspelled word
      Jane was at [color=blue]the coast[/color] Jane was at the coast
      Joe was in [color=#FF0000]the forest[/color] Joe was in the forest
      You said: [size=30]HEY![/size] You said: HEY!
      She said: [font=Courier]What?[/font] She said: What?

      Creating links

      You have multiple options to specify links to other destinations in your posts.

      URLs (Uniform Resource Locators) starting with "www" or "ftp" (eg. www.example.com) are automatically recognized and replaced with links. You can also use the [url] tag with a parameter to specify a link with meaningful text to click on. If you use the url tag without the parameter, the enclosed text is assumed to be a URL, and a link is created to that destination.

      Email addresses in posts are also automatically converted to email links. For compatibility with common BBCode implementations, an [email] tag is provided.

      usagedisplay
      For more examples, visit www.example.com For more examples, visit www.example.com
      For more examples, visit http://example.com For more examples, visit http://example.com
      If you have questions ask me at joe@example.com If you have questions ask me at joe@example.com
      If you have questions ask me at [email]joe@example.com[/email] If you have questions ask me at joe@example.com
      We use [url=http://example.com/]the example site[/url] in these examples We use the example site in these examples
      We use [url]http://example.com/[/url] in these examples We use http://example.com/ in these examples

      Displaying images

      The [img] tag allows you to display an image in your post. You need to specify a URL to the image, so it needs to be accessible somewhere on the internet. Beware of adding very large images to your text, or the page will load very slowly!

      If you enclose a URL in an [img] tag, then it will be replaced with code to display the image. For example A good screenshot: [img]http://example.com/screenshot.png[/img] will show you the screenshot (if it exists).

      You can also specify the desired display dimensions of the image by adding a dimension parameter to the [img] tag. A good screenshot: [img=640x480]http://example.com/screenshot.png[/img] will display the image in 640x480 (though the full image will be downloaded). Do not use this to show a thumbnail of an image!

      You are free to link an image to an external destination by enclosing the [img] tag with a [url] tag: See [url=http://example.com][img]http://example.com/screenshot.png[/img][/url].

      Ordered and unordered lists

      The simplest list type is the unordered list, which means that there is no numbering applied to the elements. You can make such a list by enclosing the list elements in [list] opening and closing tags. Specify the start of one element with the [*] list element marker, which has no closing tag pair.

      To create an ordered list, you should add a parameter to the [list] list tag specifying what type of ordered list you would like to see. The possible parameters are "i", "I", "1", "a", "A", "c", "d" and "s" which all correspond to the display of the first list element.

      usagedisplay
      I love
       [list]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      • Oranges
      • Apples
      • Bananas
      I love
       [list=I]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      1. Oranges
      2. Apples
      3. Bananas
      I love
       [list=1]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      1. Oranges
      2. Apples
      3. Bananas

      Fixed-width text and block formatting

      You can use the [code] tag to add an inline fixed-width formatted part or to add a block of (usually program) code. If there is any newline present between the opening and closing tags, then a block will be displayed.

      Similarly, the [php] tag can be used to post PHP code. PHP code will automatically be syntax highlighted for easier readability.

      usagedisplay
      Edit your [code]robots.txt[/code] file Edit your robots.txt file
      An HTML title example:
      [code]
      <head>
       <title>Page Title</title>
      </head>
      [/code]
      An HTML title example:
      <head>
       <title>Page Title</title>
      </head>
      Some PHP code:
      [php]
      <?php
      function hello()
      {
        echo "Hello World!";
      }
      ?>
      [/php]
      Some PHP code:
      <?php
      function hello()
      {
        echo
      "Hello World!";
      }
      ?>

      Text and block alignment

      You can also set the alignment of the text by using [left], [right] and [center] tags. The [float] tag can be used to place floating boxes in the text (especially handy for images). You can specify the direction of the floating with [float=left] and [float=right]. The [justify] tag can be used justify text on both sides of the page.

      Other supported tags

      It is possible to quote something that has already been posted, by just putting [quote][/quote] tags around it. To quote a specific person, use something like [quote=John]. Quote tags can be nested.

      The [sub] and [sup] tags can be used to add subscript and superscript text. For example, H[sub]2[/sub]O gives H2O, while X[sup]3[/sup] gives X3.

      The [acronym] tag allow you to identify text as an acronym and provide a description when users move their mouse over the tag. For example, [acronym=Structured Query Language]SQL[/acronym] produces SQL.

      The [abbr] tag allow you to identify text as an abbreviation and provide a description when users move their mouse over the tag. For example, [abbr=World Wide Web]WWW[/abbr] produces WWW.

      The [notag] tags prevent text inside the tags from being parsed. This allows you to give examples of BBcode and not have it converted to HTML. For example: [notag]These [b]tags[/b] are not rendered[/notag] will produce "These [b]tags[/b] are not rendered".

      The [hr] tag draws a horizontal line across the page. Handy for separating chunks of text.

      Using multiple formatting tags

      You can apply more than one formatting specification to a portion of some text. I was at [b][i]the coast[/i][/b] will be rendered as I was at the coast.

      Make sure that you take care of the proper order of the opening and closing tags. You should close the tags in the opposite order in which you opened them. Otherwise you might get very strange rendering results. Also check your post with the preview function before submitting it, in case there are formatting errors due to improper BBCode usage.

  • PHP code:
    • The Views module allows administrators to create dynamic lists of content for display in pages or blocks. It is possible to insert those lists into existing node bodies and blocks, but such inclusion requires that PHP filtering be turned on. The Insert View module allows any user to insert view listings using tag syntax, without the need for PHP execution permissions. The Insert View tag syntax for embedding a view is relatively simple:

      [view:my_view]

      is replaced by the content listing corresponding to the named view (in this case, my_view).

      [view:my_view=5]

      limits the listing to 5 entries.

      [view:my_view=10=1,2,3]

      limits the listing to 10 entries, and passes a comma delimited list of arguments (in this case 1, 2, and 3) to the view.

      Here's an example you could use with the default view named "tracker" which takes a user ID as an argument:

      [view:tracker=5=1]

      In short this tag says, "Insert the view named tracker, limit the number of results to 5, and supply the argument/user ID 1."

      Sometimes you want to pass an argument without placing a limit on the number of results. You can do that by leaving the limits position empty, like so:

      [view:my_view==1]

      You can use a pager with your view by using the following syntax (note: you must set a limit which will serve as the number of nodes per page):

      [view_pager:my_view=3]
    • If you include a textual smiley in your post (see chart below), it will be replaced by a graphical smiley.
      Smileys
      SmileyAcronyms
      ;);) ;-) :wink:
      :p:p :-p :tongue:
      :sushi::sushi:
      :tired::tired:
      :steve::steve:
      :Sp:Sp :-S) :sick:
      :star::star:
      :8):8) :8-) :shy:
      :O:O :-O :shock:
      :*:* :-* :sexy:
      :santa::santa:
      :((:(( :-(( :cry:
      :quest::quest:
      :~:~ :-~ :puzzled:
      :party::party:
      :X:X :-X :oups:
      :exmark::exmark:
      :mail::mail:
      :love::love:
      :D:D :-D :lol:
      0:)0:) 0) 0:-) :innocent:
      :hat::hat:
      H)H) H:) H:-) :grade:
      :glasses::glasses:
      :):) :-) :smile:
      |(|( \\( :angry:
      :arrow::arrow:
      :(:( :-( :sad:
      :beer::beer:
      :bigsmile::bigsmile:
      $)$) $-) :cash:
      8)8) 8-) :cool:
      J)J) J-) :crazy:
      :crown::crown:
      :davie::davie:
      S)S) S) :drunk:
      >)&gt;) &gt;-) :evil:
      :|:| :-| :stare:
      :ghost::ghost:
    • Použití vlastního PHP kódu

      Pokud umíte skriptovat v PHP, Drupal vám dává možnost přidat skript, jaký chcete. Spustí se při prohlížení stránky a dynamicky se připojí ke stránce. Získáte tak ohromnou flexibilitu a sílu, ale samozřejmě také nebezpečí, pokud napíšete špatný kód. Pokud nejste dobře obeznámeni s PHP, SQL nebo engine systému, vyhněte se experimentům s PHP, protože můžete poškodit databázi nebo způsobit špatné zobrazení nebo dokonce bezpečnostní riziko ve svém webu! Pokud nemáte v plánu nějaké vymyšlenosti, raději si zkuste vystačit s obyčejným HTML.

      Nezapomínejte, že PHP kód musí být vždy validní - včetně správných ukončení příkazů středníky. Vysoce doporučujeme odladit kód zvlášť s použitím jednoduchého testovacího skriptu a testovací databáze, než ho spustíte v ostrém provozu.

      Poznámky:

      • V rozsahu svého PHP kódu můžete použít globální proměnné (např. konfiguraci), ale pamatujte, že hodnota, kterou přidělíte globálním proměnným, jim zůstane i později při zpracování v engine systému.
      • register_globals je nyní standardně nastaveno na off. Informace z formulářů získáte ze "superglobálních" polí $_POST, $_GET atd.
      • Pro výstup obsahu můžete použít buď print nebo return.

      Jednoduchý příklad:

      Chcete mít box s titulkem "Vítejte", kterým pozdravíte návštěvníky. Obsah tohoto boxu vytvoříte takto:

       print t("Vítejte... tady patří uvítání...");
      

      Pokud přijde registrovaný uživatel, můžeme uvítání upravit:

       global $user;
        if ($user->uid) {
          print t("Vítejte $user->name, ...tady přijde uvítání ...");
        }
        else {
          print t("Vítejte,... tady přijde uvítání ...");
        }
      

      Podrobnější příklady najdete v existujícím kódu Drupalu, ze kterého můžete vycházet (hlavně pro postranní boxy).

    • BBCode Guide

      BBCode allows you to specify formatting rules for your text, even if you are not allowed to use HTML in your posts. BBCode originated from the forum software named PHPBB, and this site has a special implementation of it.

      In BBCode terms, you use "tags" to add formatting to your text. Every tag is enclosed in [ and ] brackets. If you want to mark some region in your text, you need to use an opening tag and a closing tag. Closing tags start with [/, as you will see in the examples below. If you mistype a tag or forget to close it, you will not get the desired formatting.

      Simple text formatting

      BBCode allows you to make some parts of your texts stand out from the context by adding [b]old, [i]talic, [u]nderlined and [s]trikeout formatting to them. The [color], [size] and [font] tags allow you to change the color, size and font of portions of the text you enclose with these tags. Both require a parameter (which colour, how big, what font) that is suffixed to the name of the tag by an equals sign (example below). You should not repeat the parameter in the closing tag!

      You can specify any recognized color name (red, blue, green, white, etc.) or a hexadecimal color value (#CDCDCD, #FFFFFF, etc.) as the parameter of a [color] tag. The [size] tag allows you to set the font size between 6 and 48, 6 being the smallest size. Note that using very large text is considered by many to be annoying, and it is seldom a good idea to try to attract more attention to your post in this way. The [font] tag can be set to any valid font face, such as Arial, Arial Black, Courier, Courier New, Helvetica, Impact, Times New Roman, Verdana, etc.

      usagedisplay
      I [b]need to do[/b] this by the weekend I need to do this by the weekend
      John said that [i]we should[/i] ask her John said that we should ask her
      I [u]would not like to[/u] offend you I would not like to offend you
      Let's correct this [s]mispelled[/s] misspelled word Let's correct this mispelled misspelled word
      Jane was at [color=blue]the coast[/color] Jane was at the coast
      Joe was in [color=#FF0000]the forest[/color] Joe was in the forest
      You said: [size=30]HEY![/size] You said: HEY!
      She said: [font=Courier]What?[/font] She said: What?

      Creating links

      You have multiple options to specify links to other destinations in your posts.

      URLs (Uniform Resource Locators) starting with "www" or "ftp" (eg. www.example.com) are automatically recognized and replaced with links. You can also use the [url] tag with a parameter to specify a link with meaningful text to click on. If you use the url tag without the parameter, the enclosed text is assumed to be a URL, and a link is created to that destination.

      Email addresses in posts are also automatically converted to email links. For compatibility with common BBCode implementations, an [email] tag is provided.

      usagedisplay
      For more examples, visit www.example.com For more examples, visit www.example.com
      For more examples, visit http://example.com For more examples, visit http://example.com
      If you have questions ask me at joe@example.com If you have questions ask me at joe@example.com
      If you have questions ask me at [email]joe@example.com[/email] If you have questions ask me at joe@example.com
      We use [url=http://example.com/]the example site[/url] in these examples We use the example site in these examples
      We use [url]http://example.com/[/url] in these examples We use http://example.com/ in these examples

      Displaying images

      The [img] tag allows you to display an image in your post. You need to specify a URL to the image, so it needs to be accessible somewhere on the internet. Beware of adding very large images to your text, or the page will load very slowly!

      If you enclose a URL in an [img] tag, then it will be replaced with code to display the image. For example A good screenshot: [img]http://example.com/screenshot.png[/img] will show you the screenshot (if it exists).

      You can also specify the desired display dimensions of the image by adding a dimension parameter to the [img] tag. A good screenshot: [img=640x480]http://example.com/screenshot.png[/img] will display the image in 640x480 (though the full image will be downloaded). Do not use this to show a thumbnail of an image!

      You are free to link an image to an external destination by enclosing the [img] tag with a [url] tag: See [url=http://example.com][img]http://example.com/screenshot.png[/img][/url].

      Ordered and unordered lists

      The simplest list type is the unordered list, which means that there is no numbering applied to the elements. You can make such a list by enclosing the list elements in [list] opening and closing tags. Specify the start of one element with the [*] list element marker, which has no closing tag pair.

      To create an ordered list, you should add a parameter to the [list] list tag specifying what type of ordered list you would like to see. The possible parameters are "i", "I", "1", "a", "A", "c", "d" and "s" which all correspond to the display of the first list element.

      usagedisplay
      I love
       [list]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      • Oranges
      • Apples
      • Bananas
      I love
       [list=I]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      1. Oranges
      2. Apples
      3. Bananas
      I love
       [list=1]
        [*]Oranges
        [*]Apples
        [*]Bananas
       [/list]
      
      I love
      1. Oranges
      2. Apples
      3. Bananas

      Fixed-width text and block formatting

      You can use the [code] tag to add an inline fixed-width formatted part or to add a block of (usually program) code. If there is any newline present between the opening and closing tags, then a block will be displayed.

      Similarly, the [php] tag can be used to post PHP code. PHP code will automatically be syntax highlighted for easier readability.

      usagedisplay
      Edit your [code]robots.txt[/code] file Edit your robots.txt file
      An HTML title example:
      [code]
      <head>
       <title>Page Title</title>
      </head>
      [/code]
      An HTML title example:
      <head>
       <title>Page Title</title>
      </head>
      Some PHP code:
      [php]
      <?php
      function hello()
      {
        echo "Hello World!";
      }
      ?>
      [/php]
      Some PHP code:
      <?php
      function hello()
      {
        echo
      "Hello World!";
      }
      ?>

      Text and block alignment

      You can also set the alignment of the text by using [left], [right] and [center] tags. The [float] tag can be used to place floating boxes in the text (especially handy for images). You can specify the direction of the floating with [float=left] and [float=right]. The [justify] tag can be used justify text on both sides of the page.

      Other supported tags

      It is possible to quote something that has already been posted, by just putting [quote][/quote] tags around it. To quote a specific person, use something like [quote=John]. Quote tags can be nested.

      The [sub] and [sup] tags can be used to add subscript and superscript text. For example, H[sub]2[/sub]O gives H2O, while X[sup]3[/sup] gives X3.

      The [acronym] tag allow you to identify text as an acronym and provide a description when users move their mouse over the tag. For example, [acronym=Structured Query Language]SQL[/acronym] produces SQL.

      The [abbr] tag allow you to identify text as an abbreviation and provide a description when users move their mouse over the tag. For example, [abbr=World Wide Web]WWW[/abbr] produces WWW.

      The [notag] tags prevent text inside the tags from being parsed. This allows you to give examples of BBcode and not have it converted to HTML. For example: [notag]These [b]tags[/b] are not rendered[/notag] will produce "These [b]tags[/b] are not rendered".

      The [hr] tag draws a horizontal line across the page. Handy for separating chunks of text.

      Using multiple formatting tags

      You can apply more than one formatting specification to a portion of some text. I was at [b][i]the coast[/i][/b] will be rendered as I was at the coast.

      Make sure that you take care of the proper order of the opening and closing tags. You should close the tags in the opposite order in which you opened them. Otherwise you might get very strange rendering results. Also check your post with the preview function before submitting it, in case there are formatting errors due to improper BBCode usage.

Hokage CZ - Czech Naruto FanSite