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("",_(""))); else $SelectOptions->pushContent(unselectedOption("",_(""))); 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("",_(""))); else $SelectOptions->pushContent(unselectedOption("",_(""))); 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 ?> = fmt("User preferences for user '%s'", $user->UserName()) ?> _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')) ? _("") : _("")), 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']) ) ?> User preferences for this project mayChangePass()) { ?> = ($request->getPref('passwd') ? _("Change Password") : _("Set Password")) ?> =_("New password")?>: =_("Type it again")?>: =_("E-mail Notification")?> =_("Get an email notification at changes of the following pages:")?> =$pref->get('notifyPages')?> =_("Enter pages seperated by space or comma. Wildcards (fileglobbing) allowed.")?> =$pref->get('notifyPages')?> Global user preferences (for all projects) =_("E-mail Notification")?> =_("Do not send my own modifications:")?> = $OwnModificationsCB ?> =_("Check if you do not want to be notified of your own modifications.")?> =_("Menus")?> Top Menu = $DiffMenuItem ?> =_("Last Difference")?> = $RevertMenuItem ?> =_("Revert")?> = $PDFMenuItem ?> =_("PDF")?> = $LockMenuItem ?> =_("Lock")?> = $ChownMenuItem ?> =_("Change Owner")?> = $SetaclMenuItem ?> =_("Access Rights")?> Left Menu = $SearchMenuItem ?> =_("Search")?> =_("Check menu items to display.")?> =_("Appearance")?> =_("Here you can override site-specific default values.") ?> = _("Currently not recommended!") ?> and . */ ?> =fmt("Hide %s:", WikiLink("LinkIcons"))?> =$NoLinkIconsCB?> =_("Hide or show LinkIcons (if supported by the current theme). Useful for text-only browsers or slow connections.")?> =fmt("Add %s:", WikiLink("GoogleLink"))?> =$GoogleLinkCB?> =fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt"))?> =fmt("Enable DoubleClick Edit")?> =$DoubleClickCB?> =fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?> =_("Edit Area Size")?> =_("Height")?>: =$pref->get('editHeight')?> =_("Width")?>: =$pref->get('editWidth')?> =_("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.")?> =_("Time Zone")?> =fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput)?> =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)))?> =_("Date Format")?> =_("Show relative dates using 'Today' and 'Yesterday'")?>: = $RelativeDatesCB ?> =Button("submit:", _("Update Preferences"), 'wikiadmin')?> =Button("submit:delete", _("Reset Preferences"), 'wikiadmin')?> =Button("submit:cancel", _("Cancel"), 'button')?> = HiddenInputs($request->getArgs(), false, array('pref')) ?>
=$pref->get('notifyPages')?>
=_("Enter pages seperated by space or comma. Wildcards (fileglobbing) allowed.")?>
=_("Do not send my own modifications:")?>
= $OwnModificationsCB ?>
=_("Check if you do not want to be notified of your own modifications.")?>
= $DiffMenuItem ?> =_("Last Difference")?>
= $RevertMenuItem ?> =_("Revert")?>
= $PDFMenuItem ?> =_("PDF")?>
= $LockMenuItem ?> =_("Lock")?>
= $ChownMenuItem ?> =_("Change Owner")?>
= $SetaclMenuItem ?> =_("Access Rights")?>
= $SearchMenuItem ?> =_("Search")?>
=_("Check menu items to display.")?>
= _("Currently not recommended!") ?>
=_("Hide or show LinkIcons (if supported by the current theme). Useful for text-only browsers or slow connections.")?>
=fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt"))?>
=fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?>
=_("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.")?>
=fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput)?>
=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)))?>
=_("Show relative dates using 'Today' and 'Yesterday'")?>: = $RelativeDatesCB ?>
=Button("submit:", _("Update Preferences"), 'wikiadmin')?> =Button("submit:delete", _("Reset Preferences"), 'wikiadmin')?> =Button("submit:cancel", _("Cancel"), 'button')?>