Drugs-Wiki syntax
Drugs-Wiki uses
BBCode and WYSIWYG editor (What You See Is What You Get editor AKA forum editing box) for creating and editing wiki content.
With editing Wiki articles the BBcode editor toggle button in your editing box is very important. This is the button that looks like a page of a document on the right top of your editing box. It looks like this:
When you click the toggle button the content of your wiki is transformed back into plain text, without links or other parsed content.
For example: after the toggle button is clicked the link
Drugs Forum home page
will look like:
[URL="http://www.drugs-forum.com/"]Drugs Forum home page[/URL]
Which makes it easier to edit.
Drugs Wiki extends
BBCode as follows:
Creating links to Drugs Wiki Articles
You can create links to Drugs Wiki Articles through the use of the WIKI bbcode. The following example will create a link to a Drugs Wiki Article named '
Drugs Wiki FAQ':
[wiki]Drugs Wiki FAQ[/wiki]
If the article to which the link points does not exist, the link is shown in red color.
Example:
nonexistent article
If you click a link to an nonexistent article, then you will be taken to the page where you can create the article.
Note: In most cases these links will be created automatically. You would only need to use this particular code if the autolink was not working to point to the correct page.
Adding Headlines
You can add headlines (headers) for sections and subsubsections to a wiki article by using the following BBCodes:
[h=1]Paragraph title[/h]
[h=2]Paragraph title[/h]
[h=3]Paragraph title[/h]
[h=4]Paragraph title[/h]
h1 is one level above h2, which is one level above h3, etc. This is how you get sections, subsections, etc.
Table of Contents
The tag [toc] can customize how an article's table of contents is displayed. Normally, the table of contents will appear below the first paragraph when there are at least four (4) sections created using [h]. It takes any number of pre-defined flags as a value, separated using |. This tag cannot be used in regular posts, and will only parse in wiki articles.
Usage [toc]value[/toc]
[toc]NO[/toc] prevents the default table of contents placement from occurring
[toc]FORCE[/toc] displays the table of contents even if there are too few sections, or even if the NO flag was used
[toc]BOOK[/toc] if the article belongs to a book, merges the other chapters into the table of contents
[toc]NONUM[/toc] removes the table of contents numbering, leaving only the bullet points
[toc][/toc] places a table of contents at the current position
Adding Images
Images used in wiki articles need to first be added to the
media gallery.
When you want to add specific images from the media gallery into a wiki, go to the entry of the image in the media gallery and find the Share BB [IMG] Code:
For example: In the wiki images section you will find a picture named bbcodeedit. In the Share BB [IMG] Code: field, you will find the code to use: [IMG]https://drugs-forum.com/media/bbcodeedit.58300/full[/IMG]
You can add this by ether linking it through the edit box's image function or by pasting (or manually typing) the code at the location where you want the image to appear.
DIV BB code
The [div][/div] tag allows you to wrap content in a block container and apply styles to that container. Attributes and styles are separated from the content using a pipe character |
Usage: [div]value | your text[/div]
Example Usage: [div] style="border: 1px dotted green; background: yellow; color: brown; width: 100px; padding: 5px" | This box has a green dotted border, a yellow background, and brown text. [/div]
Example Output:
This box has a green dotted border, a yellow background, and brown text.
Book BB code
This Wiki Code can be used by clicking this button in the editor. The tag [book][/book] is used to create links to articles in the namespace called "Book". If the article does not exist, the link may appear in this
color, and clicking the link will allow users to create the article. You can also use an optional parameter to "name" your link.
Usage: [book]value[/book]
[book=Option]value[/book]
Example Usage: [book]FAQ[/book]
[book=FAQ]Click here to view the article![/book]
Example Output:
Click here to view the article!
We like to see referenced claims. For this you can use the [footnote] and [reflist] bb code. Generally any claim should be supported if it is not common knowledge, and when using someone else's ideas to support a claim requires that the idea be acknowledged with a reference.
This Wiki Code can be used by clicking this button in the editor.
The tag [footnote] inserts a footnote into wiki articles. This will leave a numerical indication at the current position. In order to display the full value of the footnote, [reflist][/reflist] must also be used. If [reflist][/reflist] was used, clicking a footnote will highlight the footnote's full text, and the browser window will jump to it.
Providing an option for the footnote gives it a name. By using matching options, users can include the same footnote more than once without re-typing the value. This BB-Code will only parse in wiki articles, and it will not parse in regular forum posts.
Usage: [footnote]value[/footnote]
or
[footnote=Option]value[/footnote]
Example Usage:
This text requires citations.[footnote]Example1[/footnote]
This text requires citations.[footnote=sample]Example2[/footnote]
This text requires citations.[footnote=sample][/footnote]
(Note: This is a footnote for the same reference as the previous one, indicated by it having the same option - sample. The value is not required to be repeated after the first usage of the tag as the option will grab the information from the first usage of the tag with that option.)
Example output:
This text requires citations.
This text requires citations.
This text requires citations.
Showing reference list with reflist code
Reference lists can be inserted into articles using this button (normally they are the last section of an article):
The tag [reflist] inserts a list of footnotes into wiki articles. This prints the full text of the values of footnotes into the list. Providing a numerical value will separate the footnotes into the same number of columns. This tag cannot be used in regular posts, and will only parse in wiki articles.
Usage without value:[reflist][/reflist]
Example usage without value:[reflist][/reflist]
Output without value:
Usage with value:[reflist]value[/reflist]
Example usage with value:[reflist]2[/reflist]
Output with value:
Horizontal line
If you want to insert a horizontal line into the article, then you can do this with the [hr] bb code.
Usage: [hr][/hr]
Example: [hr][/hr]
Result: