Difference between revisions of "Hattrick Markup Language"

From Hattrick
(Current HT-ML code)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Some [[Helper Applications|helper applications]] and [[Helper Applications#Web Sites|sites]] offer the option to post some relavant data from the application or the site on the [[hattrick]] [[conference]]s in an orderly and nice looking way. To achieve this, the so called Hattrick Markup Language (HT-ML) is used to provide effects such as bolding, italic, underline, links, among others. The resulting text is ready to be copy-pasted into the post. Most applications and sites offer further information on how to use this properly.
+
{{Interwiki/Hattrick Markup Language}}
 +
'''Hattrick Markup Language''' or '''HT-ML''' is Hattrick's version of the so-called BBCode. At the beginning it could only be used in Hattrick's [[Forum|forums]]. It's main purpose is to provide additional effects such as bold, italic, underlined, links and others.
  
This table shows the known markups and their usage. Note that the first four requires an ending tag as well.
+
With the transition of the site to .NET, it was also made available for [[HT mail]]. Since the update of the supporter package on the 17th of March 2009, it can also be used in [[Guestbook|guestbooks]] and [[Press announcement|press announcements]], which originally only [[Foxtrick]] or [[Firehat]] users could do.
 +
 
 +
HT-ML tags have remained the same for a long time, only the addition of the [[Youth Academy]] to the game in 2007 and the [[Redesign 2008|redesign of 2008]] brought changes in terms of available tags. Additional changes were made with the introduction of the so-called ''Forum v1.1'' at the beginning of 2009, where quoting was eased up a little
 +
 
 +
Since the beginning of May 2009, the HT-ML has to be strictly nested. This means that any tag cannot exceed the scope of its enclosing tag.<br>An example: ''&#91;i&#93;&#91;b&#93;Hello&#91;/b&#93;&#91;/i&#93;'' is correct syntax, while ''&#91;i&#93;&#91;b&#93;Hello&#91;/i&#93;&#91;/b&#93;'' is not.
 +
 
 +
== Current HT-ML code ==
 +
This table shows the known markups and their usage.
 
{| border=1 cellspacing=0 cellpadding=2 style="border-collapse:collapse" width="80%"
 
{| border=1 cellspacing=0 cellpadding=2 style="border-collapse:collapse" width="80%"
 
|- bgcolor=#dddddd
 
|- bgcolor=#dddddd
! Markup !! Syntax !!width=35%| Result !! Notes
+
! Code !! Syntax !! Result !! Notes !! Addition
 +
|-
 +
| '''b''' || I make &#91;b&#93;this&#91;/b&#93; appear in bold. || I make '''this''' appear in bold. End tag is required. || Bold text || Available from the start.
 +
|-
 +
| '''i''' || I make &#91;i&#93;this&#91;/i&#93; appear in italic. || I make ''this'' appear in italic. End tag is required. || Italic text || Available from the start.
 +
|-
 +
| '''u''' || I make &#91;u&#93;this&#91;/u&#93; appear underlined. || I make <u>this</u> appear underlined. End tag is required. || Underlined text || Available from the start.
 
|-
 
|-
| quote '''q''' || I &#91;q&#93;quote&#91;/q&#93; you! || I
+
| '''q''' or '''quote''' || I &#91;q&#93;quote&#91;/q&#93; you! || I
 
----
 
----
 
''quote''
 
''quote''
 
----
 
----
 
you!
 
you!
| Put what is inside the quotations in a separate block with italic text
+
| The text between the two tags is put into a separate block written in italic and with a gray background. Interlacing this tag makes the background become darker and darker. Writing &#91;q=alias&#93; or &#91;quote=alias&#93; will write the alias of the quoted user in the text box. End tag is required. || Available from the start, the possibility to add an argument was added with ''Forum v1.1'' in 2009.
 
|-
 
|-
| bold '''b''' || I make &#91;b&#93;this&#91;/b&#93; appear in bold. || I make '''this''' appear in bold. || Bold text.
+
| '''br''' || First line.&#91;br&#93;Second line. || First line<br>Second line.
 +
| Takes the text to a new line. No end tag is needed. || Available from the start.
 
|-
 
|-
| italic '''i''' || I make &#91;i&#93;this&#91;/i&#93; appear in italic. || I make ''this'' appear in italic. || Italic text.
+
| '''hr''' || First line.&#91;hr&#93;Second line. || First line.
 +
----
 +
Second line.
 +
| Inserts a HTML ruler. No end tag is needed. || Available from the start, deleted for standard skin with the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| underline '''u''' || I make &#91;u&#93;this&#91;/u&#93; appear underlined. || I make <u>this</u> appear underlined. || Underlined text.
+
| '''userid''' || &#91;userid=1836&#93; || {{userid|1836}} || Inserts a direct link to a user. || Available after the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| break '''br''' || First line.&#91;br&#93;Second line. || First line.
+
| '''playerid''' || &#91;playerid=182390841&#93; || {{playerid|182390841}} || Inserts a direct link to a player. || Available from the start.
Second line.
+
|-
| Inserts a HTML newline. Note that no end tag is needed.
+
| '''youthplayerid''' || &#91;youthplayerid=31508440&#93; || (31508440) || Inserts a direct link to a youth player. || Available shortly after the addition of the [[Youth Academy]] in 2007.
 +
|-
 +
| '''teamid''' || &#91;teamid=102541&#93; || {{teamid|102541}} || Inserts a direct link to a team. || Available from the start.
 +
|-
 +
| '''youthteamid''' || &#91;youthteamid=518&#93; || (518) || Inserts a direct link to a youth team. || Available shortly after the addition of the [[Youth Academy]] in 2007.
 +
|-
 +
| '''matchid''' || &#91;matchid=13151551&#93; || {{matchid|13151551}} || Inserts a direct link to a match. || Available from the start.
 +
|-
 +
| '''youthmatchid''' || &#91;youthmatchid=316658&#93; || (316658) || Inserts a direct link to a youth match. || Available after the [[Redesign 2008|redesign of 2008]].
 +
|-
 +
| '''leagueid''' || &#91;leagueid=1&#93; || {{leagueid|1}} || Inserts a direct link to a specific series, not to a league (country) || Available from the start.
 +
|-
 +
| '''youthleagueid''' || &#91;youthleagueid=108&#93; || (108) || Inserts a direct link to a specific youth league || Available after the [[Redesign 2008|redesign of 2008]].
 +
|-
 +
| '''federationid''' || &#91;federationid=81554&#93; || (81554) || Inserts a direct link to a federation. || Available from the start. Was changed from ''allianceid'' to ''federationid'' with the [[Redesign 2008|redesign of 2008]].
 +
|-
 +
| message || &#91;message=6072888.1&#93; || (6072888.1) || Inserts a direct link to a forum message. || Deprecated, see '''post''' below.
 
|-
 
|-
| html ruler '''hr''' || First line.&#91;hr&#93;Second line. || First line.
+
| '''link''' (1) || &#91;link=/Help/&#93; || (http://www.hattrick.org/Help/) || Inserts a link to some place within Hattrick, the part ''<nowiki>http://wwwXX.hattrick.org</nowiki>'' has to be cut off to make the link work. || Available from the start.
----
 
Second line.
 
| Inserts a HTML ruler. Note that no end tag is needed.
 
 
|-
 
|-
| '''playerid''' || &#91;playerid=1098817&#93; || {{playerid|1098817}} || Inserts a link directly to a player.
+
| '''link''' (2) || &#91;link=http&#58;//alltid.org/index.php&#93; || (http://www.alltid.org) || Inserts a link to some place outside of Hattrick. || Available from the start.
 
|-
 
|-
| '''teamid''' || &#91;teamid=102541&#93; || {{teamid|102541}} || Inserts a link directly to a team.
+
| '''articleid''' || &#91;articleid=2792&#93; || (2792) || Inserts a link to a [[Hattrick Press]] article. || Available after the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| '''matchid''' || &#91;matchid=13151551&#93; || {{matchid|13151551}} || Inserts a link directly to a match.
+
| '''table''' || &#91;table ''attribute=value''&#93;&#91;/table&#93; || n/a || Begins a formatted HTML table. {{ref|ref-1}} End tag is required. || Available after the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| '''allianceid''' || &#91;allianceid=53&#93; || (53) || Inserts a link directly to an alliance.
+
| '''tr''' || &#91;tr&#93;&#91;/tr&#93; || n/a || Add a new table row. End tag is required. || Available after the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| '''message''' || &#91;message=109345.1&#93; || (109345.1) || Inserts a link directly to a conference message.
+
| '''th''' || &#91;th ''attribute=value''&#93;&#91;/th&#93;{{ref|ref-2}}|| n/a || Add a new table heading cell. This is by default in bold text with gray background. End tag is required. || Added some time during 2009 in the Forum v1.2 project.
 
|-
 
|-
| '''leagueid''' || &#91;leagueid=842&#93; || {{leagueid|842}} || Inserts a link directly to a league.
+
| '''td''' || &#91;td ''attribute=value''&#93;&#91;/td&#93;{{ref|ref-3}}|| n/a || Add a new table cell. End tag is required. || Available after the [[Redesign 2008|redesign of 2008]].
 
|-
 
|-
| '''link''' (1) || &#91;link=/common/myHattrick.asp&#93; || (http://wwwXX.hattrick.org/common/myHattrick.asp) || Inserts a link to some place within Hattrick.
+
| '''post''' || &#91;post=6072888.1&#93; || (6072888.1) || Inserts a direct link to a forum message. || Available from the start. Was changed from message to post with the Forum v1.2 project.
 
|-
 
|-
| '''link''' (2) || &#91;link=http&#58;//alltid.org/index.php&#93; || (http://www.alltid.org) || Inserts a link to some place outside of Hattrick.
+
| '''spoiler''' || &#91;spoiler&#93;hidden text&#91;/spoiler&#93; || n/a || Hides ''hidden text'' which the reader can see by clicking a button. End tag required. || Added some time during 2009 in the Forum v1.2 project.
 
|}
 
|}
 +
 +
 +
 +
1. {{note|ref-1}} Tables must be strictly nested. The minimum table is: &#91;table&#93;&#91;tr&#93;&#91;td&#93;Single cell&#91;/td&#93;&#91;/tr&#93;&#91;/table&#93;. Example of a 2 row, 3 column table:
 +
<br>&#91;table&#93;
 +
<br>&#91;tr&#93;&#91;th&#93;H1&#91;/th&#93;&#91;th&#93;H2&#91;/th&#93;&#91;th&#93;H3&#91;/th&#93;&#91;/tr&#93;
 +
<br>&#91;tr&#93;&#91;td&#93;A1&#91;/td&#93;&#91;td&#93;A2&#91;/td&#93;&#91;td&#93;A3&#91;/td&#93;&#91;/tr&#93;
 +
<br>&#91;tr&#93;&#91;td&#93;B1&#91;/td&#93;&#91;td&#93;B2&#91;/td&#93;&#91;td&#93;B3&#91;/td&#93;&#91;/tr&#93;
 +
<br>&#91;/table&#93;
 +
 +
This will result in (note that Hattricks forum has another design for their tables):
 +
 +
<table border="1" cell-spacing="0">
 +
<tr><th>H1</th><th>H2</th><th>H3</th></tr>
 +
<tr><td>A1</td><td>A2</td><td>A3</td></tr>
 +
<tr><td>B1</td><td>B2</td><td>B3</td></tr>
 +
</table>
 +
 +
2. {{note|ref-2}} Valid attributes/values for TDs and THs are:
 +
* colspan={1..N} - This particular td will span over N columns.
 +
* rowspan={1..N} - This particular td will span over N rows
 +
* align={left|right|center} - The textual alignment within the cell.
 +
* valign={top|bottom|middle} - The vertical alignment within the cell.
 +
 +
3. {{note|ref-3}} See 2 above.
 +
 +
== See also ==
 +
=== External links ===
 +
* [http://en.wikipedia.org/wiki/BBCode Wikipedia article on BBCode]
 +
 
[[Category: Game Concepts]]
 
[[Category: Game Concepts]]

Latest revision as of 12:32, 11 January 2010

INTERWIKI

· English · Español · Magyar ·

Hattrick Markup Language or HT-ML is Hattrick's version of the so-called BBCode. At the beginning it could only be used in Hattrick's forums. It's main purpose is to provide additional effects such as bold, italic, underlined, links and others.

With the transition of the site to .NET, it was also made available for HT mail. Since the update of the supporter package on the 17th of March 2009, it can also be used in guestbooks and press announcements, which originally only Foxtrick or Firehat users could do.

HT-ML tags have remained the same for a long time, only the addition of the Youth Academy to the game in 2007 and the redesign of 2008 brought changes in terms of available tags. Additional changes were made with the introduction of the so-called Forum v1.1 at the beginning of 2009, where quoting was eased up a little

Since the beginning of May 2009, the HT-ML has to be strictly nested. This means that any tag cannot exceed the scope of its enclosing tag.
An example: [i][b]Hello[/b][/i] is correct syntax, while [i][b]Hello[/i][/b] is not.

Current HT-ML code[edit]

This table shows the known markups and their usage.

Code Syntax Result Notes Addition
b I make [b]this[/b] appear in bold. I make this appear in bold. End tag is required. Bold text Available from the start.
i I make [i]this[/i] appear in italic. I make this appear in italic. End tag is required. Italic text Available from the start.
u I make [u]this[/u] appear underlined. I make this appear underlined. End tag is required. Underlined text Available from the start.
q or quote I [q]quote[/q] you! I

quote


you!

The text between the two tags is put into a separate block written in italic and with a gray background. Interlacing this tag makes the background become darker and darker. Writing [q=alias] or [quote=alias] will write the alias of the quoted user in the text box. End tag is required. Available from the start, the possibility to add an argument was added with Forum v1.1 in 2009.
br First line.[br]Second line. First line
Second line.
Takes the text to a new line. No end tag is needed. Available from the start.
hr First line.[hr]Second line. First line.

Second line.

Inserts a HTML ruler. No end tag is needed. Available from the start, deleted for standard skin with the redesign of 2008.
userid [userid=1836] (1836) Inserts a direct link to a user. Available after the redesign of 2008.
playerid [playerid=182390841] (182390841) Inserts a direct link to a player. Available from the start.
youthplayerid [youthplayerid=31508440] (31508440) Inserts a direct link to a youth player. Available shortly after the addition of the Youth Academy in 2007.
teamid [teamid=102541] (102541) Inserts a direct link to a team. Available from the start.
youthteamid [youthteamid=518] (518) Inserts a direct link to a youth team. Available shortly after the addition of the Youth Academy in 2007.
matchid [matchid=13151551] (13151551) Inserts a direct link to a match. Available from the start.
youthmatchid [youthmatchid=316658] (316658) Inserts a direct link to a youth match. Available after the redesign of 2008.
leagueid [leagueid=1] (1) Inserts a direct link to a specific series, not to a league (country) Available from the start.
youthleagueid [youthleagueid=108] (108) Inserts a direct link to a specific youth league Available after the redesign of 2008.
federationid [federationid=81554] (81554) Inserts a direct link to a federation. Available from the start. Was changed from allianceid to federationid with the redesign of 2008.
message [message=6072888.1] (6072888.1) Inserts a direct link to a forum message. Deprecated, see post below.
link (1) [link=/Help/] (http://www.hattrick.org/Help/) Inserts a link to some place within Hattrick, the part http://wwwXX.hattrick.org has to be cut off to make the link work. Available from the start.
link (2) [link=http://alltid.org/index.php] (http://www.alltid.org) Inserts a link to some place outside of Hattrick. Available from the start.
articleid [articleid=2792] (2792) Inserts a link to a Hattrick Press article. Available after the redesign of 2008.
table [table attribute=value][/table] n/a Begins a formatted HTML table. [1] End tag is required. Available after the redesign of 2008.
tr [tr][/tr] n/a Add a new table row. End tag is required. Available after the redesign of 2008.
th [th attribute=value][/th][2] n/a Add a new table heading cell. This is by default in bold text with gray background. End tag is required. Added some time during 2009 in the Forum v1.2 project.
td [td attribute=value][/td][3] n/a Add a new table cell. End tag is required. Available after the redesign of 2008.
post [post=6072888.1] (6072888.1) Inserts a direct link to a forum message. Available from the start. Was changed from message to post with the Forum v1.2 project.
spoiler [spoiler]hidden text[/spoiler] n/a Hides hidden text which the reader can see by clicking a button. End tag required. Added some time during 2009 in the Forum v1.2 project.


1. ^  Tables must be strictly nested. The minimum table is: [table][tr][td]Single cell[/td][/tr][/table]. Example of a 2 row, 3 column table:
[table]
[tr][th]H1[/th][th]H2[/th][th]H3[/th][/tr]
[tr][td]A1[/td][td]A2[/td][td]A3[/td][/tr]
[tr][td]B1[/td][td]B2[/td][td]B3[/td][/tr]
[/table]

This will result in (note that Hattricks forum has another design for their tables):

H1H2H3
A1A2A3
B1B2B3

2. ^  Valid attributes/values for TDs and THs are:

  • colspan={1..N} - This particular td will span over N columns.
  • rowspan={1..N} - This particular td will span over N rows
  • align={left|right|center} - The textual alignment within the cell.
  • valign={top|bottom|middle} - The vertical alignment within the cell.

3. ^  See 2 above.

See also[edit]

External links[edit]