From: <var...@us...> - 2008-08-22 13:18:43
|
Revision: 6189 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6189&view=rev Author: vargenau Date: 2008-08-22 13:18:48 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Added Gforge theme Added Paths: ----------- trunk/themes/gforge/ trunk/themes/gforge/buttons/ trunk/themes/gforge/images/ trunk/themes/gforge/pgsrc/ trunk/themes/gforge/pgsrc/UpLoad trunk/themes/gforge/templates/ trunk/themes/gforge/templates/actionbar.tmpl trunk/themes/gforge/templates/body.tmpl trunk/themes/gforge/templates/browse-footer.tmpl trunk/themes/gforge/templates/editpage.tmpl trunk/themes/gforge/templates/head.tmpl trunk/themes/gforge/templates/html.tmpl trunk/themes/gforge/templates/info.tmpl trunk/themes/gforge/templates/login.tmpl trunk/themes/gforge/templates/navbar.tmpl trunk/themes/gforge/templates/pagelink.tmpl trunk/themes/gforge/templates/userprefs.tmpl Added: trunk/themes/gforge/pgsrc/UpLoad =================================================================== --- trunk/themes/gforge/pgsrc/UpLoad (rev 0) +++ trunk/themes/gforge/pgsrc/UpLoad 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,23 @@ +Date: Mon, 22 Aug 2008 10:28:55 -0500 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20070828) +Content-Type: application/x-phpwiki; + pagename=UpLoad; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +This page allows you to upload files that can later be used in the wiki. It is especially useful for uploading images. + +You give access to the uploaded file with the following syntax: +* *~[~Upload:my_image.gif]* inlines the image +* *~Upload:my_image.gif* shows a plain link +* *~[ my image | ~Upload:my_image.gif ]* shows the image under a link named "my image". + +The uploaded files will be publicly accessible. They are stored in the Webdav subdirectory *www/uploads*. They can be used in the wiki, in the project web site and in blocks. + +A link to the uploaded file will be displayed on this page. You can edit the page to remove the link if you like. + +<?plugin UpLoad ?> + +---- +[CategoryActionPage] Property changes on: trunk/themes/gforge/pgsrc/UpLoad ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/actionbar.tmpl =================================================================== --- trunk/themes/gforge/templates/actionbar.tmpl (rev 0) +++ trunk/themes/gforge/templates/actionbar.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,136 @@ +<?php // -*-php-*- +rcs_id('$Id$'); +?> + +<?php +$curuserprefs = $user->getPreferences(); +$dbh = $request->getDbh(); +$isAdmin = $user->isAdmin(); +$pagename = $page->getName(); +$isActionPage = $request->_isActionPage($pagename, false); +$isBrowse = $request->getArg('action') == 'browse'; +?> + + <div id="actionbuttons"> + <table cellpadding="0" cellspacing="0"> + <tr> + + <?php if (!string_ends_with($pagename, _("/Discussion"))) { ?> + <?php $talk = new WikiPageName('Talk:'.$pagename); ?> + <td class="bold"> + <?= Button(array(), + $isActionPage ? _("Action Page") : _("Page"), + $talk->getParent(), array('title' => "Page")) ?> + </td> + <td class="spacer"> </td> + <?php if (!$isActionPage) { ?> + <?php if ($dbh->isWikiPage($talk->getName())) { ?> + <td> + <?= Button(array('action'=>'browse'), _("Discussion"), $talk->getName()) ?> + </td> + <?php } else { ?> + <td> + <?= Button(array('action'=>'create', + 'template'=>_("TemplateTalk")), + _("Discussion"), $talk->getName()) ?> + </td> + <?php } ?> + <?php } ?> + <?php } else { + $talk = new WikiPageName($pagename); ?> + <td> + <?= Button(array(),$isActionPage ? _("Action Page") : _("Page"), $talk->getParent(), array('title' => "View the page")) ?> + </td> + <td class="spacer"> </td> + <td class="bold"> + <?= Button(array(),_("Discussion"), $talk->getName()) ?> + </td> + <?php } ?> + + <td class="spacer"> </td> + <td class="spacer"> </td> + + <?php if ((mayAccessPage('edit', $page->getName())) and $revision) { ?> + <td class="bold"><?= Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?></td> + <?php } else { ?> + <td><?= Button("viewsource", _("View Source")) ?></td> + <?php } ?> + + <td class="spacer"> </td> + + <td><?= Button("PageHistory", _("History")) ?></td> + + <?php if ($curuserprefs->get('diffMenuItem')) { ?> + <td class="spacer"> </td> + <td><?= Button("diff", _("Last Difference")) ?> </td> + <?php } ?> + + <?php if ($curuserprefs->get('revertMenuItem')) { ?> + <td class="spacer"> </td> + <td><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?></td> + <?php } ?> + + <td class="spacer"> </td> + <td><?= Button("PageInfo", _("Page Info")) ?></td> + + <td class="spacer"> </td> + <td><?= Button(array('action'=>'BackLinks'), _("Back Links"),$page->getName()) ?></td> + + <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> + <?php if ($curuserprefs->get('pdfMenuItem')) { ?> + <td class="spacer"> </td> + <td><?= Button("pdf") ?></td> + <?php } ?> + <?php } ?> + + <td class="spacer"> </td> + <td class="spacer"> </td> + + <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?> + <?php if ($curuserprefs->get('lockMenuItem')) { ?> + <?php if ($page->get('locked')) { ?> + <td><?= Button('unlock', _("Unlock")) ?></td> + <?php } else { ?> + <td><?= Button('lock', _("Lock")) ?></td> + <?php } ?> + <td class="spacer"> </td> + <?php } ?> + + <?php if (ENABLE_PAGEPERM and mayAccessPage('change', $page->getName())) { ?> + <?php if ($curuserprefs->get('chownMenuItem')) { ?> + <td><?= Button('chown', _("Change Owner")) ?></td> + <td class="spacer"> </td> + <?php } ?> + + <?php if ($curuserprefs->get('setaclMenuItem')) { ?> + <td><?= Button('setacl', _("Access Rights")) ?></td> + <td class="spacer"> </td> + <?php } ?> + <?php } ?> + <?php } ?> + + <?php if (($user->isAdmin() or mayAccessPage('rename', $page->getName())) && $revision) { ?> + <td><?= Button('rename', _("Rename")) ?></td> + <td class="spacer"> </td> + <?php } ?> + + <?php if (($user->isAdmin() or mayAccessPage('remove', $page->getName())) && $revision) { ?> + <td><?= Button('remove', _("Remove")) ?></td> + <td class="spacer"> </td> + <?php } ?> + +<?php if ((DEBUG and $request->getArg('action') == 'browse') || $user->isAdmin()) { ?> + <!-- Buttons really only for debugging --> +<?php + if (DEBUG & _DEBUG_SQL and USECACHE) { + $PurgeCache = Button(array('nocache' => 'purge'), + _("PurgeHtmlCache"), $page->getName()); + $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); +?> + <td><?= $PurgeCache ?></td> +<?php } ?> + <!-- End debugging buttons --> +<?php } ?> + </tr> + </table> + </div> Property changes on: trunk/themes/gforge/templates/actionbar.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/body.tmpl =================================================================== --- trunk/themes/gforge/templates/body.tmpl (rev 0) +++ trunk/themes/gforge/templates/body.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,22 @@ +<table width="100%" cellpadding="0" cellspacing="0"> +<tr> +<td valign="top"> +<?php +global $HIDE_TOOLBARS; +if (!$HIDE_TOOLBARS) { +?> +<div class="toolpalettes"> +<div class="toolbar"> +<?= Template('actionbar') ?> +</div> +</div> +<?php } ?> +<div id="content"> +<h1><?= $HEADER ?></h1> +<br /> +<?= $CONTENT ?> +</div> +</td> +</tr> +</table> +<?= Template('bottom') ?> Property changes on: trunk/themes/gforge/templates/body.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/browse-footer.tmpl =================================================================== --- trunk/themes/gforge/templates/browse-footer.tmpl (rev 0) +++ trunk/themes/gforge/templates/browse-footer.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,5 @@ +<?php // -*-html-*- + rcs_id('$Id$'); +?> +<hr class="printer" noshade="noshade" /> +<p class="editdate"><?= $WikiTheme->getOwnerMessage($page) ?> <?= $WikiTheme->getLastModifiedMessage($revision) ?> <?= $WikiTheme->getAuthorMessage($revision) ?></p> Property changes on: trunk/themes/gforge/templates/browse-footer.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/editpage.tmpl =================================================================== --- trunk/themes/gforge/templates/editpage.tmpl (rev 0) +++ trunk/themes/gforge/templates/editpage.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,128 @@ +<!-- -*-html-*- --> +<!-- $Id$ --> +<?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... --> + <?= fmt("Please continue editing. (You'll find your %s at the bottom of the page.)", + /* HTML::a(array("href" => "#editarea"), */ _("edit area") /*) */) ?> + </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.) + */ ?> +<form method="post" id="editpage" name="editpage" + action="<?= $request->getPostURL() ?>" + accept-charset="<?=CHARSET?>"> + <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?> + <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?> + <br clear="all" class="clear-floats" /> + <table width="100%"> + <tr><td><?= $EDIT_TOOLBAR ?></td> + <td align="right"><div id="editarea-size"> + <?=_("Size").':'?> + <label for="pref-editHeight"><b><?=_("H")?></b></label> <?=$HEIGHT_PREF?> + <label for="pref-editWidth"><b><?=_("W")?></b></label> <?=$WIDTH_PREF?> + <noscript><?=Button("submit:", _("Adjust"), 'wikiaction')?></noscript> + </div></td></tr></table> +<?php if (!empty($WYSIWYG_B)) { ?> + <br /><div class="hint"><strong>Warning:</strong> Switching to the Wysiwyg editor will not keep your changes.</div> +<?php } ?> + <a name="editarea"></a><?=$EDIT_TEXTAREA?> +<!-- FIXME: fix layout, move CSS to CSS --> +<div class="toolbar" style="text-align: center;"> + <label for="edit-summary"><?=_("Summary").':'?></label> <?=$SUMMARY_INPUT?> +</div> +<?php if (ENABLE_CAPTCHA) { ?> +<div class="toolbar" style="text-align: center;"> + <?php echo $CAPTCHA_IMAGE ?><br/> + <?php echo $CAPTCHA_LABEL ?><?= $CAPTCHA_INPUT ?> +</div> +<?php } ?> +<table summary="Toolbar: Page editing options." class="toolbar" width="100%" + cellpadding="0" cellspacing="0" border="0"> +<tr valign="middle"> + <td> + <?=$MINOR_EDIT_CB ?> <label for="edit-minor_edit"><?=_("This is a minor change.")?></label><br /> + <?=$OLD_MARKUP_CB?> <label for="useOldMarkup"><?=_("Use old markup")?></label> <?=$OLD_MARKUP_CONVERT?> + </td> + <td align="center"> + <?php if (!empty($WYSIWYG_B)){ ?> + <?=$WYSIWYG_B?> + <?=$SEP?> + <?php } ?> + <?= $PREVIEW_B ?> + <?php if ($SAVE_B) { ?> + <?=$SEP?><?= $SAVE_B ?> + <?php } ?> + <?=$SEP?><?= $CHANGES_B ?> + </td> + <td> <?=$AUTHOR_MESSAGE?></td> +</tr> +<tr> + <td> + <?php if ($user->isAdmin()) { ?> + <?= $LOCKED_CB ?> <label for="edit-locked"><?=_("Locked")?></label> + <?php } ?> + </td> + <td colspan="2" align="right"> + <?php if (!$user->isAuthenticated()) { ?> + <?= Template('signin', array('FORMNAME' => 'editpage')) ?> + <?php } ?> + </td> +</tr> +</table> +<?=$HIDDEN_INPUTS?> +</form> +<div style="width:100%;text-align:center;"><?php /*plugin UpLoad autolink=0 mode=edit size=30 */?></div> + +<hr noshade="noshade" /> + +<script language="JavaScript1.3" type="text/javascript"> +<!-- +function showOldMarkupRules(show) { + if (document.getElementById) { + if (!show) { + document.getElementById('newMarkup').style.display="block"; + document.getElementById('oldMarkup').style.display="none"; + } else { + document.getElementById('newMarkup').style.display="none"; + document.getElementById('oldMarkup').style.display="block"; + } + } +} +// --> +</script> + +<div id="oldMarkup" class="wiki-edithelp"> +<!-- FIXME: do we need this at all? If so, it could probably be moved to TextFormattingRules --> +<?plugin IncludePage page=_("Help/OldTextFormattingRules") section=_("Synopsis") quiet=1?> +</div> +<div id="newMarkup" class="wiki-edithelp"> +<!-- FIXME: do we need this at all? If so, it could probably be moved to TextFormattingRules --> +<?plugin IncludePage page=_("Help/TextFormattingRules") section=_("Synopsis") quiet=1?> +</div> + +<script type="text/javascript"> +<!-- +if (document.getElementById) { + showOldMarkupRules(document.getElementById('useOldMarkup').checked); +} +// --> +</script> Property changes on: trunk/themes/gforge/templates/editpage.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/head.tmpl =================================================================== --- trunk/themes/gforge/templates/head.tmpl (rev 0) +++ trunk/themes/gforge/templates/head.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,119 @@ +<?php // -*-html-*- + rcs_id('$Id$'); +?> +<head> +<?php if (ENABLE_XHTML_XML and strstr($request->get('HTTP_ACCEPT'),'application/xhtml+xml')) { ?> +<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?=$charset?>" /> +<?php } else { ?> +<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" /> +<?php } ?> +<meta http-equiv="content-language" content="<?=$GLOBALS['LANG']?>" /> +<meta http-equiv="Content-Style-Type" content="text/css" /> +<?php $ROBOTS_CONTENT = isset($ROBOTS_META) ? $ROBOTS_META : "noindex,nofollow"; ?> +<meta name="robots" content="<?= $ROBOTS_CONTENT ?>" /> +<?php if (!empty($PAGE_DESCRIPTION)) { ?> +<meta name="description" content="<?=$PAGE_DESCRIPTION?>" /> +<?php } ?> +<?php if (!empty($PAGE_KEYWORDS)) { ?> +<meta name="keywords" content="<?=$PAGE_KEYWORDS?>" /> +<?php } ?> +<meta name="language" content="<?=$GLOBALS['LANG']?>" /> +<meta name="document-type" content="Public" /> +<meta name="document-rating" content="General" /> +<meta name="generator" content="PhpWiki" /> +<meta name="PHPWIKI_VERSION" content="<?=PHPWIKI_VERSION?>" /> +<base href="<?=PHPWIKI_BASE_URL?>" /> +<link rel="shortcut icon" href="<?=$WikiTheme->getImageURL('favicon.ico')?>" /> +<?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 + */ ?> +<?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?> +<link rel="home" title="<?=HOME_PAGE?>" href="<?=WikiURL(HOME_PAGE)?>" /> +<link rel="help" title="<?= +_("HowToUseWiki")?>" href="<?=WikiURL( +_("HowToUseWiki"))?>" /> +<link rel="copyright" title="<?=COPYRIGHTPAGE_TITLE?>" href="<?=COPYRIGHTPAGE_URL?>" /> +<link rel="author" title="<?=AUTHORPAGE_TITLE?>" href="<?=AUTHORPAGE_URL?>" /> +<link rel="search" title="<?= +_("FindPage")?>" href="<?=WikiURL( +_("FindPage"))?>" /> +<?php /** + * Provide alternate variations of the page content: + * 'viewsource' and 'browse'. + * 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 } + /** + * Link tag for RSS auto-discovery. See + * http://diveintomark.org/archives/2002/05/30.html#rss_autodiscovery + * http://www.oreillynet.com/cs/weblog/view/wlg/1475 + */ +?> +<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=WikiURL( +_("RecentChanges"), array('format' => 'rss'))?>" /> +<?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() . SUBPAGE_SEPARATOR ._("Calendar"); + $UserCalPageUrl = WikiURL($UserCalPageTitle); + ?> +<link rel="bookmark" title="<?= $UserCalPageTitle ?>" href="<?= $UserCalPageUrl ?>" /> +<?php /* Today's calendar page for the user if it exists + */ + $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . 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 ?> +<?= $WikiTheme->getCSS() ?><?php + // avoid redundant bookmark title for custom home page + if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME) + $pagetitle = ""; + else + $pagetitle = " - ". AsString($TITLE); +?> +<title><?= WIKI_NAME.$pagetitle ?></title> +<?= $WikiTheme->getMoreHeaders() ?> +</head> Property changes on: trunk/themes/gforge/templates/head.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/html.tmpl =================================================================== --- trunk/themes/gforge/templates/html.tmpl (rev 0) +++ trunk/themes/gforge/templates/html.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,18 @@ +<?php // -*-html-*- +rcs_id('$Id$'); +/* + * No header for Gforge (already provided) + * + */ +?> +<?php $WikiTheme->header() ?> +<?= $WikiTheme->getMoreHeaders() ?> +<?= Template('body') ?> +<?php $WikiTheme->footer() ?> +<?php +if (defined('DEBUG') and DEBUG) { + echo "<!-- phpwiki source: \n"; + echo $RCS_IDS; + echo "-->\n"; +} +?> \ No newline at end of file Property changes on: trunk/themes/gforge/templates/html.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/info.tmpl =================================================================== --- trunk/themes/gforge/templates/info.tmpl (rev 0) +++ trunk/themes/gforge/templates/info.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,24 @@ +<?php // -*-php-*- ?> +<?= Template("default/info") ?> + +<div align="center"> + <p> + <?= Button("viewsource", _("View Source")) ?> + <?=$SEP?><?= Button("PageHistory", _("PageHistory")) ?> + <?=$SEP?><?= Button("Diff") ?> + <?=$SEP?><?= Button(array('action'=>'diff','previous' => 'minor'),_("Diff previous Revision"),$page->getName()) ?> + <?=$SEP?><?= Button(array('action'=>'diff','previous' => 'author'),_("Diff previous Author"),$page->getName()) ?> + <?=$SEP?><?= Button("PageDump", _("PageDump")) ?> + <?php if ((defined('DEBUG') && DEBUG) || $user->isAdmin()) { ?> + <!-- Buttons really only for debugging --> + <?=$SEP?><?= Button("DebugInfo", _("DebugInfo")) ?> +<?php + $PurgeCache = Button(array('nocache' => 'purge'), + _("PurgeHtmlCache"), $page->getName()); + $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); +?> + <?=$SEP?><?= $PurgeCache ?> + </p> + <!-- End debugging buttons --> + <?php } ?> +</div> Property changes on: trunk/themes/gforge/templates/info.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/login.tmpl =================================================================== --- trunk/themes/gforge/templates/login.tmpl (rev 0) +++ trunk/themes/gforge/templates/login.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,64 @@ +<?php // -*-php-*- ?> +<!-- $Id$ --> +<!-- The login form --> +<?php if ($fail_message) { ?> + <p><strong><?=$fail_message?></strong></p> + <hr noshade="noshade" /> +<?php } ?> +<?php /* br past the logo */ ?> +<br class="clear-floats" /> + +<?php +if (DEBUG & _DEBUG_LOGIN) { + $t = sprintf(" DEBUG: ALLOW_ANON_EDIT = %s, ALLOW_BOGO_LOGIN = %s, ALLOW_USER_PASSWORDS = %s, ENABLE_PAGEPERM = %s, ", + ALLOW_ANON_EDIT ? "true" : "false", + ALLOW_BOGO_LOGIN ? "true" : "false", + ALLOW_USER_PASSWORDS ? "true" : "false", + ENABLE_PAGEPERM ? "true" : "false"); + if (ALLOW_USER_PASSWORDS) { + if ($fail_message) { // add for each method the exact failing reason. + $t .= " USER_AUTH_ORDER: "; + foreach ($GLOBALS['USER_AUTH_ORDER'] as $auth) { + $t .= " => $auth"; + if ($fail = @$GLOBALS['USER_AUTH_ERROR']["_".strtolower($auth)."passuser"]) + $t .= " ($fail)"; + } + } else + $t .= sprintf(" USER_AUTH_ORDER: %s", join(" => ", $GLOBALS['USER_AUTH_ORDER'])); + $t .= sprintf(", USER_AUTH_POLICY: %s", USER_AUTH_POLICY) + . sprintf(", PASSWORD_LENGTH_MINIMUM: %s", PASSWORD_LENGTH_MINIMUM); + } + echo asXML(HTML::div(array('class' => 'debug'),$t)); + echo "<br />\n"; +} +if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) { + require_once("lib/BlockParser.php"); + // This iso-8859-1 sample covers French, Spanish, Italian, German, and probably others + if (check_php_version(4,3)) + $examplechars = htmlentities("�������������", ENT_QUOTES, $charset); + elseif (check_php_version(4,0,3)) + $examplechars = htmlentities("�������������", ENT_QUOTES); + else + $examplechars = htmlentities("�������������"); + // Japanese login requires utf-8 and ALLOW_NONWIKIWORD_LOGINS + if (($charset == 'utf-8') && defined('ALLOW_NONWIKIWORD_LOGINS') && ALLOW_NONWIKIWORD_LOGINS) { + //sample Japanese login name in unicode + $examplechars = $examplechars . "天道あかね"; + } + $t = asXML(TransformText(_("You may sign in using any [WikiWord|AddingPages] as a user id. (Any characters in %s etc. may be used too). The user id will be used as a link in RecentChanges to your home page."), 2.0, true)); + if (substr_count($t,"%s") == 1) { + $s = @sprintf($t, $examplechars); + // FIXME: Workaround gettext or sprintf problem + if (empty($s)) echo $t; + else echo sprintf($t, $examplechars); + } else { + echo $t; + } + /* On disabled DbPrefs (PagePrefs only) note the user to create his PersonalPage. */ + // don't understand why I put this in --rurban + if (!isset($user->_prefs->_select)) { + echo asXML(TransformText(_("Note: Only if you create your personal HomePage with same the pagename as your user id, you will be able to store your UserPreferences. Otherwise not."))); + } + if (empty($pass_required)) ?> + <p><?= _("New users may use an empty password.") ?></p> +<?php } ?> \ No newline at end of file Property changes on: trunk/themes/gforge/templates/login.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/navbar.tmpl =================================================================== --- trunk/themes/gforge/templates/navbar.tmpl (rev 0) +++ trunk/themes/gforge/templates/navbar.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,26 @@ +<?php // -*-html-*- ?> +<!-- $Id$ --> +<!-- The top navigation/search bar --> + +<?php +$curuserprefs = $user->getPreferences(); +?> + + <tr><td class="submenu"><?= WikiLink(_("HomePage"), "","Home Page") ?></td></tr> + <tr><td class="submenu"><?= WikiLink(_("RecentChanges"), "","Recent Changes") ?></td></tr> + <tr><td class="submenu"><?= WikiLink(_("SpecialPages"), "","Special Pages") ?></td></tr> + <?php if ($curuserprefs->get('searchMenuItem')) { ?> + <tr><td class="submenu"><?= WikiLink(_("FindPage"), "","Search") ?></td></tr> + <?php } ?> + <?php if (!empty($revision)) { ?> + <?php if (0) { ?> + <tr><td class="submenu"><?= Button(array('action'=>'LikePages'),_("Like Pages"),$page->getName()) ?></td></tr> + <?php } ?> + <?php } ?> + <tr><td class="submenu"><?= WikiLink(_("UpLoad"), "","Upload File") ?></td></tr> + <?php if (!empty($user) && $user->isAdmin()) { ?> + <tr><td class="submenu"><?= WikiLink(_("PhpWikiAdministration"), "","Admin") ?></td></tr> + <?php } ?> + <?php if (!empty($user) && $user->isSignedIn()) { ?> + <tr><td class="submenu"><?= WikiLink(_("UserPreferences"), "","Preferences") ?></td></tr> + <?php } ?> Property changes on: trunk/themes/gforge/templates/navbar.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/pagelink.tmpl =================================================================== --- trunk/themes/gforge/templates/pagelink.tmpl (rev 0) +++ trunk/themes/gforge/templates/pagelink.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,31 @@ +<?php +/** + * Themable paging "|<< << - i/sum - >> >>|" links + * + * $Id$ --> + * Variables: PREV, NEXT, PREV_LINK, NEXT_LINK, + * COUNT, OFFSET, SIZE + * More ideas: FIRST, LAST, ... + */ +if ($WikiTheme->DUMP_MODE) { + $PREV = false; + $NEXT = false; +} +?> +<tr><td width="100%" colspan="<?= $COLS ?>"> </td></tr> +<tr><td width="100%" colspan="<?= $COLS ?>"><table style="border-width: 1px; border-style: solid; border-color: black; font-weight: bold;" width="100%"><tr class="wikipaging"> + <td class="wikipaging<?= $PREV ? "-enabled" : "-disabled" ?>" align="left"> + <?= $PREV ? HTML::a(array('href'=>$FIRST_LINK),_("|<<")) : _("|<<") ?> + + <?= $PREV ? HTML::a(array('href'=>$PREV_LINK),_("<< Prev")) : _("<<") ?> + </td> + <td class="wikipaging-enabled" align="center"> + <?= fmt(" - %d / %d - ", $ACTPAGE, $NUMPAGES) ?> + </td> + <td class="wikipaging<?= $NEXT ? "-enabled" : "-disabled" ?>" align="right"> + <?= $NEXT ? HTML::a(array('href'=>$NEXT_LINK),_("Next >>")) : _(">>") ?> + + <?= $NEXT ? HTML::a(array('href'=>$LAST_LINK),_(">>|")) : _(">>|") ?> + </td> +</tr></table></td></tr> +<tr><td width="100%" colspan="<?= $COLS ?>"> </td></tr> Property changes on: trunk/themes/gforge/templates/pagelink.tmpl ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/gforge/templates/userprefs.tmpl =================================================================== --- trunk/themes/gforge/templates/userprefs.tmpl (rev 0) +++ trunk/themes/gforge/templates/userprefs.tmpl 2008-08-22 13:18:48 UTC (rev 6189) @@ -0,0 +1,376 @@ +<?php // -*-html-*- ?> +<!-- $Id$ --> +<?php +// Todo: Move the logic and code to the plugin +// This is very experimental and the read-only part an ugly hack so far. +foreach (explode(',','errmsg,isForm') as $var) { + if (empty($$var)) $$var = false; +} + +$plugin = $request->getArg('pagename'); +if ($request->isActionPage($request->getArg('pagename')) + and $isForm and $plugin == _("PreferencesInfo")) { + $isForm = false; +} +$time = time(); +$user =& $request->getUser(); +$pref =& $request->_prefs; + +if (!$pref) return; +$offset = $pref->get('timeOffset'); +$serverTime = $time - $offset * 3600; +if ( $isForm ) + $timeOffsetInput = HTML::input(array('type' => "text", + 'size' => 6, + 'maxlength' => 6, + 'name' => "pref[timeOffset]", + 'class' => "numeric", + 'value' => $offset)); +else + $timeOffsetInput = $pref->get('timeOffset'); + +$OwnModificationsCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[ownModifications]', + 'value' => '1', + 'checked' => (bool) $pref->get('ownModifications'))); +$MajorModificationsOnlyCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[majorModificationsOnly]', + 'value' => '1', + 'checked' => (bool) $pref->get('majorModificationsOnly'))); +$DiffMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[diffMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('diffMenuItem'))); +$PageInfoMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[pageInfoMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('pageInfoMenuItem'))); +$PDFMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[pdfMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('pdfMenuItem'))); +$ChownMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[chownMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('chownMenuItem'))); +$SetaclMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[setaclMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('setaclMenuItem'))); +$RemoveMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[removeMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('removeMenuItem'))); +$RenameMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[renameMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('renameMenuItem'))); +$RevertMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[revertMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('revertMenuItem'))); +$LockMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[lockMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('lockMenuItem'))); +$BackLinksMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[backLinksMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('backLinksMenuItem'))); +$WatchPageMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[watchPageMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('watchPageMenuItem'))); +$RecentChangesMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[recentChangesMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('recentChangesMenuItem'))); +$SearchMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[searchMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('searchMenuItem'))); +$SpecialPagesMenuItem = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[specialPagesMenuItem]', + 'value' => '1', + 'checked' => (bool) $pref->get('specialPagesMenuItem'))); +$RelativeDatesCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[relativeDates]', + 'value' => '1', + 'checked' => (bool) $pref->get('relativeDates'))); +$NoLinkIconsCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[noLinkIcons]', + 'value' => '1', + 'checked' => (bool) $pref->get('noLinkIcons'))); +$GoogleLinkCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[googleLink]', + 'value' => '1', + 'checked' => (bool) $pref->get('googleLink'))); +$DoubleClickCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[doubleClickEdit]', + 'value' => '1', + 'checked' => (bool) $pref->get('doubleClickEdit'))); +if (!function_exists('selectedOption')) { + function selectedOption ($value, $label = false) { + return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n"); + } + function unselectedOption ($value, $label = false) { + return HTML::option(array('value' => $value), ($label ? $label : $value) . "\n"); + } +} + +$SelectThemes = ''; $SelectLanguages = ''; +$SelectThemesDesc = ''; $SelectLanguagesDesc = ''; +if ( $isForm ) { + $SelectOptions = HTML(); + if (!empty($available_themes) and is_array($available_themes)) { + if (!$pref->get('theme') or $pref->get('theme') == THEME) + $SelectOptions->pushContent(selectedOption("",_("<system theme>"))); + else + $SelectOptions->pushContent(unselectedOption("",_("<system theme>"))); + foreach ($available_themes as $theme) { + if ($theme == $pref->get('theme') and $theme != THEME) + $SelectOptions->pushContent(selectedOption($theme)); + else + $SelectOptions->pushContent(unselectedOption($theme)); + } + $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'), + $SelectOptions); + $SelectThemesDesc = _("Personal theme:"); + } + + $SelectOptions = HTML(); + if (!empty($available_languages) and is_array($available_languages)) { + if (!$pref->get('lang') or $pref->get('lang') == DEFAULT_LANGUAGE) + $SelectOptions->pushContent(selectedOption("",_("<system language>"))); + else + $SelectOptions->pushContent(unselectedOption("",_("<system language>"))); + foreach ($available_languages as $lang) { + if ($lang == $pref->get('lang') and $lang != DEFAULT_LANGUAGE) + $SelectOptions->pushContent(selectedOption($lang)); + else + $SelectOptions->pushContent(unselectedOption($lang)); + } + $SelectLanguages = HTML::select(array('name' => "pref[lang]",'id' => 'lang'), + $SelectOptions); + $SelectLanguagesDesc = _("Personal language:"); + } else { + if ($SelectThemes == '') { + $appearance = false; + $SelectThemesDesc = ''; + $SelectLanguagesDesc = ''; + } + } +} else { + $SelectThemesDesc = _("Personal theme:"); + $SelectLanguagesDesc = _("Personal language:"); + $SelectThemes = $pref->get('theme'); + $SelectLanguages = $pref->get('lang'); +} + +if ($errmsg) $msg = HTML(HTML::h4(array('class' => 'errors'), $errmsg),HTML::hr()); +?> +<?= $errmsg ?> + +<h2> +<?= fmt("User preferences for user '%s'", $user->UserName()) ?> +</h2> + +<?php if ($isForm) { ?> +<form action="<?=$request->getPostURL()?>" method="post"> +<?php } else { + $fill = " "; + // See also plugin _AuthInfo + $authmethod = ENABLE_USER_NEW ? @$user->_authmethod : @$user->auth_how; +?> +<?= HTML::pre(sprintf("%12s: [% 10s] %s\n",_("UserId"),$pref->get('userid'), " from " . $authmethod), + sprintf("%12s: [% 10s] %16s: [% 10s] | %8s: [%2s]\n","getId",$user->getId(),"getAuthenticatedId",$user->getAuthenticatedId(),"isSignedIn", $user->isSignedIn()), + //sprintf("%12s: [% 10s]\n",_("Password"),empty($pref->get('passwd')) ? _("<empty>") : _("<not empty>")), + sprintf("%12s: [% 10s] %15s: [% 8s]\n", + _("Auth Level"),$user->_level,_("Auth Method"),$authmethod), + sprintf("%12s: [% 10s]\n",_("HomePage"),$user->hasHomePage() ? (ENABLE_USER_NEW ? $user->_HomePagehandle->_pagename : $user->_homepage->_pagename ) : ''), + sprintf("%12s: [% 10s]\n",_("E-Mail"),$pref->get('email')), + //sprintf("%12s: [% 10s]\n",_("Notify"),$pref->get('notifyPages')), + sprintf("%12s: [% 10s] %16s: [% 10s] \n",_("Language"),$pref->get('lang'),_("Current Language"),$GLOBALS['LANG']) + ) ?> +<?php } ?> + +<fieldset> +<legend><strong>User preferences for this project</strong></legend> +<table border="0"> +<?php if ($isForm and $user->mayChangePass()) { ?> + <tr><td colspan="3"><h3><?= ($request->getPref('passwd') ? _("Change Password") : _("Set Password")) ?></h3></td></tr> + + <tr><td align="right"><?=_("New password")?>:</td> + <td><input type="password" name="pref[passwd]" size="16" maxlength="16" class="text" value="" /></td> + <td></td></tr> + <tr><td align="right"><?=_("Type it again")?>:</td> + <td><input type="password" name="pref[passwd2]" size="16" maxlength="16" class="text" value="" /></td> + <td></td></tr> +<?php } ?> + +<?php if (ENABLE_USER_NEW) { ?> + <tr><td colspan="3"><h3><?=_("E-mail Notification")?></h3></td></tr> + + <tr><td colspan="2"> + <?=_("Get an email notification at changes of the following pages:")?><br /> + <?php if ($isForm) { ?> + <blockquote><textarea name="pref[notifyPages]" cols="30" rows="4"><?=$pref->get('notifyPages')?></textarea></blockquote></td> + <td><p class="hint"><?=_("Enter pages seperated by space or comma. Wildcards (fileglobbing) allowed.")?></p></td> + <?php } else { ?> + <td><?=$pref->get('notifyPages')?></td><td></td> + <?php } ?> + </tr> +<?php } ?> + +</table> +</fieldset> +<br /> +<fieldset> +<legend><strong>Global user preferences (for all projects)</strong></legend> + +<table border="0"> + + <tr><td colspan="3"><h3><?=_("E-mail Notification")?></h3></td></tr> + + <tr> + <td> + <p><?=_("Do not send my own modifications:")?></p> + </td> + <td> + <p><?= $OwnModificationsCB ?></p> + </td> + <td> + <p class="hint"><?=_("Check if you do not want to be notified of your own modifications.")?></p> + </td> + </tr> + + <tr><td colspan="3"><h3><?=_("Menus")?></h3></td></tr> + <tr> + <td> + <fieldset> + <legend>Top Menu</legend> + <table cellpadding="0" cellspacing="0"> + <tr> + <td> + <p><?= $DiffMenuItem ?> <?=_("Last Difference")?></p> + </td> + </tr> + <tr> + <td> + <p><?= $RevertMenuItem ?> <?=_("Revert")?></p> + </td> + </tr> + <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> + <tr> + <td> + <p><?= $PDFMenuItem ?> <?=_("PDF")?></p> + </td> + </tr> + <?php } ?> + <tr> + <td> + <p><?= $LockMenuItem ?> <?=_("Lock")?></p> + </td> + </tr> + <tr> + <td> + <p><?= $ChownMenuItem ?> <?=_("Change Owner")?></p> + </td> + </tr> + <tr> + <td> + <p><?= $SetaclMenuItem ?> <?=_("Access Rights")?></p> + </td> + </tr> + </table> + </fieldset> + </td> + + <td valign="top"> + <fieldset> + <legend>Left Menu</legend> + <table cellpadding="0" cellspacing="0"> + <tr> + <td> + <p><?= $SearchMenuItem ?> <?=_("Search")?></p> + </td> + </tr> + </table> + </fieldset> + </td> + + <td valign="top"> + <p class="hint"><?=_("Check menu items to display.")?></p> + </td> + </tr> + + <tr><td colspan="3"><h3><?=_("Appearance")?></h3></td></tr> + + <tr><td colspan="2"><?=_("Here you can override site-specific default values.") ?></td> + <td><p class="hint"><?= _("Currently not recommended!") ?></p></td></tr> + <?php /* Alternatively this could be done with <fieldset> and <legend>. */ ?> + <tr><td align="right"><?=fmt("Hide %s:", WikiLink("LinkIcons"))?></td> + <td><?=$NoLinkIconsCB?></td> + <td><p class="hint"><?=_("Hide or show LinkIcons (if supported by the current theme). Useful for text-only browsers or slow connections.")?></p></td></tr> + <tr><td align="right"><?=fmt("Add %s:", WikiLink("GoogleLink"))?></td> + <td><?=$GoogleLinkCB?></td> + <td><p class="hint"><?=fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt"))?></p></td></tr> + <tr><td align="right"><?=fmt("Enable DoubleClick Edit")?></td> + <td><?=$DoubleClickCB?></td> + <td><p class="hint"><?=fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?></p></td></tr> + + + <tr><td colspan="3"><h3><?=_("Edit Area Size")?></h3></td></tr> + + <tr><td colspan="2"> + <?=_("Height")?>: + <?php if ($isForm) { ?> + <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" + value="<?=$pref->get('editHeight')?>" /> + <?php } else { ?> + <?=$pref->get('editHeight')?> + <?php } ?> + <?=_("Width")?>: + <?php if ($isForm) { ?> + <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" + value="<?=$pref->get('editWidth')?>" /> + <?php } else { ?> + <?=$pref->get('editWidth')?> + <?php } ?> + </td> + <td><p class="hint"> + <?=_("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> + </td></tr> + + <tr><td colspan="3"><h3><?=_("Time Zone")?></h3></td></tr> + + <tr><td colspan="2"><p> + <?=fmt("Add %s hours to the server's local time when reporting times.", + $timeOffsetInput)?> + </p></td><td> + <p class="hint"> + <?=fmt("The current time at the server is %s.", + HTML::strong($WikiTheme->formatDateTime($serverTime)))?> + <?=fmt("With the current offset, this would be reported as %s.", + HTML::strong($WikiTheme->formatDateTime($time)))?> + </p> + </td></tr> + + <tr><td colspan="3"><h3><?=_("Date Format")?></h3></td></tr> + + <tr><td colspan="2"><p> + <?=_("Show relative dates using 'Today' and 'Yesterday'")?>: + <?= $RelativeDatesCB ?> + </p></td><td></td></tr> +</table> +</fieldset> + +<?php if ($isForm) { ?> + <br /> + <p><?=Button("submit:", _("Update Preferences"), 'wikiadmin')?> + <?=Button("submit:delete", _("Reset Preferences"), 'wikiadmin')?> + <?=Button("submit:cancel", _("Cancel"), 'button')?></p> + +<?= HiddenInputs($request->getArgs(), false, array('pref')) ?> +</form> +<?php } ?> Property changes on: trunk/themes/gforge/templates/userprefs.tmpl ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |