Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/ https://fsfe.org
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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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="https://en.wikipedia.org/wiki/CamelCase">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 fsfe.org!</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 identi.ca
  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;http://johndoe.me&#60;/link&#62;
  182. &#60;avatar&#62;http://johndoe.me/me.png&#60;/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. -->