public_html/docs/english/theme.html
author Dirk Haun <dirk@haun-online.de>
Sun, 15 Nov 2009 11:10:47 +0100
branchHEAD
changeset 7474 d560b8c577b6
parent 7459 0f9a8d809cc5
child 7492 11ffffd020e0
permissions -rw-r--r--
Added lang attribute
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
     2 <html lang="en">
     3 <head>
     4   <title>Geeklog Documentation - Theme How-To</title>
     5   <link rel="stylesheet" type="text/css" href="../docstyle.css" title="Dev Stylesheet">
     6 </head>
     7 
     8 <body>
     9 <p><a href="http://www.geeklog.net/" style="background:transparent"><img src="../images/newlogo.gif" alt="Geeklog" width="243" height="90"></a></p>
    10 <div class="menu"><a href="index.html">Geeklog Documentation</a> - Theme How-To</div>
    11 
    12 <p><small>(see below for a list of <a href="#changes">theme changes</a> in
    13 recent Geeklog versions)</small></p>
    14 
    15 
    16 <h1>Creating a Theme for Geeklog</h1>
    17 
    18 <p>Creating a theme for Geeklog is easy and quite fast. If you can
    19 manipulate HTML files then you can create a theme! There's no need to learn
    20 PHP.
    21 
    22 <h2>Creating a theme</h2>
    23 
    24 <p>First, copy an existing theme that is most similar to what you want to
    25 implement (if one exists). If what you will do is radically different (and we
    26 hope so!) then copying any one will do. Copy the existing theme to the name you
    27 want your theme to have (please, <em>no</em> spaces in the theme name):</p>
    28 
    29 <p><kbd>cp -R /path/to/geeklog/public_html/layout/professional /path/to/geeklog/public_html/layout/My_Theme_Name_No_Spaces</kbd></p>
    30 
    31 <p>Change into your new theme directory:</p>
    32 
    33 <p><kbd>cd /path/to/geeklog/public_html/layout/My_Theme_Name_No_Spaces</kbd></p>
    34 
    35 <p>Now edit the templates to suit your needs. Keep in mind that templates,
    36 generally are partial HTML files. The directory you just created holds ALL
    37 templates Geeklog needs but you will only need to modify a small few to
    38 make a huge impact on the look.</p>
    39 
    40 <p>In particular these are the templates you will undoubtedly want to
    41 change:</p>
    42 
    43 <ul>
    44 <li>header.thtml</li>
    45 <li>footer.thtml</li>
    46 <li>blockheader.thtml</li>
    47 <li>blockfooter.thtml</li>
    48 <li>storytext.thtml</li>
    49 <li>storybodytext.thtml</li>
    50 <li>featuredstorytext.thtml</li>
    51 <li>featuredstorybodytext.thtml</li>
    52 <li>archivestorytext.thtml</li>
    53 <li>archivestorybodytext.thtml</li>
    54 <li>style.css</li>
    55 </ul>
    56 
    57 
    58 <h3><a name="how-themes-work">How themes work</a></h3>
    59 
    60 <p>When rendering a theme, Geeklog starts with <tt>header.thtml</tt> which
    61 builds the site's header and then goes on to include the left column of blocks
    62 (look for the variable {left_blocks} and the <tt>leftblocks.thtml</tt> file).
    63 The middle part of a site consists of the stories which are built using the
    64 <tt>storytext.thtml</tt> and <tt>storybodytext.thtml</tt> (for normal stories)
    65 and <tt>featuredstorytext.thtml</tt> and <tt>featuredstorybodytext.thtml</tt>
    66 (for featured stories) template files. The <tt>footer.thtml</tt> file then
    67 builds the right column of blocks (variable {right_blocks}, file
    68 <tt>right_blocks.thtml</tt>) and the site's footer. Blocks themselves consist
    69 of the <tt>blockheader.thtml</tt> and <tt>blockfooter.thtml</tt> files.
    70 
    71 <p>The above only describes how Geeklog's main page and stories are rendered.
    72 More templates exist for the various editors and lists you will see in Geeklog,
    73 as well as for the calendar and almost every other part of Geeklog.</p>
    74 
    75 <p>There is currently no complete list available that explains which template
    76 file is used for which part of Geeklog. However, in most cases the use should
    77 be obvious when you have a look at the file and directory names in your theme's
    78 layout directory. If you're unsure which template file is used to render a
    79 certain part of Geeklog, have a look at the URL. You will notice the name of
    80 a PHP file there, e.g. the <tt>users.php</tt> file when you view a user's
    81 profile. Open that file and search for '<kbd>.thtml</kbd>'. For the profile
    82 you will find these lines (in <code>function userprofile()</code>):</p>
    83 <pre style="margin-left:4em;"><code>$user_templates = new Template ($_CONF['path_layout'] . 'users');
    84 $user_templates->set_file (array ('profile'=>'profile.thtml', 'row'=>'commentrow.thtml', 'strow'=>'storyrow.thtml'));</code></pre>
    85 <p>You don't need to understand PHP code to see that this uses the template
    86 files <tt>profile.thtml</tt>, <tt>commentrow.thtml</tt>, and
    87 <tt>storyrow.thtml</tt>. The first line also indicates that these are taken
    88 from the <tt>users</tt> directory within the theme's layout directory.</p>
    89 
    90 <p>An <a href="themevars.html">incomplete list of variables</a> that can be
    91 used in templates files is also included.</p>
    92 
    93 <h3><a name="testing">Testing a theme and further information</a></h3>
    94 
    95 <p>After you have edited your themes, you are now ready to test it out.
    96 Simply go to http://mygeeklogsite/usersettings.php?mode=preferences - in the
    97 theme drop-down select your newly created theme (note the name of your theme is
    98 the <em>same</em> name as the directory for your theme).
    99 
   100 <p>Finally, you may want to update the logo and other images in your
   101 theme's images directory.
   102 
   103 <p>For the template system we are using PHPLib's template class (<a
   104 href="http://phplib.sourceforge.net/">http://phplib.sourceforge.net/</a>).
   105 Read their documentation and, optionally, look at
   106 /path/to/geeklog/system/classes/template.class.php to see how it is
   107 implemented. Even with this knowledge it may not be clear which templates
   108 are used in conjunction with one another (i.e. <tt>storytext.thtml</tt> and
   109 <tt>storybodytext.thtml</tt> together make up the complete format of a
   110 <em>single</em>
   111 story). If you have questions join our mailing list at <a
   112 href="http://lists.geeklog.net/listinfo/geeklog-users">http://lists.geeklog.net/listinfo/geeklog-users</a>
   113 or check us out in IRC at irc.freenode.net in #geeklog.</p>
   114 
   115 <h3><a name="tips">Tips and tricks</a></h3>
   116 
   117 <p><strong><a name="wysiwyg">Themes and WYSIWYG editors:</a></strong>
   118 The template files used by Geeklog are not complete HTML files - they contain
   119 only parts of the HTML that Geeklog puts together to build a proper HTML
   120 document. This, however, seems to confuse some WYSIWYG HTML editors and some of
   121 them tend to add the HTML which they think is missing from the file, thus
   122 making it unusable for Geeklog.<br>
   123 We suggest you use a simple text editor to edit your themes.</p>
   124 
   125 <p><strong><a name="php">PHP in themes:</a></strong>
   126 You can use PHP in the <em>header</em> of a theme, i.e. in the
   127 <tt>header.thtml</tt> file. If you want to use custom PHP functions, you can
   128 put them in the file <tt>functions.php</tt> within your themes directory.</p>
   129 
   130 <p><strong><a name="different-look">Different look for left and right blocks:</a></strong>
   131 You can give the blocks on the left and right a different look. See
   132 <a href="http://www.geeklog.net/forum/viewtopic.php?showtopic=21070">this story on the Geeklog homepage</a> for details.</p>
   133 
   134 <p><strong><a name="polls">Polls:</a></strong>
   135 To use multi-colored bars in the graphical display of poll results, you can use
   136 the <code>{answer_counter}</code> and <code>{answer_odd}</code> variables in
   137 the <tt>pollbooth/pollvotes_bar.thtml</tt> template file.
   138 <code>{answer_counter}</code> will be replaced with a running number for each
   139 answer, hence <code>bar{answer_counter}.gif</code> would result in
   140 <tt>bar1.gif</tt>, <tt>bar2.gif</tt>, etc. Giving each of those GIFs a different
   141 color would give you a different color for each answer.<br>
   142 <code>{answer_odd}</code> will alternate between 0 and 1 for every answer, hence
   143 <code>bar{answer_odd}.gif</code> will result in <tt>bar0.gif</tt> for the first,
   144 third, fifth, etc. answer and <tt>bar1.gif</tt> for the second, fourth, etc.
   145 answer.</p>
   146 
   147 <p><strong><a name="left-blocks">Left blocks in the right column:</a></strong>
   148 <code>$_CONF['left_blocks_in_footer']</code> is a
   149 rather curious option. It makes the <code>{left_blocks}</code> variable
   150 available in the site's footer (i.e. <tt>footer.thtml</tt>) while at the same
   151 time disabling it in the header (<tt>header.thtml</tt>).<br>
   152 The idea is that this can be used for two-column layouts (one column for the
   153 blocks and one column for the content) but when you want to have the blocks
   154 on the right side. Simply moving all blocks to the right will not work as
   155 expected, as you'd end up with <em>no blocks</em> at all on those pages that
   156 normally only display the left blocks (e.g. <tt>article.php</tt> or the
   157 admin pages). Setting <code>$_CONF['left_blocks_in_footer'] = 1</code> will
   158 fix this, so that the blocks, while internally still treated as <em>left</em>
   159 blocks, will actually be displayed on the <em>right</em>.<br>
   160 The theme's <tt>header.thtml</tt>, <tt>footer.thtml</tt>, and
   161 <tt>leftblocks.thtml</tt> will probably need some adjustments. The
   162 'left_blocks_in_footer' option is therefore not available in the main
   163 configuration but should instead be set in the theme's <tt>functions.php</tt>
   164 file.  That way, you can even leave your users a choice between, for example,
   165 a "normal" theme and one with the blocks on the right.</p>
   166 
   167 <p><strong><a name="error-message">Error Message:</a></strong>
   168 Since Geeklog 1.4.1 it is possible to control what HTML is displayed to
   169 non-root users in the event of an error occurring (a crash bug). To do
   170 so, you need to change the function <code>CUSTOM_handleError</code> in
   171 lib-custom.php to output any HTML you like.</p>
   172 
   173 <p><strong><a name="permalink">Adding a "permalink" to stories:</a></strong>
   174 Many websites offer a so-called permalink, i.e. a link to a permanent URL for
   175 the story. In Geeklog's default Professional theme, the article's headline
   176 already provides the same functionality - it links to a permanent URL for the
   177 story (pointing to article.php). However, since this is not very obvious and
   178 since visitors often expect to find a "permalink" somewhere on the page, here's
   179 how to add one yourself:</p>
   180 <ol>
   181 <li>Find a place in the story template files. The "story-footer" section in
   182 <tt>storytext.thtml</tt> may be a good place since it already contains quite a
   183 few story-related links.</li>
   184 <li>Once you've found a place to put the permalink entry, enter this piece of
   185 code:<br>
   186 <code style="margin-left:2em">&lt;a href="{article_url}"&gt;{lang_permalink}&lt;a&gt;</code><br>
   187 This will add a link to the article (<code>article_url</code>) using the word
   188 "Permalink" from the current language file (<code>lang_permalink</code>).</li>
   189 <li>Try it out. Be aware that at this point, your permalink entry only shows up
   190 for non-featured articles. You may want to tweak the appearance a bit (using
   191 CSS) or move the link around.</li>
   192 <li>Add the same piece of code to the <tt>featuredstorytext.thtml</tt> and
   193 <tt>archivestorytext.thtml</tt> templates so that the link also appears for
   194 featured and archived stories.</li>
   195 </ol>
   196 
   197 
   198 <h2><a name="changes">Theme changes in Geeklog 1.6.1</a></h2>
   199 
   200 <ul>
   201 <li>Added rules for the <tt>token-expirynotice</tt> and
   202     <tt>token-expirytime</tt> ids (<em>not</em> classes!) to the stylesheet.
   203     These are used to format the new notice in the editors, informing the user
   204     when the security token will expire.</li>
   205 <li>Added an icon, <tt>images/update.png</tt>, to be displayed in the admin's
   206     list of plugins when a plugin needs to be updated. The icon should have the
   207     same size as the "edit" icon (16x16 pixel in the Professional theme).</li>
   208 <li>The Topic Editor now contains a line displaying the number of stories in
   209     the current topic. New variables in <tt>admin/topic/topiceditor.thtml</tt>:
   210     <code>{lang_num_stories}</code>, <code>{num_stories}</code></li>
   211 <li>Added a link back to the story to the "Mail Story to a Friend" form,
   212     <tt>profiles/contactauthorform.thtml</tt>. Available variables:
   213     <tt>{lang_title}</tt>, <tt>{story_title}</tt>, <tt>{story_url}</tt>,
   214     <tt>{story_link}</tt>.</li>
   215 <li>Added a "send copy to myself" option to
   216     <tt>profiles/contactauthorform.thtml</tt></li>
   217 <li>Added textarea fields for meta description and meta keywords to the Story
   218     Editor (<tt>admin/story/storyeditor.thtml</tt>,
   219     <tt>admin/story/storyeditor_advanced.thtml</tt>).</li>
   220 <li>Added textarea fields for meta description and meta keywords to the Topic
   221     Editor (<tt>admin/topic/topiceditor.thtml</tt>).</li>
   222 <li>Added a <code>{remoteservice}</code> variable in
   223     <tt>admin/user/edituser.thtml</tt> to optionally display the name of the
   224     service a Remote User was using to log in.</li>
   225 <li>Added a <code>{title_checked}</code> variable to <tt>search/searchform.thtml</tt>, so that the "Refine search" option can keep the status of the "Titles
   226     Only" checkbox.</li>
   227 <li>Moved hard-coded green color for the byline of search results in "Google"
   228     style to the stylesheet: New class <code>searchresult-byline</code>.</li>
   229 </ul>
   230 
   231 <h3>Cosmetic changes</h3>
   232 
   233 <p>These changes are mostly cosmetic and won't affect the functionality of a
   234 theme if not applied:</p>
   235 
   236 <ul>
   237 <li>Cosmetics: Made the look and layout of the "Send mail to user"
   238     (<tt>profiles/contactuserform.thtml</tt>), "Mail Story to a Friend"
   239     (<tt>profiles/contactauthorform.thtml</tt>), and "Mail Users"
   240     (<tt>admin/mail/mailform.thtml</tt>) dialogs more consistent (alignment,
   241     size of input fields).</li>
   242 <li>Cosmetics: Fixed the position of the story preview when using the
   243     advanced editor (was slightly shifted to the right, <a
   244     href="http://project.geeklog.net/tracking/view.php?id=963">bug #0000963</a>). Changes to the <code>&lt;div id="preview"&gt;</code> in
   245     <tt>admin/story/storyeditor_advanced.thtml</tt>.</li>
   246 <li>Cosmetics: Removed <code>font-size:larger;</code> for the header fields of
   247     the admin lists from the stylesheet, but added some top/bottom padding
   248     (<a href="http://project.geeklog.net/tracking/view.php?id=956">bug #0000956</a>).</li>
   249 <li>Cosmetics: Removed a <code>width="180"</code> from the Block editor template
   250     (<tt>admin/block/blockeditor.thtml</tt>) that pushed the first column too
   251     far to the right.</li>
   252 <li>Cosmetics: Made the permission checkboxes look more like an Admin list,
   253     <tt>admin/common/edit_permissions.thtml</tt>. Introduced new CSS class
   254     <tt>admin-list-smalltable</tt>, which is almost identical to
   255     <tt>admin-list-table</tt> but without the <code>width:100%;</code></li>
   256 </ul>
   257 
   258 <h3>Changes to plugin templates</h3>
   259 
   260 <p>Note that plugin template files are kept in a directory
   261 <tt>plugins/<i>pluginnname</i>/templates</tt> and not in the <tt>layout</tt>
   262 directory.</p>
   263 
   264 <ul>
   265 <li>Links: Removed a <code>width="150"</code> from the Category editor template
   266     (<tt>admin/categoryeditor.thtml</tt>) that pushed the first column too far
   267     to the right.</li>
   268 <li>Static Pages: Added new input fields for a meta description and meta
   269     keywords to the Static Pages editor.</li>
   270 <li>Static Pages: In the Static Pages editor, moved the Hits display below
   271     the Last Updated entry (<tt>admin/editor.thtml</tt>,
   272     <tt>admin/editor_advanced.thtml</tt>).</li>
   273 <li>Static Pages: Added textarea fileds for meta description and meta keywords
   274     in the Static Pages editor (<tt>admin/editor.thtml</tt>,
   275     <tt>admin/editor_advanced.thtml</tt>).</li>
   276 <li>Polls: Added new input fields for a meta description and meta keywords to
   277     the Polls editor.</li>
   278 <li>Polls: Added new CSS classes <tt>poll-autotag-message</tt>,
   279     <tt>poll-autotag</tt>, <tt>poll-autotag-left</tt>, used when embedding polls
   280     via the new autotags.</li>
   281 </ul>
   282 
   283 
   284 <h2><a name="changes160">Theme changes in Geeklog 1.6.0</a></h2>
   285 
   286 <ul>
   287 <li>Themes can now opt to use a <tt>{doctype}</tt> variable in their
   288     <tt>header.thtml</tt> instead of using a hard-coded DOCTYPE declaration.
   289     The DOCTYPE will then be set from the configuration (currently available:
   290     HTML 4.01 Strict and Transitional, XHTML 1.0 Strict and Transitional). Such
   291     a theme should <em>not</em> set the <code>XHTML</code> constant in its
   292     <tt>functions.php</tt> file!</li>
   293 <li>When using <a href="#xhtml">XHTML</a>, the variable <tt>{xmlns}</tt> now
   294     contains <tt>xmlns="http://www.w3.org/1999/xhtml"</tt> for XHTML compliance
   295     (to be used in the <tt>&lt;html&gt;</tt> element).</li>
   296 <li>Added a space between a story's intro text and body text when using the
   297     <tt>{story_text_no_br}</tt> variable.</li>
   298 <li>The story templates in the Professional theme now use
   299     <tt>{story_text_no_br}</tt> instead of <tt>{story_introtext}</tt>, i.e.
   300     there are no <tt>&lt;br&gt;</tt> tags between a story's intro text and
   301     body text any more. This allows for greater flexibility in formatting a
   302     story (e.g. when using the intro text for teasers) but may result in older
   303     stories being displayed differently now (no visible separation between intro
   304     text and body text).</li>
   305 <li>Bugfix: The variables <tt>{contributedby_user}</tt> and
   306     <tt>{contributedby_fullname}</tt> were always empty.</li>
   307 <li>The two variables <tt>{start_contributedby_anchortag}</tt> and
   308     <tt>{end_contributedby_anchortag}</tt> were not set any more (since Geeklog
   309     1.5.0). Instead, the link to the author's profile was added to
   310     <tt>{contributedby_author}</tt>, so that the combination of these three
   311     variables (as used in the story templates) still seemed to work. Geeklog
   312     1.6.0 reinstates the old definitions, i.e. the anchortag variables contain
   313     the opening and closing tag to link to the author's profile and
   314     <tt>{contributedby_author}</tt> contains only the author's name.</li>
   315 <li>New variable <tt>{photo_max_dimensions}</tt> to inform users about the
   316     max. dimensions of a userphoto: <tt>preferences/userphoto.thtml</tt></li>
   317 <li>Added a <tt>print.css</tt> stylesheet to be used by the
   318     <tt>printable.thtml</tt> template files for articles and the static pages
   319     plugin.</li>
   320 <li>The plugin editor can now show a plugin's "display name" (or a beautified
   321     version of the directory name) when using the new variable
   322     <code>{pi_display_name}</code> in <tt>admin/plugins/editor.thtml</tt>.
   323     This is a purely cosmetic change.</li>
   324 <li>New template file <tt>admin/lists/inline.thtml</tt>, used when embedding
   325     lists into an existing HTML <code>&lt;form&gt;</code> (e.g. the new Groups
   326     editor).</li>
   327 <li>Added a "send copy to myself" option to
   328     <tt>profiles/contactuserform.thtml</tt></li>
   329 <li>Cosmetic changes to the <tt>admin/mail/mailform.thtml</tt> template file:
   330     Removed <code>{startblock_email}</code> and <code>{endblock_email}</code>
   331     and the top table. These elements are now added automatically to make the
   332     the mail form look more consistent with the other admin panels.</li>
   333 <li>A new checkbox has been added to <tt>search/searchform.thtml</tt> to allow
   334     for a search in the title only.</li>
   335 <li>Cosmetic changes to the <tt>admin/group/groupmembers.thtml</tt> template
   336     file: The header (including the icon, links, and the instructions) is now
   337     generated by Geeklog. The <tt>&lt;table&gt;</tt> that contained these
   338     elements has been removed from the template file.</li>
   339 <li>Configuration: <tt>config_element.thtml</tt> was missing a closing
   340     <code>&lt;/option&gt;</code> tag; the <code>&lt;col&gt;</code> tags in
   341     <tt>configuration.thtml</tt> were not XHTML compliant.</li>
   342 </ul>
   343 
   344 <h3>Search</h3>
   345 
   346 <p>The templates for the search form and search results have been changed and
   347 new template files have been added for the new display modes of the search
   348 results. We suggest to replace the entire <tt>search</tt> subdirectory in your
   349 theme with a copy of the directory from the Professional theme as it ships
   350 with Geeklog.</p>
   351 
   352 <h3>Comments</h3>
   353 
   354 <p>The <tt>commentform.thtml</tt> and <tt>commentform_advanced.thtml</tt>
   355 template files were changed to include a security token and a
   356 <code>{notification}</code> variable (for the new option to be notified of
   357 followup comments).</p>
   358 
   359 <h3>Plugins</h3>
   360 
   361 <ul>
   362 <li>The template file for the Polls editor has been changed to allow up to 40
   363     characters for the poll id (pid):
   364     <tt>plugins/polls/templates/admin/polleditor.thtml</tt></li>
   365 <li>The <tt>printable.thtml</tt> template file for the static pages plugin now
   366     uses <tt>print.css</tt> (see above). It also uses the HTML Strict doctype
   367     now.</li>
   368 </ul>
   369 
   370 <h3>Permissions Editor</h3>
   371 
   372 <p>The various instances of the Permissions Editor (where you can set the Read
   373 / Edit permissions for Owner, Group, Members, Anonymous) were using slightly
   374 different template variable names. From now on, the following names are defined
   375 everywhere:</p>
   376 <ul>
   377 <li><tt>{lang_permissions}</tt> (headline)</li>
   378 <li><tt>{lang_perm_key}</tt> (legend: R = read, ...)</li>
   379 <li><tt>{permissions_editor}</tt> (the actual checkboxes)</li>
   380 <li><tt>{lang_permissions_msg}</tt> (Note: members is all logged in member ...)</li>
   381 </ul>
   382 <p>Template files using the alternative names will continue to work, but new
   383 files should use the above names from now on.</p>
   384 
   385 
   386 <h2><a name="changes152">Theme changes in Geeklog 1.5.2</a></h2>
   387 
   388 <p>Note: Themes made for Geeklog 1.5.0 or 1.5.1 should work just fine with
   389 Geeklog 1.5.2. In this release, we only fixed a few problems in the themes
   390 (detailed below) that also affected 1.5.0 and 1.5.1. The other changes listed
   391 here are optional.</p>
   392 
   393 <h3>Bugfixes</h3>
   394 
   395 <p>These changes are actual bugs in the template files that also exist in
   396 Geeklog 1.5.0 and 1.5.1. We recommend making these changes to all custom
   397 themes.</p>
   398 
   399 <ul>
   400 <li>The security token was missing from the trackback editor template file,
   401     <tt>admin/trackback/trackbackeditor.thtml</tt></li>
   402 <li>The <code>{start_storylink_anchortag}</code> variable in the story templates
   403     was missing the closing '&gt;'. This caused the story title to disappear
   404     on some themes. (This was a bug in Geeklog's code, so no theme changes
   405     required)</li>
   406 <li>The <code>{site_admin_url}</code> was missing from the Configuration form
   407     action in <tt>admin/config/configuration.thtml</tt>. This may have caused
   408     problems making configuration changes on some setups.</li>
   409 <li>Added a hidden <code>old_pid</code> input field to the polls editor template
   410     file, <tt>plugins/polls/templates/admin/polleditor.thtml</tt>, to fix
   411     problems when changing a poll's ID.</li>
   412 </ul>
   413 
   414 <h3>Other changes</h3>
   415 
   416 <p>These changes are optional. They fix cosmetic issues or issues that only
   417 affect some setups.</p>
   418 
   419 <ul>
   420 <li>Cosmetics: In the Professional theme, the last menu entry isn't different
   421     from the other entries, so the
   422     <code>.header-navigation-container li.last</code> rule in <tt>style.css</tt>
   423     is not needed for this theme.</li>
   424 <li>Internationalisation: The language direction variable,
   425     <code>{direction}</code>, was not available in the printer-friendly
   426     templates for articles and static pages.</li>
   427 </ul>
   428 
   429 
   430 <h2><a name="changes151">Theme changes in Geeklog 1.5.1</a></h2>
   431 
   432 <p>Note: Themes made for Geeklog 1.5.0 are mostly compatible with Geeklog 1.5.1. We only made one mandatory change (for the Configuration admin panel) - all the other changes listed below are optional or adjustments for special setups (e.g. multi-language sites, right-to-left languages). See details below.</p>
   433 
   434 <h3>Important change: Configuration</h3>
   435 
   436 <p>The JavaScript code used for the Configuration admin panel used a generic name which caused conflicts with other JavaScript code. You should update the file <tt>admin/config/config_element.thtml</tt> to make sure your theme works with Geeklog 1.5.1.</p>
   437 
   438 <h3>Multilingual blocks</h3>
   439 
   440 <p>The multi-language support for blocks introduced in Geeklog 1.5.1 relies on
   441 <em>disabled</em> blocks being swapped in dynamically. If you are using
   442 Geeklog's multi-language support, you may need to modify the piece of PHP code
   443 in your theme's <tt>functions.php</tt> so that it picks the correct templates
   444 for these multilingual blocks:</p>
   445 
   446 <pre style="margin-left:4em;"><code>$lang = COM_getLanguageId();
   447 if (empty($lang)) {
   448     $result = DB_query("SELECT onleft,name FROM {$_TABLES['blocks']} WHERE is_enabled = 1");
   449 } else {
   450     $result = DB_query("SELECT onleft,name FROM {$_TABLES['blocks']}");
   451 }</code></pre>
   452 
   453 <p>Prior to Geeklog 1.5.1, you will probably only find the first SQL request
   454 in your <tt>functions.php</tt> file.</p>
   455 
   456 <h3>Other changes</h3>
   457 
   458 <ul>
   459 <li>In Geeklog 1.5.0, the behaviour of the variable <code>{page_title}</code>
   460     (in <tt>header.thtml</tt>) changed so that it now only contains the actual
   461     page title or the site's slogan (in earlier versions, it contained both the
   462     site's name and either the page title or the site's slogan). This was done
   463     so that the combination <code>{page_title}{page_site_splitter}{site_name}</code>
   464     could be used to place the page title before the site's name for better <a
   465     href="http://en.wikipedia.org/wiki/Search_engine_optimization"
   466     class="wikipedia" title="Search Engine Optimization">SEO</a>. If you prefer
   467     to have the site's name first on the index page and the page title first on
   468     all other pages, you can now use the new variable
   469     <code>{page_title_and_site_name}</code></li>
   470 <li>In the Links plugin, links have an icon indicating that it's an external
   471     link (taking the user away from the current site). This icon did not show
   472     up properly for RTL languages (e.g Hebrew), making the link text unreadable.
   473     Since we could not find a way to make it show up properly in this case, the
   474     icon is not displayed when the text direction is switched to 'rtl'
   475     (for now).</li>
   476 <li>Added an optional <code>feed-link</code> class to be used for links to
   477     feeds (e.g. the new Story Option entry for topic feeds). In the Professional
   478     theme, a small feed icon (<tt>images/feed.png</tt>) is used as a background
   479     image for these links.</li>
   480 <li>An optional change to the <tt>comment/commentbar.thtml</tt> template file
   481     and the <code>commentbar-line2</code> class in <tt>style.css</tt> to make
   482     the "Post a comment" button float to the left and easier to see. There were
   483     no changes in functionality and other commentbar layouts will continue to
   484     work as before.</li>
   485 <li>The story template files <tt>archivestorytext.thtml</tt>,
   486     <tt>featuredstorytext.thtml</tt>, and <tt>storytext.thtml</tt> are now
   487     using the <code>{story_text_no_br}</code> variable to refer to the story
   488     text. Template files that use <code>{story_introtext}</code> here will
   489     continue to work as before.</li>
   490 </ul>
   491 
   492 
   493 <h2><a name="changes150">Theme changes in Geeklog 1.5.0</a></h2>
   494 
   495 <h3><a name="xhtml">XHTML support</a></h3>
   496 
   497 <p>Geeklog now supports XHTML compliant themes. These themes should define the
   498 following constant in their <tt>functions.php</tt> file:</p>
   499 <pre style="margin-left:4em;"><code>define('XHTML', ' /');</code></pre>
   500 <p>This will ensure that Geeklog switches to XHTML internally. If you want your
   501 theme be working both as an HTML and an XHTML theme, you should use the
   502 <code>{xhtml}</code> variable wherever XHTML requires a self-closing tag,
   503 e.g. <code>&lt;br /&gt;</code> would be written as <code>&lt;br{xhtml}&gt;</code>. If you don't plan to use the theme for HTML, feel free to hard-code your
   504 theme for XHTML only.</p>
   505 <p><strong>Note:</strong> If you're using XHTML, it is your responsibility to
   506 ensure that your site's content (stories, comments, etc.) is XHTML compliant.
   507 Geeklog does <em>not</em> convert your content to XHTML.</p>
   508 
   509 <h3><a name="story-submission">"Contribute" - User submitted stories</a></h3>
   510 
   511 <p>Geeklog 1.5.0 supports the ability for users to specify story intro text
   512   and body text seperately rather than just the intro text. This can be
   513 turned on and off by changing the templates. The files:</p>
   514 <ul>
   515     <li>submit/submitstory.thtml</li>
   516     <li>submit/submitstory_advanced.thtml</li>
   517 </ul>
   518 <p>Contain table rows containing the bodytext inputs. Simply removing these
   519 inputs returns behaviour to the original.</p>
   520 
   521 <h3><a name="admin-menu">Admin Menu, User Menu &amp; Topic List</a></h3>
   522 
   523 <p>All the above mentioned items are now lists, using <code>ul</code> and
   524 <code>li</code> tags (and a new CSS class, <tt>blocklist</tt>, to hide the list
   525 bullets). Two new template files have been added to create these blocks:</p>
   526 <ul>
   527     <li>blockheader-list.thtml</li>
   528     <li>blockfooter-list.thtml</li>
   529 </ul>
   530 <p>Please note that the <code>{blockid}</code> variable that was present in
   531 pre-release versions of Geeklog 1.5.0 has since been removed.</p>
   532 
   533 <h3><a name="gltoken">Security Changes</a></h3>
   534 
   535 <p>Many forms, particularly in the admin section of the site need a new hidden
   536 form field in order for saving the form/processing the action to work. Add:</p>
   537 
   538 <pre style="margin-left:4em;"><code>&lt;input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}&gt;</code></pre>
   539 <p>To the following templates:</p>
   540 <ul>
   541     <li>admin/block/blockeditor.thtml</li>
   542     <li>admin/block/defaultblockeditor.thtml</li>
   543     <li>admin/config/configuration.thtml (new theme file for 1.5)</li>
   544     <li>admin/group/groupeditor.thtml</li>
   545     <li>admin/group/groupmembers.thtml</li>
   546     <li>admin/mail/mailform.thtml</li>
   547     <li>admin/plugins/editor.thtml</li>
   548     <li>admin/story/storyeditor.thtml</li>
   549     <li>admin/story/storyeditor_advanced.thtml</li>
   550     <li>admin/syndication/feededitor.thtml</li>
   551     <li>admin/topic/topiceditor.thtml</li>
   552     <li>admin/trackback/pingbackform.thtml</li>
   553     <li>admin/trackback/pingform.thtml</li>
   554     <li>admin/trackback/serviceeditor.thtml</li>
   555     <li>admin/user/edituser.thtml</li>
   556     <li>comment/reportcomment.thtml</li>
   557 </ul>
   558 <p>Some plugin specific templates have also been changed, you may also need to
   559 check:</p>
   560 <ul>
   561     <li>plugins/calendar/templates/addevent.thtml</li>
   562     <li>plugins/calendar/templates/editpersonalevent.thtml</li>
   563     <li>plugins/calendar/templates/dayview/quickaddform.thtml</li>
   564     <li>plugins/calendar/templates/submitevent.thtml (<code>{hidden_fields}</code> variable)</li>
   565     <li>plugins/links/templates/admin/categoryeditor.thtml (new theme file for 1.5)</li>
   566     <li>plugins/links/templates/admin/linkeditor.thtml</li>
   567     <li>plugins/polls/templates/admin/polleditor.thtml</li>
   568     <li>plugins/staticpages/templates/admin/editor.thtml</li>
   569     <li>plugins/staticpages/templates/admin/editor_advanced.thtml</li>
   570 </ul>
   571 
   572 <h3><a name="removed">Removed Files</a></h3>
   573 
   574 <p>The following template files have been removed and are no longer needed:</p>
   575 
   576 <ul>
   577     <li>admin/lists/menufields.thtml</li>
   578     <li>admin/lists/topmenu_nosearch.thtml</li>
   579     <li>admin/plugins/newlistitem.thtml</li>
   580     <li>admin/plugins/newpluginlist.thtml</li>
   581 </ul>
   582 
   583 <h3><a name="sysmessage">System Message</a></h3>
   584 
   585 <p>The previously hard-coded CSS for the System Messages has been moved to the
   586 stylesheet (new CSS class <tt>sysmessage</tt>).</p>
   587 
   588 
   589 <h2><a name="changes141">Theme changes in Geeklog 1.4.1</a></h2>
   590 
   591 <p>The css in 1.4.1 has been changed to a wider extent. More and more layout
   592 components are beeing moved to the stylesheet so more change in looks can be
   593 achieved with less change in the files. There is a reduction of tables and DIV,
   594 and a stronger focus on semantics and consistency. Please also notice that the
   595 styles.css includes additional documentation on the use of classes now.</p>
   596 
   597 <p>As usual, any missing new theme files can simply be copied over from the
   598 default theme (Professional) that ships with Geeklog.</p>
   599 
   600 <h3>Header-Tags</h3>
   601 
   602 <p>From now on, all headlines in blocks & stories are made with header-tags. The
   603 biggest title in a story is always h1, in a block always h2.</p>
   604 
   605 <h3>Story layout</h3>
   606 <p>The blocks for stories have no more tables, and the classes have been renamed
   607 for consistency. There is a box now around the story called class "story" or
   608 "story-featured". The components inside that box are story-icons,
   609 story-information, story-body and story-footer. The title is a h1-tag. For
   610 featured stories, only the outer box has a different class, the rest has to be
   611 cascaded for changes.</p>
   612 
   613 <h3>Blocks</h3>
   614 <p>The blocks changed in the same way as the stories. There are no more tables,
   615 only one div-tag as a frame around called block-box, block-box-left or
   616 block-box-right. The title is a h2-tag and the help icon for the block is a span
   617  with a class called block-helpicon. Sub-titles in blocks have the h3-tag (such
   618  such as in the What's new or Older Stories block). The changes affect (next to
   619  styles.css) the follwing files:</p>
   620 <ul>
   621 <li>blockfooter-left.thtml</li>
   622 <li>blockfooter-related.thtml</li>
   623 <li>blockfooter-right.thtml</li>
   624 <li>blockfooter.thtml</li>
   625 <li>blockheader-left.thtml</li>
   626 <li>blockheader-message.thtml</li>
   627 <li>blockheader-related.thtml</li>
   628 <li>blockheader-right.thtml</li>
   629 <li>blockheader.thtml</li>
   630 </ul>
   631 
   632 <h3>Admin templates</h3>
   633 
   634 <p>Many of the admin template files have had minor changes to tweak appearance
   635 or functionality. If you didn't modify the admin templates in your theme, the
   636 easiest way to upgrade your theme's admin templates is to simply replace the
   637 entire 'admin' directory with the one from Geeklog's Professional theme.</p>
   638 
   639 <ul>
   640 <li>All the "delete" buttons in the admin's editors (story editor, etc.) now
   641     pop up a JavaScript confirmation box as a simple measure against
   642     accidental deletion. If you'd rather not have that confirmation box,
   643     replace the <code>{delete_option}</code> variable with
   644     <code>{delete_option_no_confirmation}</code> in the admin templates.</li>
   645 <li>The order of the save / cancel / delete buttons is now consistent across
   646     all admin template files (changed <tt>group/groupeditor.thtml</tt> and
   647     <tt>user/edituser.thtml</tt>).</li>
   648 <li>Changed the top links in <tt>lists/topmenu_nosearch.thtml</tt> and
   649     <tt>topic/topiclist.thtml</tt> to be consistent with the other admin areas
   650     (i.e. the links are no longer enclosed in square brackets).</li>
   651 <li>To enable changing the group ownership of "gldefault" blocks, the
   652     <tt>defaultblockeditor.thtml</tt> has to be changed to include a
   653     <code>{group_dropdown}</code> variable.
   654 </ul>
   655 
   656 <h3>Other theme changes</h3>
   657 
   658 <ul>
   659 <li>There was a div for spreading the with of the blocks to a minimum in the
   660     files leftblocks.thtml and rightblocks.thtml. The format of those has been
   661     transferred to the stylesheet with the class name block-bg-spreader</li>
   662 <li>The template for the Polls-plugin has renamed classes block-vote-results to
   663     poll-vote-results and block-vote to poll-vote to avoid confustion with
   664     block-related classes.</li>
   665 <li>The template files used by the Calendar plugin are now located in the
   666     plugin's directory, (<tt>/path/to/geeklog/plugins/calendar/templates</tt>),
   667     so the entire 'calendar' directory can be removed from the theme
   668     directory.<br>
   669     The <tt>submitevent.thtml</tt>, <tt>editpersonalevent.thtml</tt>,
   670     <tt>admin/eventeditor.thtml</tt>, and <tt>dayview/quickaddform.thtml</tt>
   671     have also been changed to (optionally) support entering the time in <a
   672     href="calendar.html#desc_hour_mode">24 hour mode</a>: A hidden input field
   673     "hour_mode" is now required, the am/pm dropdowns are available as variables
   674     <code>{startampm_selection}</code>, <code>{endampm_selection}</code>,
   675     <code>{ampm_selection}</code>, depending on the template file), and the
   676     dropdowns for the minutes are available as variables
   677     (<code>{startminute_options}</code>, <code>{endminute_options}</code>,
   678     <code>{minute_options}</code>, depending on the template file).</li>
   679 <li>The variables <code>{author}</code> and <code>{owner}</code> are now
   680     available in every template where an object's author (e.g. story or
   681     comment author) or owner (e.g. owner of a block) name can be displayed.
   682     They will also respect the <a
   683     href="config.html#desc_show_fullname">$_CONF['show_fullname']</a> setting,
   684     i.e. display either the user's full name or username.</li>
   685 <li>The Article Author's tag in <tt>storytext.thtml</tt> and
   686     <tt>featuredstorytext.thtml</tt> is now called
   687     <code>{contributedby_author}.</code></li>
   688 <li>To enable a remarks field in the answer to polls, the
   689     <tt>pollvotes_bar.thtml</tt>, <tt>pollansweroption.thtml</tt> and
   690     <tt>polleditor.thtml</tt> were changed. The
   691     <tt>pollvotes_bar.thtml</tt> is now colored and has two lines, a class
   692     for color coding each line and the <code>{answer_text}</code>. The
   693     <tt>polleditor.thtml</tt> has an aditional field to enter the remarks,
   694     same as the <tt>pollansweroption.thtml</tt>.
   695 <li>A user's Account Information page has been redesigned. While there were no
   696     technical changes (i.e. template files from earlier versions will still
   697     work), some options have been rearranged and a note has been added to tell
   698     the user that the current password is required to change those. Affected
   699     files in the <tt>preferences</tt> directory: <tt>profile.thtml</tt>,
   700     <tt>username.thtml</tt>, and <tt>userphoto.thtml</tt>.</li>
   701 <li>The <tt>navbar</tt> directory now contains four files,
   702     <tt>menuitem.thtml</tt>,<tt>navbar.thtml</tt>,<tt>breadcrumbs.thtml</tt>,<tt>breadcrumb_link</tt> as well as two images,
   703     <tt>button.gif</tt> and <tt>button_over.gif</tt>.</li>
   704 <li>A <a name="captcha"><code>{captcha}</code></a> variable has been added to
   705     the following files:
   706     <ul>
   707     <li><tt>comment/commentform.thtml</tt></li>
   708     <li><tt>comment/commentform_advanced.thtml</tt></li>
   709     <li><tt>profiles/contactauthorform.thtml</tt></li>
   710     <li><tt>profiles/contactuserform.thtml</tt></li>
   711     <li><tt>submit/submitstory.thtml</tt></li>
   712     <li><tt>submit/submitstory_advanced.thtml</tt></li>
   713     <li><tt>users/registrationform.thtml</tt></li>
   714     </ul>
   715     This variable is supposed to be used by a plugin that implements <a
   716     href="http://en.wikipedia.org/wiki/CAPTCHA" class="wikipedia">CAPTCHA</a>s
   717     and will simply be empty when no such plugin is installed.</li>
   718 </ul>
   719 
   720 <h3>Professional theme</h3>
   721 
   722 <p>The following changes are specific to the Professional theme. There is
   723 probably no need to port them over to other themes.</p>
   724 
   725 <ul>
   726 <li>The theme now uses CSS everywhere for spacing and dividers instead of
   727     relying on a 1x1 pixel transparent GIF image (<tt>speck.gif</tt>).</li>
   728 <li>The amount of nested tables has been reduced, e.g. in the block
   729     headers.</li>
   730 <li>Two unused template files, <tt>customlogin-header.thtml</tt> and
   731     <tt>customlogin-footer.thtml</tt>, have been removed.</li>
   732 </ul>
   733 
   734 
   735 <h2><a name="changes140">Theme changes in Geeklog 1.4.0</a></h2>
   736 
   737 <p>As usual, any missing new theme files can simply be copied over from the
   738 default theme (Professional) that ships with Geeklog.</p>
   739 
   740 <h3>Admin templates</h3>
   741 
   742 <p>Geeklog 1.4.0 comes with revamped Admin sections which required a lot of
   743 theme changes. We therefore suggest that you simply replace the entire
   744 <tt>admin</tt> directory of your theme with the <tt>admin</tt> directory
   745 from Geeklog's default theme (Professional) as it ships with Geeklog 1.4.0
   746 and apply any modfications you may have made to your Admin templates again
   747 afterwards.</p>
   748 
   749 <p><strong>Note:</strong> The new icons for "Command and Control"
   750 (<tt>moderation.php</tt>) in the Professional theme use a white background.
   751 For themes with a dark (or other non-white) background, you can <a
   752 href="http://www.geeklog.net/filemgmt/singlefile.php?lid=623">download</a> these
   753 icons as PNGs with alpha transparency (note that Internet Explorer can not
   754 display images with alpha transparency unless you include a JavaScript "<a
   755 href="http://homepage.ntlworld.com/bobosola/">hack</a>" into your theme, so you
   756 may want to convert those icons to normal transparency or simply set the
   757 background to that of your theme).</p>
   758 
   759 
   760 <h3>Advanced editor</h3>
   761 
   762 <p>To use the included advanced editor (FCKeditor) you will need the following
   763 new template files:</p>
   764 <ul>
   765 <li><tt>comment/commentform_advanced.thtml</tt> (for comments)</li>
   766 <li><tt>submit/submitstory_advanced.thtml</tt> (for story submissions)</li>
   767 <li><tt>admin/story/storyeditor_advanced.thtml</tt> (Admin's story editor)</li>
   768 <li><tt>staticpages/templates/admin/editor_advanced.thtml</tt> (for the Static
   769     Pages editor, located in <tt>/path/to/geeklog/plugins</tt>)</li>
   770 <li><tt>advanced_editor_header.thtml</tt> (included by all of the above)</li>
   771 </ul>
   772 <p>You also have to add <code>{advanced_editor}</code> to the <code>&lt;head&gt;</code> section of your theme's <tt>header.thtml</tt> file.</p>
   773 
   774 <h3>Other changes</h3>
   775 
   776 <ul>
   777 <li>The comment templates <tt>commentbar.thtml</tt> and <tt>thread.thtml</tt>
   778     have changed due to changes in the comment handling.</li>
   779 <li>New directories <tt>trackback</tt> and <tt>admin/trackback</tt> containing
   780     several new template files have been added for the trackback support.</li>
   781 <li>New variables <code>{send_trackback_link}</code>,
   782     <code>{send_trackback_url}</code>, and
   783     <code>{lang_send_trackback_text}</code> are available in the story and
   784     article template files. They provide a complete link as well as the URL and
   785     link text allowing you to send a trackback comment for the current
   786     story.</li>
   787 <li>The <tt>links</tt> and <tt>admin/link</tt> directories have been
   788     removed. Links are now a plugin and the plugin's templates can be found in
   789     <tt>/path/to/geeklog/plugins/links/templates</tt>.</li>
   790 <li>The <tt>pollbooth</tt> and <tt>admin/poll</tt> directories have been
   791     removed. Polls are now a plugin and the plugin's templates can be found in
   792     <tt>/path/to/geeklog/plugins/polls/templates</tt>.</li>
   793 <li>The <tt>preferences/profile.thtml</tt> template now has additional fields
   794     for the password change (old password, confirmation field for the new
   795     password).</li>
   796 <li>The search form, <tt>search/searchform.thtml</tt> has a new option for the
   797     number of search results per page, while the hard-coded option to search
   798     for links has been removed (since Links are in plugin now, it will show up
   799     as part of the <code>{plugin_types}</code> option).</li>
   800 <li>An additional variable, <code>{services}</code>, has to be added to the
   801     <tt>loginform.thtml</tt> template file if you plan to allow users to log in
   802     to your site using remote authentication.</li>
   803 <li>If you plan to enable Trackbacks on your site, you may want to add links to
   804     a story's trackbacks section to your story template files, e.g.
   805     <code>{start_trackbacks_anchortag}{trackbacks_with_count}{end_trackbacks_anchortag}</code>. See the Professional theme's story template files for
   806     examples.</li>
   807 <li>For the site statistics, the file <tt>stats/sitestatistics.thtml</tt> has
   808     changed (entries for the links and poll have been removed and a new entry
   809     for the number of active users has been added). There is also a new file,
   810     <tt>stats/singlesummary.thtml</tt>, that is used for plugin entries.</li>
   811 <li>The <tt>navbar</tt> directory is now part of a Geeklog theme (previously
   812     used by some plugins, e.g. the Forum plugin). It contains two files,
   813     <tt>menuitem.thtml</tt> and <tt>navbar.thtml</tt>, as well as two images,
   814     <tt>button.gif</tt> and <tt>button_over.gif</tt>.</li>
   815 </ul>
   816 
   817 
   818 <h2><a name="changes1311">Theme changes in Geeklog 1.3.11</a></h2>
   819 
   820 <p>There are no mandatory theme changes in Geeklog 1.3.11, so themes made for Geeklog 1.3.10 will work just fine without any modifications.</p>
   821 
   822 <p>A few minor additions / new options have been introduced:</p>
   823 <ul>
   824 <li>A new variable, <code>{camera_icon}</code>, can now be used in the story
   825     and comment template files to display the small camera icon (the same as in
   826     the Who's Online block) to link to the author's user profile (only if they
   827     uploaded a userphoto).</li>
   828 <li>The <code>{layout_url}</code> variable is now available in the templates
   829     for the story, link, and event submission forms.</li>
   830 <li>Also in the submission forms, a variable <code>{separator}</code> is now
   831     available in addition to the misspelled <code>{seperator}</code>
   832     variable.</li>
   833 <li>A new variable, <code>{calendar_mode}</code>, can be used in the
   834     <tt>calendar/events.thtml</tt> template file to ensure that the "add event"
   835     link will take the user to the proper event submission form for either the
   836     site calendar or the personal calendar.</li>
   837 </ul>
   838 
   839 <h2><a name="changes1310">Theme changes in Geeklog 1.3.10</a></h2>
   840 
   841 <p>General note: To upgrade your custom theme for use with Geeklog 1.3.10, you can simply copy over any new template files from the Geeklog default theme.</p>
   842 
   843 <p>The biggest change in Geeklog 1.3.10 is that we now ship it with only one
   844 default theme (the Professional theme, kindly provided by Victor B. Gonzalez)
   845 and that the previously included themes are now available as a separate
   846 download.</p>
   847 
   848 <h3>Admin templates</h3>
   849 
   850 <p>Most themes don't change the template files in the theme's <tt>admin</tt>
   851 directory, so you can often save yourself a bit of work by simply replacing
   852 the entire <tt>admin</tt> directory with the one from the Geeklog 1.3.10
   853 distribution.</p>
   854 
   855 <ul>
   856 <li>The story editor, <tt>admin/story/storyeditor.thtml</tt> includes new
   857     options for the story archiving and for editable story IDs. <em>It is
   858     recommended to make a copy of this file and re-apply any changes you may
   859     have made to your copy again afterwards!</em></li>
   860 <li>The list of polls, <tt>admin/poll/polllist.thtml</tt> now supports
   861     paging, i.e. uses the {google_paging} variable.</li>
   862 <li>The list of events uses paging and a row number now (files affected:
   863     <tt>admin/event/eventlist.thtml</tt> and
   864     <tt>admin/event/listitem.thtml</tt>).</li>
   865 <li>The plugin editor, <tt>admin/plugins/editor.thml</tt>, now displays 2
   866     version numbers for the plugin: The installed version and the (possibly
   867     differing) version of the actual code.  In the latter case, it will also
   868     display an update button.<br>
   869     The list of plugins, <tt>admin/plugins/pluginlist.thtml</tt> and
   870     <tt>admin/plugins/listitem.thtml</tt>, also displays the 2 version numbers
   871     and now supports paging when more than 25 plugins are installed.</li>
   872 <li>The topic editor, <tt>admin/topic/topiceditor.thtml</tt>, contained a
   873     hard-coded "10" for the default number of stories per pages. The new
   874     variable {default_limit} provides the actual default value now.</li>
   875 <li><tt>admin/mail/mailform.thtml</tt> has been changed to look slightly less
   876     ugly ...</li>
   877 </ul>
   878 
   879 <h3>Other templates</h3>
   880 
   881 <ul>
   882 <li>Added two new templates for the new story archive feature. This allows you
   883     to theme olderstories differently. By default Geeklog 1.3.10 ships with
   884     these template files not themed and the same as a standard story. The new
   885     template files are <ul><li>archivestorytext.thtml</li>
   886     <li>archivestorybodytext.thtml</li></ul></li>
   887 <li>Due to various changes in the comment engine, it is recommended that you
   888     copy over all the comment template files from the <tt>comment</tt> directory
   889     (<tt>comment/reportcomment.thtml</tt> is actually a new file).</li>
   890 <li>In <tt>calendar/dayview/dayview.thtml</tt>, i.e. in the calendar's day
   891     view, the hard-coded am/pm times have been replaced by variables of the
   892     form {xx_hour} (where 'xx' is 0-23).</li>
   893 <li>In the event details template, i.e. in <tt>calendar/eventdetails.thtml</tt>,
   894     the event type and an edit icon were added (this change was only made in
   895     Geeklog 1.3.10rc3).</li>
   896 <li>A "location" field was added in the user's profile: Added {lang_location}
   897     and {user_location} in <tt>users/profile.thtml</tt> and {lang_location},
   898     {lang_location_text}, and {location_value} in
   899     <tt>preferences/profile.thtml</tt>.</li>
   900 </ul>
   901 
   902 <h3>Optional changes</h3>
   903 
   904 <p>The following is a list of optional changes (mostly new variables that are
   905 now available). This information is mostly of interest for those who want to
   906 develop their own themes.</p>
   907 
   908 <ul>
   909 <li>{article_url}, i.e. the full URL to an article, is now also available in
   910     <tt>article/printable.thtml</tt>.</li>
   911 <li>In <tt>links/linkdetails.thtml</tt> the new variable {link_actual_url} now
   912     contains the actual link URL (instead of a link to Geeklog's
   913     <tt>portal.php</tt>).</li>
   914 <li>The following variables are now available in <tt>calendar/eventdetails.thtml</tt>:
   915     {event_state_name} (full name of the state), {event_state_only} and
   916     {event_state_name_only} (abbreviated and full state name without the comma),
   917     {event_edit} (link to edit the event, if allowed for the current user),
   918     {edit_icon} (same, but with the edit icon instead of a text link),
   919     {lang_event_type} and {event_type} for the event type
   920 <li>The topic image is now available through the {topic_image} variable in
   921     <tt>topicoption.thtml</tt> and <tt>topicoption_off.thtml</tt></li>
   922 <li>Several class names have been introduced so that the various lists that
   923     Geeklog uses can now be styled individually: list-feed, list-new-comments,
   924     list-new-links, list-new-plugins, list-older-stories, list-personal-events,
   925     list-site-events, list-story-options, list-whats-related (the names should
   926     be self-explanatory).<br>
   927     Use {list_class_name} to get the actual class name, and {list_class} to get
   928     class="classname".</li>
   929 <li>Several class names have been introduced so that the 2 small calendars
   930     in the calendar's month view can be styled: .smallcal, .smallcal-headline,
   931     .smallcal-week-even, .smallcal-week-odd, .smallcal-week-empty,
   932     .smallcal-day-even, .smallcal-day-odd, and .smallcal-day-empty</li>
   933 </ul>
   934 
   935 
   936 <h2><a name="changes139">Theme changes in Geeklog 1.3.9</a></h2>
   937 
   938 <ul>
   939 <li>In <tt>header.thtml</tt>, you can now use the new variable
   940     <code>{allowed_menu_elements}</code> as an alternative to using
   941     <code>{menu_elements}</code>. The new variable takes the
   942     <code>$_CONF['<i>XXX</i>loginrequired']</code> settings into account, i.e.
   943     it will only list those entries that the current user has access to.</li>
   944 <li>The <tt>admin/syndication</tt> directory, containing
   945     <tt>feededitor.thtml</tt>, <tt>listfeeds.thtml</tt>,
   946     <tt>listitem.thtml</tt>, and <tt>selecttype.thtml</tt> has been added.</li>
   947 <li>Template files <tt>comment/comment.thtml</tt> and
   948     <tt>comment/thread.thtml</tt> have been added and
   949     <tt>comment/startcomment.thtml</tt> has been changed to implement
   950     template-driven comments.<br>
   951     Please note that <tt>comment/comment.thtml</tt> was changed <em>again</em>
   952     in Geeklog 1.3.9rc2.</li>
   953 <li>A <code>{link_edit}</code> variable has been added to
   954     <tt>links/linkdetails.thtml</tt> so that admins can edit links directly
   955     from the links section.</li>
   956 <li>An "edit" icon has been added: <tt>images/edit.gif</tt>. The new variable
   957     <code>{edit_icon}</code> can be used as an alternative to
   958     <code>{edit_link}</code> in the story template files and in
   959     <tt>links/linkdetails.thtml</tt>.</li>
   960 <li>In the <tt>calendar/calendar.thtml</tt> file, the "mode" parameter has been
   961     added to the &lt;&lt; and &gt;&gt; buttons, so that users stay in their
   962     personal calendar when browsing through months.</li>
   963 <li>A new file, <tt>admin/group/groupmembers.thtml</tt>, has been added and
   964     <tt>admin/group/listitem.thtml</tt> has been changed for the new
   965     alternative option to add users to groups.</li>
   966 <li>A new file, <tt>admin/block/listside.thtml</tt>, has been added and
   967     <tt>admin/block/listitem.thtml</tt> and <tt>admin/block/listblocks.thtml</tt>
   968     have been changed for the enhanced block list.</li>
   969 <li>A <code>{google_paging}</code> variable has been added to
   970     <tt>admin/link/linklist.thtml</tt>. Also added a column number to
   971     <tt>linklist.thtml</tt> and <tt>admin/link/listitem.thtml</tt>.</li>
   972 <li>All template files where the user can enter a URL are now using a new
   973     variable, <code>{max_url_length}</code>, instead of a hard-coded number of
   974     characters for the max. length of the URL. Files affected:
   975     <tt>admin/block/blockeditor.thtml</tt>,
   976     <tt>admin/event/eventeditor.thtml</tt>,
   977     <tt>admin/link/linkeditor.thtml</tt>,
   978     <tt>admin/topic/topiceditor.thtml</tt>,
   979     <tt>submit/submitevent.thtml</tt>, <tt>submit/submitlink.thtml</tt>.</li>
   980 <li>The hard-coded <code>&amp;nbsp;</code> has been removed from the
   981     <code>{welcome_msg}</code> variable. The blank was then added to the
   982     <tt>header.thtml</tt> of the Classic, XSilver, and Yahoo themes (the other
   983     themes either look fine without it or didn't use <code>{welcome_msg}</code>
   984     in the first place).</li>
   985 <li>An extra <code>table</code> has been removed from the
   986     <tt>users/profile.thtml</tt> file of the XSilver theme so that the
   987     username now lines up properly with the other entries.</li>
   988 </ul>
   989 
   990 <h2><a name="changes138">Theme changes in Geeklog 1.3.8</a></h2>
   991 
   992 <p>Theme changes in Geeklog 1.3.8 were mostly aimed at moving as much of the
   993 hard-coded HTML into template files as possible. Other changes were made to
   994 give theme authors better control over the layout and a small portion of changes
   995 were done to incorporate new Geeklog features.</p>
   996 
   997 <h3>New template files</h3>
   998 
   999 <p>This is a list of the new files. You can safely copy these over from one of
  1000 the standard themes that ship with Geeklog (most of these files contain HTML
  1001 that was previously hard-coded into Geeklog).</p>
  1002 
  1003 <pre>adminoption_off.thtml
  1004 loginform.thtml
  1005 topicoption.thtml
  1006 topicoption_off.thtml
  1007 useroption_off.thtml
  1008 admin/database/listbackups.thtml
  1009 admin/database/listitem.thtml
  1010 admin/user/edituser.thtml
  1011 admin/user/plainlist.thtml
  1012 comment/commentbar.thtml
  1013 comment/startcomment.thtml
  1014 pollbooth/pollanswer.thtml
  1015 pollbooth/pollblock.thtml
  1016 pollbooth/pollcomments.thtml
  1017 pollbooth/pollresult.thtml
  1018 pollbooth/pollvotes_bar.thtml
  1019 pollbooth/pollvotes_num.thtml
  1020 preferences/boxesblock.thtml
  1021 preferences/commentblock.thtml
  1022 preferences/deleteaccount.thtml
  1023 preferences/digestblock.thtml
  1024 preferences/displayblock.thtml
  1025 preferences/displayprefs.thtml
  1026 preferences/excludeblock.thtml
  1027 preferences/language.thtml
  1028 preferences/privacyblock.thtml
  1029 preferences/profile.thtml
  1030 preferences/theme.thtml
  1031 preferences/username.thtml
  1032 preferences/userphoto.thtml
  1033 search/resultauthdatehits.thtml
  1034 search/resultrowenhanced.thtml
  1035 search/resultsummary.thtml
  1036 search/resulttitle.thtml
  1037 users/newpassword.thtml</pre>
  1038 
  1039 <p>Note: <tt>preferences</tt> and <tt>admin/database</tt> are new directores.</p>
  1040 
  1041 
  1042 <h3>Changed / updated template files</h3>
  1043 
  1044 <p>These files have changed since Geeklog 1.3.7, i.e. they may contain new
  1045 variables, table columns, etc. If you haven't changed these files in your
  1046 existing theme, it is probably best to simply copy them over from one of the
  1047 themes that ship with Geeklog (with the exception of <tt>style.css</tt> and
  1048 <tt>header.thtml</tt>, see below).</p>
  1049 
  1050 <pre>style.css <em>(see below)</em>
  1051 header.thtml <em>(see below)</em>
  1052 admin/block/blockeditor.thtml
  1053 admin/block/listblocks.thtml
  1054 admin/block/listitem.thtml
  1055 admin/event/eventeditor.thtml
  1056 admin/event/eventlist.thtml
  1057 admin/event/listitem.thtml
  1058 admin/group/grouplist.thtml
  1059 admin/group/listitem.thtml
  1060 admin/story/liststories.thtml
  1061 admin/topic/listitem.thtml
  1062 admin/topic/topiceditor.thtml
  1063 admin/topic/topiclist.thtml
  1064 calendar/editpersonalevent.thtml
  1065 calendar/eventdetails.thtml
  1066 search/searchform.thtml
  1067 search/searchresults.thtml
  1068 submit/submitevent.thtml
  1069 users/getpasswordform.thtml</pre>
  1070 
  1071 <p>In <tt>style.css</tt>, four classes have been added that are used in the
  1072 new search code of Geeklog 1.3.8. Instead of copying over the entire file, you
  1073 will probably only want to copy over the code for those four classes:
  1074 <tt>searchAuth</tt>, <tt>searchDate</tt>, <tt>searchHits</tt>,
  1075 <tt>highlight</tt>.</p>
  1076 
  1077 <p>If the <tt>header.thtml</tt> of your theme is using the
  1078 <tt>{menu_elements}</tt> variable, then you do <em>not</em> need to make any
  1079 changes to it. If it is not using that variable, then you will need to make one
  1080 change to it. In that case, search your <tt>header.thtml</tt> for the link
  1081 to the story submission form, i.e. something like</p>
  1082 <pre style="margin-left:4em;"><code>&lt;a href="{site_url}/submit.php?type=story"&gt;</code></pre>
  1083 <p>and change it to read</p>
  1084 <pre style="margin-left:4em;"><code>&lt;a href="{site_url}/submit.php?type=story{current_topic}"&gt;</code></pre>
  1085 
  1086 
  1087 <h3>Removed template files</h3>
  1088 
  1089 <p>If you have a file named <tt>commentheader.thtml</tt> in your theme
  1090 directory, you can safely remove it. It isn't used at all.</p>
  1091 
  1092 
  1093 <h2><a name="changes137">Theme changes in Geeklog 1.3.7</a></h2>
  1094 
  1095 <p>Please note that all the following changes are <em>optional</em>. Themes
  1096 made for Geeklog 1.3.6 will work just fine with Geeklog 1.3.7 - no changes
  1097 are necessary.</p>
  1098 
  1099 <h3>New features and improvements</h3>
  1100 
  1101 <ul>
  1102   <li>Theme-based topic icons are now supported by setting <tt>$_THEME_URL</tt>
  1103     in the theme's <tt>functions.php</tt> file. The variable should point to
  1104     a directory that has the same hierarchy as Geeklog's images directory
  1105     (note that the path to topic images is stored relative to Geeklog's
  1106     public_html directory).<br>
  1107     <strong>Example:</strong>
  1108     <code>$_THEME_URL = $_CONF['layout_url'];</code></li>
  1109   <li>The <code>$_BLOCK_TEMPLATE</code> "hack" can now be applied to the
  1110     What's Related and Story Options blocks, as well. Use
  1111     <tt>whats_related_block</tt> and <tt>story_options_block</tt> as the block
  1112     names.</li>
  1113   <li>The What's Related and Story Options blocks are now available as
  1114     separate variables using <tt>{whats_related}</tt> and
  1115     <tt>{story_options}</tt>, respectively
  1116     (the <tt>{whats_related_story_options}</tt> variable for both blocks is
  1117     still available).</li>
  1118   <li>Several new variables can now be used in the story templates, e.g.
  1119     <tt>{contributedby_fullname}</tt> for the full name of a story author and
  1120     <tt>{contributedby_photo}</tt> for his/her user photo.</li>
  1121   <li>When the new config variable <tt>$_CONF['showfirstasfeatured']</tt> is set
  1122     to 1, then the first story on <em>every</em> page is rendered using the
  1123     template files for featured stories, even when the story is not marked as
  1124     featured.</li>
  1125 </ul>
  1126 
  1127 <h3>Other changes</h3>
  1128 
  1129 <ul>
  1130   <li>The template file <tt>admin/plugins/installform.thtml</tt> has been
  1131     removed since it isn't used any more.</li>
  1132   <li>Two new <em>optional</em> template files,
  1133     <tt>admin/plugins/newpluginlist.thtml</tt> and
  1134     <tt>admin/plugins/newlistitem.thml</tt>, have been added to support
  1135     formatting of the list of plugins which haven't been installed yet. If
  1136     these files do not exist, hard-coded HTML is used to present the list.</li>
  1137   <li>The template file <tt>admin/link/listitem.thtml</tt> has been changed
  1138     so that all the links are clickable.</li>
  1139   <li><code>COM_pollResults()</code> doesn't use the side block templates any
  1140     more when called from <tt>pollbooth.php</tt>. Therefore, you can now use
  1141     different layouts whether the poll results are displayed in a side block
  1142     or on the separate poll results and comments page.</li>
  1143   <li>Removed the Normal / Archive / Refreshing drop down menus from the admin
  1144     story and poll editors of the themes that ship with Geeklog. The setting
  1145     of this dropdown isn't used in Geeklog anyway and has just confused users
  1146     in the past ... (files <tt>admin/story/storyeditor.thtml</tt> and
  1147     <tt>admin/poll/polleditor.thtml</tt>)</li>
  1148 </ul>
  1149 
  1150 
  1151 <h2><a name="changes136">Theme changes in Geeklog 1.3.6</a></h2>
  1152 
  1153 <p>There have been a lot of changes in the themes for 1.3.6 to get rid of the
  1154 last pieces of hard-coded english texts so as to make localisation easier.
  1155 Most of these changes have been made in the Admin editors (<tt>admin</tt>
  1156 directory) and the calendar (<tt>calendar</tt> directory). If you created
  1157 your own theme for an earlier version of Geeklog, we recommend that you copy
  1158 over these two directories from one of the themes that come with Geeklog
  1159 (choose one that is similar to your own theme or which it was originally based
  1160 on). It seems like most Geeklog themes didn't change these files anyway, so
  1161 this shouldn't be too much of a hassle ...</p>
  1162 
  1163 <h3>Other changes</h3>
  1164 <ul>
  1165   <li>The template file <tt>admin/mail/mailform.thtml</tt> has been added.
  1166     This form for sending emails to other users of the site was previously
  1167     hard-coded into Geeklog.<br>
  1168     If you followed the above advice and copied over the <tt>admin</tt>
  1169     directory to your theme, you got this file already.</li>
  1170   <li>Two new files <tt>menuitem_last.thtml</tt> and
  1171     <tt>menuitem_none.thtml</tt> have been added to give theme authors better
  1172     control over the items in menu bars ({menu_elements} and {plg_menu_elements}
  1173     variables in <tt>header.thtml</tt>). The template file
  1174     <tt>menuitem.thtml</tt> is now used to render the first and any following
  1175     menu items - with the exception of the last menu item, which is rendered
  1176     using <tt>menuitem_last.thtml</tt>. If there are no menu elements for a
  1177     menu bar, <tt>menuitem_none.thtml</tt> is used.</li>
  1178   <li>New files have been added and the existing files have been changed for
  1179     the links section (<tt>links</tt> directory). Again, we recommend to just
  1180     copy over those files from one of the themes that ship with Geeklog.<br>
  1181     The new files are: <tt>categoryactivecol.thtml</tt>,
  1182     <tt>categorycol.thtml</tt>, <tt>categorynavigation.thtml</tt>,
  1183     <tt>categoryrow.thtml</tt>, <tt>pagenavigation.thtml</tt></li>
  1184   <li>The user profile has been extended to include a list of the last 10
  1185     stories as well as the total numbers of stories and comments posted by that
  1186     user. Have a look at the file <tt>users/profile.thtml</tt> to see the
  1187     changes or just copy that file over from one of the themes that ship with
  1188     Geeklog. You should also copy over the file <tt>users/storyrow.thtml</tt>
  1189     which describes the block for the last 1o stories.</li>
  1190   <li>The Classic theme has been updated to have an "Edit" link (for
  1191     StoryAdmins) in every story now.<br>
  1192     Files changed: <tt>storybodytext.thtml</tt>,
  1193     <tt>featuredstorybodytext.thtml</tt></li>
  1194   <li>In the Classic and Digital Monochrome themes the "contact" link now
  1195     points to the form to send an email to the admin user instead of using a
  1196     <code>mailto:</code> link with the site's email address from the
  1197     configuration.</li>
  1198 </ul>
  1199 
  1200 <h3>CSS changes</h3>
  1201 <ul>
  1202 <li>The underscore '_' is not a valid character in CSS. Therefore, some class names used by the Geeklog calendar have been changed to use the dash '-' instead. You may need to change your stylesheet accordingly.<br>
  1203 Names that changed: <b>cal-oldday</b>, <b>cal-today</b>,
  1204 <b>cal-futureday</b>, <b>cal-nullday</b>, <b>weekview-curday</b>,
  1205 <b>weekview-offday</b></li>
  1206 <li>A new class named <b>pagenav</b> can be used to format the paged
  1207   navigation.<br>
  1208   Please note that this change was made <em>after</em> the release of Geeklog
  1209   1.3.6rc1 and affects the use of the paged navigation in
  1210   <tt>admin/user/userslist.thtml</tt> and <tt>links/links.thtml</tt>: In
  1211   1.3.6rc1, the navigation was wrapped in &lt;p&gt; tags in those files. As
  1212   of Geeklog 1.3.6 however, the function producing the navigation will wrap
  1213   it in a &lt;div&gt; automatically.</li>
  1214 </ul>
  1215 
  1216 <p><strong>Note:</strong> Theme authors are encouraged to specify a character
  1217 set in the <tt>header.thtml</tt> of their themes like this:</p>
  1218 <pre style="margin-left:4em;"><code>&lt;meta http-equiv="Content-Type" content="text/html; charset={charset}"&gt;</code></pre>
  1219 <p>Geeklog will replace the <code>{charset}</code> variable with the proper
  1220 character set based on the currently used language file. Also make sure that
  1221 you put the above line <em>before</em> the <code>&lt;title&gt;</code> tag in
  1222 the <code>&lt;head&gt;</code> section of your <tt>header.thtml</tt> file.</p>
  1223 
  1224 <div class="footer">
  1225     <a href="http://wiki.geeklog.net/">The Geeklog Documentation Project</a><br>
  1226     All trademarks and copyrights on this page are owned by their respective owners. Geeklog is copyleft.
  1227 </div>
  1228 </body>
  1229 </html>