From: Christian H. <ch...@us...> - 2002-11-26 05:58:52
|
Update of /cvsroot/gaim/web/htdocs/wiki/themes/default/templates In directory sc8-pr-cvs1:/tmp/cvs-serv7361/wiki/themes/default/templates Added Files: README actionbar.tmpl body.tmpl browse.tmpl debug.tmpl editpage.tmpl info.tmpl login.tmpl navbar.tmpl nochanges.tmpl savepage.tmpl signin.tmpl top-htmldump.tmpl top.tmpl userprefs.tmpl viewsource.tmpl Log Message: WOAH, massive commit. Sorry guys. Nothing to see here, ignore this. /me waves his hands and mesmorizes you all so you'll forget. --- NEW FILE: README --- $Id: README,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ PhpWiki distinguishes between three different templates: - template for browsing pages (default: browse.html) This template is used when viewing Wiki pages. - template for editing pages (default: editpage.html) This template is used when users edit a page by clicking on the EditText link. - template for plain messages from PhpWiki (default: message.html) This template is used when displaying search results, or when displaying error messages. The location of the template files is defined in lib/config.php The specification is relative to the index.php script. ========= Tue Sep 18 12:00:12 PDT 2001 Jeff Dairiki <da...@da...> The rest of this file is currently obsolete, and should be ignored. The template situation is in a state of flux, and will probably be changed again very soon. See lib/Template.php for more, but mostly just "stay tuned" for details. ========= Template files are regular HTML files, which contain special placeholders. Placeholders are surrounded by '###'. You must not use '###' for other purposes. Following placeholders are provided by PhpWiki: ###SCRIPTURL### This is the URL of the main PhpWiki script. All URL's referring to the Wiki itself should use this placeholder. ###PAGE### The page title. Any special HTML characters are replaced by their entities. Do not use this placeholder in links. Use ###PAGEURL### instead. ###CONTENT### The actual page content. This is either the Wikipage itself, the search result, or a message text. ###USERID### The userid of the current users. For non-authenticated users, the userid is the host name or IP number of the user. ###LOGO### URL of the phpwiki logo image. ###RCS_IDS### The RCS ids of the php source files which contributed to the current page. ###BROWSE_PAGE### The URL to use to browse the current page. ###ACTION### The leading part of the URL for performing an action on the current page. Eg. <a href="###ACTION###edit">Edit this page</a>. ###BROWSE### The leading part of the URL for browsing to another page. Eg. <a href="###BROWSE###FindPage">Edit this page</a>. ###BASE_URL### The base URL for the current page. Conditional placeholders: Placeholders that test a condition and depending on it include/omit certain HTML. These placeholders may be nested. The general syntax looks like this: Line by line: ###IF xxx### If condition 'xxx' is false, this line is omitted. ###IF !xxx### If condition 'xxx' is true, this line is omitted. Block: ###IF:xxx### .... ###ENDIF:xxx### If condition 'xxx' is false, then everything between the start and end placeholder is omitted. ###IF:!xxx### .... ###ENDIF:!xxx### If condition 'xxx' is true, then everything between the start and end placeholder is omitted. Conditions to test: ADMIN If the current user is an admin. Used in e.g. browse template to display admin buttons at the top. ANONYMOUS If the current user is not authenticated. COPY If page has a copy in the archive. Usually used to display/omit the EditCopy link in the editpage template. LOCK If current page is locked and thus cannot be edited. MINOR_EDIT_CHECKBOX If the current user is the same as the last editor of this page, this will contain the complete HTML for a checkbox, which, when checked will prevent a backup copy from being made. If the current user is different than the last editor, MINOR_EDIT_CHECKBOX will be blank. For examples see browse.html and editpage.html The following placeholders are not available for the 'MESSAGE' template: ###PAGEURL### Page title encoded for use in URLs. ###LASTMODIFIED### Date when the page was last modified. ###LASTAUTHOR### Author of latest modification. Usually this is the hostname or the IP address. ###VERSION### Revision number of the page. Note: this is also used for detecting concurrent updates to a page. See hidden input field in EDITPAGE template for how to use it. ###HITS### The hit count of the current page. ###RELATEDPAGES### The related pages list for the current page. Examples: <A HREF="###BROWSE###HomePage">the entry (default) page</A> <A HREF="###BROWSE_PAGE###">the current page</A> <A HREF="###BROWSE###FindPage">the FindPage page</A> <head><title>PhpWiki Page: ###PAGE###</title></head> See the default templates for more examples. --- NEW FILE: actionbar.tmpl --- <?php // -*-html-*- ?> <!-- $Id: actionbar.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php if (!$page->get('locked') || $user->isAdmin()) $EditB = Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")); else $EditB = Button("viewsource", _("View Source")); $Sep = $Theme->getButtonSeparator(); ?> <!-- I would like not to have to use these tables, and managed to get this stuff to work more or less correctly using CSSs float:left; and float:right;. However float:right; seems to cause MSIE4.01/NT to hang. So, we use tables... --> <table summary="Toolbar 1: Page actions and user login." width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="baseline"> <td> <div id="actionbuttons"> <?= $EditB ?> <?php if ($user->isAdmin()) { ?> <?=$Sep?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?> <?=$Sep?><?= Button('remove') ?> <?php } ?> <?=$Sep?><?= Button(_("PageHistory")) ?> <?=$Sep?><?= Button("diff") ?> <?=$Sep?><?= Button(_("Info")) ?> <?php if (defined('DEBUG') || $user->isAdmin()) { ?> <?=$Sep?><?= Button(_("DebugInfo")) ?> <!-- For debugging only, really --> <?php } ?> </div> </td> <td align="right"> <div id="signin"><?= Template('signin') ?></div> </td> </tr> </table> --- NEW FILE: body.tmpl --- <?php // -*-html-*- ?> <!-- $Id: body.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <body> <div id="navbar" class="toolbar"> <!-- The logo --> <div id="logo"><a class="wikilink" href="<?=WikiURL(HomePage)?>" ><img src="<?=$Theme->getImageURL('logo')?>" border="0" alt="<?=WIKI_NAME?>: <?=HomePage?>" align="right" /></a></div> <?php global $HIDE_TOOLBARS; if (!$HIDE_TOOLBARS) { ?> <!-- The top navigation/search bar --> <?= Template('navbar') ?> <?php } ?> <!-- Page title --> <h1><?=$HEADER?></h1> </div> <?= $CONTENT ?> <?= $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML() ?> <?php if (defined('DEBUG')) { ?><?= Template('debug') ?><?php } ?> </body> --- NEW FILE: browse.tmpl --- <?php // -*-html-*- ?> <!-- $Id: browse.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php if (! $revision->isCurrent()) { ?> <p><strong><?=_("Note:")?></strong> <?=_("You are viewing an old revision of this page.")?> <?= Button('browse', _("View the current version"), $page)?>. </p> <?php } ?> <?=$CONTENT?> <div id="actionbar" class="toolbar"> <hr class="printer" noshade="noshade" /> <p class="editdate"><?= $Theme->getLastModifiedMessage($revision) ?></p> <?php global $HIDE_TOOLBARS; if (!$HIDE_TOOLBARS) { ?> <hr class="toolbar" noshade="noshade" /> <?= Template('actionbar') ?> <?php } ?> <!-- RELATEDPAGES were here. --> </div> --- NEW FILE: debug.tmpl --- <?php // -*-html-*- ?> <!-- $Id: debug.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $t = round(getmicrotime()-$GLOBALS['debugclock'], 3); ?> <p class="debug">Page Execution took <?= $t ?> seconds</p> <div id="xhtml-validator"><a href="http://validator.w3.org/check/referer"><img id="xhtml" border="0" src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a> <a href="http://jigsaw.w3.org/css-validator/check/referer"><img id="css" border="0" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a> </div> --- NEW FILE: editpage.tmpl --- <!-- -*-html-*- --> <!-- $Id: editpage.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $WidthI = HTML::input(array('type' => 'text', 'size' => 3, 'maxlength' => 4, 'class' => "numeric", 'name' => 'pref[editWidth]', 'value' => $request->getPref('editWidth'), 'onchange' => 'this.form.submit();')); $HeightI = HTML::input(array('type' => 'text', 'size' => 3, 'maxlength' => 4, 'class' => "numeric", 'name' => 'pref[editHeight]', 'value' => $request->getPref('editHeight'), 'onchange' => 'this.form.submit();')); $s = $Theme->getButtonSeparator(); ?> <?php if (isset($PREVIEW_CONTENT)) { ?> <p><strong><?=_("Preview only! Changes not saved.")?></strong> <!-- FIXME: it would be nice to put a link to the #editarea anchor below, but it does not work currently with the <base> declared in top.tmpl. I think we need to do away with using <base> altogether... --> Please continue editing. (You'll find your <!--a href="#editarea"-->edit area<!--/a--> at the bottom of the page.) </p> <hr class="printer" noshade="noshade" /> <?= $PREVIEW_CONTENT ?> <hr class="printer" noshade="noshade" /> <?php } ?> <?= $PAGE_LOCKED_MESSAGE ?> <?= $CONCURRENT_UPDATE_MESSAGE ?> <?php if (! $IS_CURRENT) { ?> <p><strong><?=_("Warning: You are editing an old revision.")?> <?=_("Saving this page will overwrite the current version.")?></strong></p> <?php } ?> <?php /* * FIXME: Hack! * The funky URL used for the form action parameter is bogus. * This is needed, otherwise the redirect to the real browser * page won't work with some browsers. (NS4 and Mozilla 0.97 won't accept * a redirect from a page to itself.) * * <textarea wrap="virtual"> is not valid xhtml but Netscape 4 requires it * to wrap long lines. * */ ?> <form method="post" name="editpage" action="<?=WikiURL($page,array('action'=>'edit'))?>" accept-charset="<?=CHARSET?>"> <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?> <br clear="both" /> <div id="editarea-size"> <?=_("Edit Area Size:")?> <b><?=_("H")?></b> <?=$HeightI?> <b><?=_("W")?></b> <?=$WidthI?> <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript> </div> <a name="editarea" id="editarea"><?=$EDIT_TEXTAREA?></a> <!-- FIXME: fix layout, move CSS to CSS --> <div class="toolbar" style="text-align: center;"> <?=_("Summary:")?> <?=$SUMMARY_INPUT?> </div> <table summary="Toolbar: Page editing options." class="toolbar" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="middle"> <td> <?=$MINOR_EDIT_CB ?> <?=_("This is a minor change.")?><br /> <?=$NEW_MARKUP_CB?> <?=_("Use new markup")?> </td> <td align="center"> <?= $PREVIEW_B ?> <?php if ($SAVE_B) { ?> <?=$s?><?= $SAVE_B ?> <?php } ?> </td> <td align="right"> <?= $user->isSignedIn() ? '' : fmt("Author will be logged as %s.", HTML::em($user->getId())) ?> <?= Template('signin', array('FORMNAME' => 'editpage')) ?> </td> </tr> <?php if ($user->isadmin()) { ?> <tr> <td><?= $LOCKED_CB ?> <?=_("Locked")?></td> </tr> <?php } ?> </table> <hr noshade="noshade" /> <div class="wiki-edithelp"> <!-- FIXME: do we need this at all? If so, it could probably be moved to TextFormattingRules --> <p><?= fmt("See %s tips for editing.", WikiLink(_("GoodStyle"))) ?></p> <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?> </div> <?=$HIDDEN_INPUTS?> </form> --- NEW FILE: info.tmpl --- <?php // -*-html-*- ?> <!-- $Id: info.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $modifed = $Theme->formatDateTime($revision->get('mtime')); $author = $revision->get('author'); global $WikiNameRegexp; $dbi = $request->getDbh(); if (preg_match("/^$WikiNameRegexp\$/", $author) && $dbi->isWikiPage($author)) $author = WikiLink($author); $authorId = $revision->get('author_id'); $version = $revision->getVersion(); $hits = $page->get('hits'); $is_minor_edit = $revision->get('is_minor_edit') ? _("minor edit") : false; if ($minor_flag = $is_minor_edit) { $minor_flag = HTML(" ", HTML::span(array('class' => 'pageinfo-minoredit'), "(" . _("minor edit") . ")")); } /* better way to do this? */ $data = &$revision->_data; $bytes = strlen(&$data['%content']); if ($bytes < 1024 ) $size = fmt("%s bytes", $bytes); else { $kb = round($bytes / 1024, 1); $size = fmt("%s Kb (%s bytes)", $kb, $bytes); } // Count words preg_match_all('/\\w+\\W*/', &$data['%content'], $whitespacematches); if (1 == $c = count_all($whitespacematches)) $wordcount = fmt("1 word"); else $wordcount = fmt("%s words", $c); $markupVersion = ($markupVersion = $revision->get('markup')) ? fmt("Version %s", $markupVersion) : _("Original (1.2 or 1.0)"); $summary = HTML::textarea(array('name' => 'summary', 'class' => 'summary', /* use fixed dimensions? */ 'rows' => $request->getPref('editHeight')/4, 'cols' => $request->getPref('editWidth')/2, 'readonly' => 'readonly', 'wrap' => 'virtual'), /* for Netscape 4 */ $revision->get('summary')); if ($is_current = $revision->isCurrent()) { $LOCKED_CB = HTML::input(array('type' => 'checkbox', 'name' => 'edit[locked]', 'disabled' => !$user->isadmin(), 'checked' => $page->get('locked'))); // Not sure if I want to keep this... --Carsten if ($user->isadmin()) { $lockunlock = $page->get('locked') ? 'unlock' : 'lock'; $clickcheckbUrl = WikiURL($revision, array('action' => $lockunlock)); $clickcheckb = "location.href='$clickcheckbUrl'"; $LOCKED_CB->setAttr('onclick', $clickcheckb); } $label['date'] = _("Last Modified:"); $label['author'] = _("Last Author:"); $label['summary'] = _("Last Summary:"); } else { $label['date'] = _("Saved on:"); $label['author'] = _("Author:"); $label['summary'] = _("Summary:"); } $tableSummary = fmt("Statistics about %s.", $page->getName()); ?> <!-- FIXME: move table formatting to css --> <table summary="<?= $tableSummary ?>" class="pageinfo" border="0" cellspacing="0" cellpadding="3"> <?php if (!$is_current) { ?> <tr> <td align="right" class="pageinfo"><?=_("Supplanted on:")?></td> <td><?= $Theme->formatDateTime($revision->get('_supplanted')) ?></td> </tr> <?php } ?> <tr> <td align="right" nowrap="nowrap" class="pageinfo"><?= $label['date'] ?></td> <td><?= $modifed ?><?= $minor_flag ?></td> </tr><tr> <td align="right" class="pageinfo"><?= $label['author'] ?></td> <td><?= $author ?> <span class="pageinfo-authorid">(<?= $authorId ?>)</span></td> </tr><tr> <td align="right" class="pageinfo"><?=_("Page Version:")?></td> <td><?= $version ?></td> </tr><tr> <td align="right" class="pageinfo"><?=_("Markup:")?></td> <td><?= $markupVersion ?></td> </tr><tr> <td align="right" class="pageinfo"><?=_("Size:")?></td> <td><?= $wordcount ?>, <?= $size ?></td> <?php if ($is_current) { ?> </tr><tr> <td align="right" class="pageinfo"><?= _("Hits:") ?></td> <td><?= $hits ?></td> <?php } ?> </tr><tr> <td align="right" valign="top" class="pageinfo"><?= $label['summary'] ?></td> <td><?= $summary ?></td> <?php if ($is_current) { ?> </tr><tr> <td align="right"><?= $LOCKED_CB ?></td> <td class="pageinfo"><?=_("Locked")?></td> <?php } ?> </tr> </table> --- NEW FILE: login.tmpl --- <?php // -*-html-*- ?> <!-- $Id: login.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <!-- The login form --> <?php if ($fail_message) { ?> <p><strong><?=$fail_message?></strong></p> <hr noshade="noshade" /> <?php } ?> <?php if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) { echo '<p>', _("You may sign in using any WikiWord as a UserId. (ÀÖØöøÿßö etc. may be used too). The UserId will be used as a link in RecentChanges to your UserId page, your HomePage. You do not need to enter a password."), '</p>'; } ?> <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="login"> <table cellspacing="4"> <tr> <td align="right"><?= _("UserId") ?>:</td> <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td> </tr> <tr> <td align="right"><?= _("Password") ?>:</td> <td><input type="password" name="auth[password]" size="12" maxlength="256" /></td> </tr> <tr><td align="center" colspan="2"> <?=Button("submit:", _("Sign In"), 'wikiaction')?> <?php if (!$require_level) { ?> <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?> <?php } ?> </td></tr> </table> <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" /> <input type="hidden" name="auth[login]" value="1" /> <?= HiddenInputs($request->getArgs()) ?> </form> <script language="JavaScript" type="text/javascript"> <!-- // Really there's got to be a simpler way to do this.... function select_input (type) { var elements = document.forms['login'].elements; for (var i = 0; i < elements.length; i++) { if (elements[i].type == type) { elements[i].focus(); return; } } } select_input('<?= $userid ? "password" : "text" ?>'); //--> </script> --- NEW FILE: navbar.tmpl --- <?php // -*-html-*- ?> <!-- $Id: navbar.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $s = $Theme->getButtonSeparator(); ?> <!-- The top navigation/search bar --> <form action="<?= WikiURL(_("TitleSearch"))?>" method="get" accept-charset="<?=CHARSET?>"> <div id="navbuttons"> <?= WikiLink(_("RecentChanges"), "button") ?> <?=$s?><?= WikiLink(_("FindPage"), "button") ?> <?=$s?><input type="hidden" name="auto_redirect" value="1" /> <input type="text" name="s" size="12" maxlength="256" title='<?=_("Quick Search")?>' onmouseover="window.status='<?=_("Quick Search")?>'; return true;" onmouseout="window.status=''; return true;" /> <?php if (!empty($revision)) { ?> <?=$s?><?= Button(_("LikePages")) ?> <?=$s?><?= Button(_("BackLinks")) ?> <?php } ?> <?php if (!empty($user) && $user->isAdmin()) { ?> <?=$s?><?= WikiLink(_("PhpWikiAdministration"), "button") ?> <?php } ?> </div> </form> --- NEW FILE: nochanges.tmpl --- <?php // -*-html-*- ?> <!-- $Id: nochanges.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php if ($request->getArg('lockchanged')) $LockChangedMsg = ($page->get('locked')) ? _("Page now locked.") : _("Page now unlocked."); else $LockChangedMsg = ""; ?> <p><strong><?=_("Edit aborted.")?></strong> <?=_("You have not made any changes so no new version has been saved.")?></p> <?=$LockChangedMsg?> <?= Template('browse') ?> --- NEW FILE: savepage.tmpl --- <?php // -*-html-*- ?> <!-- $Id: savepage.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $signatureURL = $Theme->getImageURL('signature'); if ($request->getArg('lockchanged')) $LockChangedMsg = ($page->get('locked')) ? _("Page now locked.") : _("Page now unlocked."); else $LockChangedMsg = ""; ?> <p><?=fmt("Thank you for editing %s.", WikiLink($page))?><br /> <?=_("Your careful attention to detail is much appreciated.")?></p> <?php if (!empty($WARNINGS)) { ?> <p><strong><?=_("Warning!")?></strong> <?= $WARNINGS ?></p> <?php } ?> <?php if ($signatureURL) { ?> <p><img src="<?=$signatureURL?>" id="signature" /></p> <?php } ?> <?=$LockChangedMsg?> <hr noshade="noshade" /> <?= Template('browse') ?> --- NEW FILE: signin.tmpl --- <?php // -*-html-*- ?> <!-- $Id: signin.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $Sep = $Theme->getButtonSeparator(); $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction'); if (empty($FORMNAME)) $FORMNAME = 'signin'; else $NOFORM = true; ?> <?php if (empty($NOFORM)) { ?> <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>"> <?= HiddenInputs($request->getArgs()) ?> <?php } ?> <?php if ($user->isSignedIn()) { ?> <?= fmt("You are signed in as %s", WikiLink($user->getId(), 'auto')) ?> <?=$Sep?> <script language="JavaScript" type="text/javascript"><!-- document.write('<input type="hidden" name="auth[logout]" value="0" />'); function SignOut() { document.forms["<?=$FORMNAME?>"].elements["auth[logout]"].value = 1; document.forms["<?=$FORMNAME?>"].submit(); } document.write('<?=$SignOutB?>'); // --> </script> <noscript> <?= Button("submit:auth[logout]", _("Sign Out"), 'wikiaction') ?> </noscript> <?php } else { ?> <?php $SignInInput = HTML::input(array('type' => 'text', 'name' => "auth[userid]", 'size' => 12, 'maxlength' => 256, 'onchange' => "this.form.submit();")); $SignInInput->addTooltip(_("Enter your UserId to sign in")) ?> <script language="JavaScript" type="text/javascript"><!-- document.write("<small><?=_("Sign In")?></small> "); // --></script> <?= $SignInInput ?> <noscript> <?=Button("submit:auth[login]", _("Sign In"), 'wikiaction')?> </noscript> <?php } ?> <?php if (empty($NOFORM)) { ?> </form> <?php } ?> --- NEW FILE: top-htmldump.tmpl --- <?php // -*-html-*- /* $Id: top-htmldump.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ * * This template is used only for html file dumps, and is responsible mainly for the outer level <html> stuff and the and <head>. */ printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- $Id: top-htmldump.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" /> <?php /** * Additional navigation links are provided here in the html header for browsers * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??). * * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK * http://www.euronet.nl/~tekelenb/WWW/LINK/index.html */ ?> <link rel="home" title="<?=HomePage?>" href="<?=WikiURL(HomePage)?>" /> <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" /> <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" /> <?php $wikiadminName = _("The PhpWiki Programming Team"); $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam"; ?> <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" /> <?= $Theme->getCSS() ?> <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title> </head> <?= Template('body') ?> <!-- phpwiki source: <?=$RCS_IDS?> --> </html> --- NEW FILE: top.tmpl --- <?php // -*-html-*- /* $Id: top.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ * * This template is responsible mainly for the outer level <html> stuff and the and <head>. */ printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- $Id: top.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET?>" /> <?php $ROBOTS_CONTENT = $ROBOTS_META ? $ROBOTS_META : "noindex,nofollow"; ?> <meta name="robots" content="<?= $ROBOTS_CONTENT ?>" /> <meta name="keywords" content="<?=split_pagename($page->getName())?>, <?=WIKI_NAME?>" /> <?php if (!empty($PAGE_DESCRIPTION)) { ?> <meta name="description" content="<?=$PAGE_DESCRIPTION?>" /> <?php } ?> <meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" /> <base href="<?=BASE_URL?>" /> <?php /** * Additional navigation links are provided here in the html header for browsers * which support them: Mozilla, iCab, Amaya (and certain versions of Opera??). * * See http://www.w3.org/TR/html401/struct/links.html#edef-LINK * http://www.euronet.nl/~tekelenb/WWW/LINK/index.html */ ?> <link rel="shortcut icon" href="<?=$Theme->getImageURL('favicon.ico')?>" /> <link rel="home" title="<?=HomePage?>" href="<?=WikiURL(HomePage)?>" /> <link rel="help" title="<?=_("HowToUseWiki")?>" href="<?=WikiURL(_("HowToUseWiki"))?>" /> <link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" /> <?php $wikiadminName = _("The PhpWiki Programming Team"); $wikiadminUrl = "http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammingTeam"; ?> <link rel="author" title="<?= $wikiadminName ?>" href="<?= $wikiadminUrl ?>" /> <link rel="search" title="<?=_("FindPage")?>" href="<?=WikiURL(_("FindPage"))?>" /> <?php /** * Provide alternate variations of the page content: * 'viewsource' and 'browse'. * RSS or translated pages could go here too. */ if (!empty($revision)) { $args = $request->getargs(); $action = $args['action']; if (!($action == "viewsource")) { $alternatelinkTitle = fmt("%s: %s",_("View Source"), $page->getName()); $alternatelinkUrl = WikiURL($revision, array('action' => 'viewsource')); } if (!($action == "browse")) { $alternatelinkTitle = $page->getName(); $alternatelinkUrl = WikiURL($revision, array('action' => 'browse')); } ?> <link rel="alternate" title="<?= $alternatelinkTitle ?>" href="<?= $alternatelinkUrl ?>" /> <?php } ?> <?php /** * Add some user-specific links. */ ?> <?php if (!$user->isSignedIn()) { /* For users not signed in */ ?> <link rel="bookmark" title="<?=_("SandBox")?>" href="<?=WikiURL(_("SandBox"))?>" /> <link rel="bookmark" title="<?=_("WikiWikiWeb")?>" href="<?=WikiURL(_("WikiWikiWeb"))?>" /> <?php } ?> <?php if ($user->isadmin()) { /* Only for the Administrator */ ?> <link rel="bookmark" title="<?=_("PhpWikiAdministration")?>" href="<?=WikiURL(_("PhpWikiAdministration"))?>" /> <?php } ?> <?php if ($user->isSignedIn()) { /* For signed-in users */ ?> <link rel="bookmark" title="<?=_("UserPreferences")?>" href="<?=WikiURL(_("UserPreferences"))?>" /> <?php /* User's calendar page */ $UserCalPageTitle = $user->getId() . "."._("Calendar"); $UserCalPageUrl = WikiURL($UserCalPageTitle); ?> <link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" /> <?php /* Today's calendar page for the user if it exists */ $UserCalPageTodayTitle = $UserCalPageTitle .".". strftime("%Y-%m-%d", time()); //FIXME $dbi = $request->getDbh(); if ($dbi->isWikiPage($UserCalPageTodayTitle)) { $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle); ?> <link rel="bookmark" title="<?= $UserCalPageTodayTitle ?>" href="<?= $UserCalPageTodayUrl ?>" /> <?php } ?> <?php } //end of links for signed-in user ?> <?= $Theme->getCSS() ?> <title><?=WIKI_NAME?> - <?=AsString($TITLE)?></title> </head> <?= Template('body') ?> <!-- phpwiki source: <?=$RCS_IDS?> --> </html> --- NEW FILE: userprefs.tmpl --- <?php // -*-html-*- ?> <!-- $Id: userprefs.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php $time = time(); $offset = $request->getPref('timeOffset') * 3600; $serverTime = $time - $offset; $timeOffsetInput = HTML::input(array('type' => "text", 'size' => 6, 'maxlength' => 6, 'name' => "pref[timeOffset]", 'class' => "numeric", 'value' => $request->getPref('timeOffset'))); $RelativeDatesCB = HTML(HTML::input(array('type' => 'hidden', 'name' => 'pref[relativeDates][]', 'value' => '0')), HTML::input(array('type' => 'checkbox', 'name' => 'pref[relativeDates][]', 'value' => '1', 'checked' => (bool) $request->getPref('relativeDates')))); ?> <form action="<?=WikiURL($page)?>" method="post"> <input type="hidden" name="pagename" value="<?=$request->getArg('pagename')?>" /> <h2><?=_("Edit Area Size")?></h2> <p><?=_("Height")?> <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" value="<?=$request->getPref('editHeight')?>" /> <?=_("Width")?> <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" value="<?=$request->getPref('editWidth')?>" /> </p> <p><?=_("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.")?></p> <h2><?=_("Time Zone")?></h2> <p> <?=fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput)?> </p> <p> <?=fmt("The current time at the server is %s.", HTML::strong($Theme->formatDateTime($serverTime)))?> <?=fmt("With the current offset, this would be reported as %s.", HTML::strong($Theme->formatDateTime($time)))?> </p> <h2><?=_("Date Format")?></h2> <p><?=$RelativeDatesCB?> <?=_("Show relative dates using 'Today' and 'Yesterday'.")?> </p> <hr /> <p><?=Button("submit:", _("Update Preferences"), 'wikiaction')?></p> </form> --- NEW FILE: viewsource.tmpl --- <?php // -*-html-*- ?> <!-- $Id: viewsource.tmpl,v 1.1 2002/11/26 05:58:48 chipx86 Exp $ --> <?php if ($page->get('locked') && !$user->isAdmin()) { ?> <p><strong><?=_("Note:")?></strong> <?=_("This page has been locked by the administrator and cannot be edited.")?> </p> <?php } ?> <?php if (! $revision->isCurrent()) { ?> <p><?=_("You are viewing an old revision of this page.")?> <?= Button('edit', _("View the current version"), $page) ?>. </p> <?php } ?> <!-- Dummy form else NS4 does not like the textarea --> <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>"> <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?> <br clear="both" /> <!-- wrap=virtual is not HTML4, but without it NS4 does not wrap long lines --> <textarea class="wikiedit" name="content" rows="<?=$request->getPref('editHeight')?>" cols="<?=$request->getPref('editWidth')?>" readonly="readonly" wrap="virtual"><?= $PAGE_SOURCE ?></textarea> <div id="actionbar" class="toolbar"> <hr class="printer" noshade="noshade" /> <p class="editdate"><?= $Theme->getLastModifiedMessage($revision) ?></p> <hr class="toolbar" noshade="noshade" /> <?= Template('actionbar') ?> <!-- RELATEDPAGES were here. --> </div> <?= HiddenInputs($request->getArgs()) ?> </form> |