Source files of,,,,, and Contribute:
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tagging.en.xhtml 10KB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <html>
  3. <head>
  4. <title>Documentation - Tagged news and events, country pages</title>
  5. </head>
  6. <body class="article web" microformats="h-entry" id="documentation-tags">
  7. <p id="category"><a href="/contribute/web/">Webmastering</a></p>
  8. <h1 class="p-name">Documentation: Tagged news and events, country pages</h1>
  9. <div class="e-content">
  10. <p id="introduction" class="p-summary">
  11. As you can see on <a href="/uk/uk.html">the UK page</a>,
  12. it is possible to display news or events that have a special tag,
  13. e.g. a country code.
  14. This helps setting up pages easily with specific news items or events.
  15. The list of people displayed on this same page has also been automated,
  16. so it makes it easy to implement your own country page.
  17. </p>
  18. <!--p>
  19. <img src="/graphics/icons/warning.png" />
  20. The first system we have used, an attribute consisting of
  21. comma-separated values, was not very adapted to the way we generate
  22. dynamic information.
  23. Therefore, we have opted for the hereunder defined system, a more
  24. xml-style one.
  25. </p-->
  26. <h2>Basic instructions</h2>
  27. <p>
  28. A tag should be in <a href="">CamelCase</a> except for special tags like <code>front-page</code>, <code>newsletter</code>. So for instance, the tag “very important subject” should be <code>VeryImportantSubject</code>.
  29. A tag should contain a <code>content</code> attribute except for special tags. <bold>This attribute should be translated and human readable</bold>, because it will be shown on certain pages. For instance, if you tag a page about the Windows Tax.
  30. </p>
  31. <pre class="file">
  32. &lt;tag content="Windows Tax"&gt;WindowsTax&lt;/tag&gt;
  33. </pre>
  34. <p>
  35. If you are translating, you should never edit what is “here” between <code>&lt;tag&gt;here&lt;/tag&gt;</code> but you can add a translated <code>content</code> attribute. For instance, take an English file with:</p>
  36. <pre class="file">
  37. &lt;tag&gt;Ruling&lt;/tag&gt;
  38. </pre>
  39. <p>“Ruling” in French would be “Décision de justice” so you should do:</p>
  40. <pre class="file">
  41. &lt;tag content="Décision de justice"&gt;Ruling&lt;/tag&gt;
  42. </pre>
  43. <h2>Tag pages, news and events</h2>
  44. <p>For most pages (when your file has the <var>xhtml</var>), the tags must be added within &lt;html&gt; &lt;/html&gt; usually at the end.</p>
  45. <p>
  46. A list of tags currently in use can be found <a href="/tags/tags.html">here</a>.
  47. We also have a list of <a href="/tags/tagged.html">all tagged pages, events and news</a>. <strong>Please check these pages first</strong> to avoid making duplicated tags, use existing tags if possible to keep things consistent.
  48. </p>
  49. <ul>
  50. <li>For certain news item the tags must be within &lt;news&gt; &lt;/news&gt; if your file has the <var>xml</var> extension:</li>
  51. </ul>
  52. <pre class="file">
  53. &lt;news&gt;
  54. [...]
  55. &lt;tags&gt;
  56. &lt;tag&gt;front-page&lt;/tag&gt;
  57. &lt;tag content="Software Patents"&gt;Swpats&lt;/tag&gt;
  58. &lt;tag content="Novell"&gt;Novell&lt;/tag&gt;
  59. &lt;/tags&gt;
  60. &lt;/news&gt;
  61. </pre>
  62. <ul>
  63. <li>For events, within &lt;event&gt; &lt;/event&gt;:</li>
  64. </ul>
  65. <pre class="file">
  66. &lt;event&gt;
  67. [...]
  68. &lt;tags&gt;
  69. &lt;tag&gt;front-page&lt;/tag&gt;
  70. &lt;tag content="Italy"&gt;it&lt;/tag&gt;
  71. &lt;/tags&gt;
  72. &lt;/event&gt;
  73. </pre>
  74. <p>Please note that only events and news items being tagged as <var>front-page</var>
  75. will appear on the front page of!</p>
  76. <p>
  77. Tags should all be written in English; there is no need for translation
  78. since the tags do not appear online, but are used internally for
  79. filtering news items or events.
  80. </p>
  81. <h3>Using the fetch-news template</h3>
  82. <ul>
  83. <li>
  84. the <var>tag</var> parameter defines what news will be displayed. If you are
  85. building up a country page, this is your country code. Leave blank
  86. if you wish to receive news items with any tags.
  87. </li>
  88. </ul>
  89. <pre class="file">&lt;xsl:with-param name="tag" select="'<var>your tag</var>'"/&gt;</pre>
  90. <ul>
  91. <li>
  92. the <var>nb-items</var> parameter determines how many news items will be displayed
  93. </li>
  94. </ul>
  95. <pre class="file">&lt;xsl:with-param name="nb-items" select="'<var>x</var>'" /&gt;</pre>
  96. <h3>Using the fetch-newsletter template</h3>
  97. <p>Works exactly as the fetch-news template, but does not propose tagging yet.</p>
  98. <h3>Using the fetch-events template</h3>
  99. <p>
  100. fetch-events works in a very similar manner to fetch-news, <var>tag</var> and <var>nb-items</var>
  101. work the same way. Here are some addings:
  102. </p>
  103. <ul>
  104. <li>
  105. the <var>wanted-time</var> parameter defines what events you want
  106. to display, "past", "present" or "future"
  107. </li>
  108. </ul>
  109. <pre class="file">&lt;xsl:with-param name="wanted-time" select="'<var>future|present|past</var>'" /&gt;</pre>
  110. <ul>
  111. <li>
  112. the <var>header</var> parameter determines the text that will be displayed on top
  113. of your block of events (used e.g. on events/events.xsl).
  114. Possible values are 'future', 'current' or 'past'. Leave blank if you
  115. don't want any header.
  116. </li>
  117. </ul>
  118. <pre class="file">&lt;xsl:with-param name="header" select="'<var>future|current|past</var>'" /&gt;</pre>
  119. <ul>
  120. <li>
  121. the <var>display-details</var> parameter says if 'yes' or 'no' you will have
  122. the text of each event displayed along with its date and title.
  123. </li>
  124. </ul>
  125. <pre class="file">&lt;xsl:with-param name="display-details" select="'<var>yes|no</var>'" /&gt;</pre>
  126. <h2>Implementing a country page</h2>
  127. <p>
  128. Implementing a country page won't take you long.
  129. <a href="/uk/uk.html">United Kingdom</a> and
  130. <a href="/de/de.html">Germany</a> country pages are a good example
  131. of what you can achieve easily and how.
  132. </p>
  133. <p>
  134. <strong>1. </strong>
  135. The very first thing to do is to create a folder with your country
  136. code, e.g. "/de", "/uk" or "/it" in the root folder of the fsfe-web
  137. svn (you will see other country folders there).<br/>
  138. You may want to copy the three common files you'll find in already
  139. existing country folders, e.g uk.en.xhtml, uk.xsl and uk.sources,
  140. and of course rename them accordingly.
  141. </p>
  142. <p>
  143. <strong>2. </strong>
  144. You should not have to modify **.sources.
  145. You want to change the <var>countrycode</var>
  146. variable in the **.xsl file to your country code, modifying the
  147. following line.
  148. <pre class="file">&lt;xsl:variable name="country-code"&gt;<var>xx</var>&lt;/xsl:variable&gt;</pre>
  149. In the **.**.xhtml page, you should only change the
  150. account, or deactivate it if your country team does not have one yet.
  151. <pre class="file">"user":"fsfeuk",</pre>
  152. Play further with this file if you want to change the display of
  153. your country page.
  154. </p>
  155. <h3>Using the country-people-list template</h3>
  156. <ul>
  157. <li>(the call to country-people-list in **.xsl is responsible for the displayed people list)</li>
  158. <li>add the <var>xx</var> tag to corresponding people in /about/people/people.en.xml, e.g.</li>
  159. </ul>
  160. <pre class="file">&lt;person id="mueller" member="yes" teams="main, de"&gt;</pre>
  161. <p>
  162. People tagged with your country code will appear in your country
  163. page's people list. (If you want to add a person that is not there yet,
  164. be careful not to add him/her to the "main" team if he/she is not
  165. a member of it).
  166. </p>
  167. <p>
  168. For people's pictures, you should put a 48*48 pixels picture in the
  169. /about/<var>id</var> folder named <var>id</var>-avatar.jpg. Then edit
  170. <var>/about/people/people.en.xml</var> and add a line for
  171. <var>avatar</var> to the picture URL.
  172. </p>
  173. <h3>Tagging author, date and download files</h3>
  174. <p>
  175. In order to give proper credits to the authors of articles you can add
  176. tags like these:
  177. </p>
  178. <pre class="file">
  179. &#60;author&#62;
  180. &#60;name&#62;John Doe&#60;/name&#62;
  181. &#60;link&#62;;/link&#62;
  182. &#60;avatar&#62;;/avatar&#62;
  183. &#60;/author&#62;
  184. &#60;!-- For FSFE team members, you can take the information directly
  185. from /about/people/people.en.xml, for instance: --&#62;
  186. &#60;author id="gerloff" /&#62;
  187. &#60;date&#62;
  188. &#60;revision content="2010-03-24" /&#62;
  189. &#60;original content="2009-11-27" /&#62;
  190. &#60;/date&#62;
  191. &#60;!-- Feel free to add more than one revision tag if see fit --&#62;
  192. &#60;download type="pdf" content="/link/to/download-file.pdf" /&#62;
  193. </pre>
  194. <p>
  195. Bear in mind that these tags should be included like any other tags, that means they should be at the end, before &#60;/html&#62;
  196. </p>
  197. </div>
  198. <!--/e-content-->
  199. </body>
  200. <sidebar promo="about-fsfe">
  201. <div id="related-content">
  202. <h3>Other howtos:</h3>
  203. <ul>
  204. <li>
  205. <a href="/contribute/web/css.html">Edit the CSS with LESS</a>
  206. </li>
  207. <li>
  208. <a href="/contribute/template.html">A template article, to use the new webdesign</a>
  209. </li>
  210. <li>
  211. <a href="/contribute/campaigns-frontpage.html">Add and select campaign banners for the frontpage</a>
  212. </li>
  213. </ul>
  214. </div>
  215. </sidebar>
  216. <tags>
  217. <tag>webmaster</tag>
  218. </tags>
  219. <timestamp>$Date: 2010-07-07 05:16:55 +0200 (Wed, 07 Jul 2010) $ $Author: hugo $</timestamp>
  220. </html>
  221. <!--
  222. Local Variables: ***
  223. mode: xml ***
  224. End: ***
  225. -->