4 require_once('lib/WikiTheme.php');
6 class WikiTheme_gforge extends WikiTheme {
9 global $HTML, $group_id, $group_public_name, $request, $project, $Language;
11 $pagename = $request->getArg('pagename');
13 $submenu = Template('navbar');
16 if (!$project->isPublic()) {
17 //if it's a private group, you must be a member of that group
18 session_require(array('group'=>$group_id));
21 //for dead projects must be member of admin project
22 if (!$project->isActive()) {
23 //only SF group can view non-active, non-holding groups
24 session_require(array('group'=>'1'));
27 $HTML->header(array('title'=> $group_public_name.': '.$pagename ,
28 'pagename'=> $pagename, 'group' => $group_id, 'toptab' => 'wiki',
29 'css' => 'gforge.css" />'."\n".' <base href="'.PHPWIKI_BASE_URL,
30 'submenu' => $submenu->asXML()));
32 // Display a warning banner for internal users when the wiki is opened
34 if ($project->getIsExternal()) {
35 $external_user = false;
36 if (session_loggedin()) {
37 $user = session_get_user();
38 $external_user = $user->getIsExternal();
40 if (!$external_user) {
41 $page = $request->getPage();
42 if ($page->get('external')) {
43 $external_msg = 'This page is external.';
45 echo $HTML->warning_msg($Language->getText('project_admin','external_project') .
46 (isset($external_msg) ? ' ' . $external_msg : ''));
54 $HTML->footer(array());
59 $WikiTheme = new WikiTheme_gforge('gforge');
60 // CSS file defines fonts, colors and background images for this style.
63 * The logo image appears on every page and links to the HomePage.
65 $WikiTheme->addImageAlias('logo', WIKI_NAME . 'Logo.png');
68 * The Signature image is shown after saving an edited page. If this
69 * is set to false then the "Thank you for editing..." screen will
73 $WikiTheme->addImageAlias('signature', WIKI_NAME . "Signature.png");
74 // Uncomment this next line to disable the signature.
75 $WikiTheme->addImageAlias('signature', false);
80 // $WikiTheme->setLinkIconAttr('after');
81 $WikiTheme->setLinkIcon('http');
82 $WikiTheme->setLinkIcon('https');
83 $WikiTheme->setLinkIcon('ftp');
84 $WikiTheme->setLinkIcon('mailto');
85 //$WikiTheme->setLinkIcon('interwiki');
86 //$WikiTheme->setLinkIcon('wikiuser');
87 //$WikiTheme->setLinkIcon('*', 'url');
89 $WikiTheme->setButtonSeparator("\n | ");
92 * WikiWords can automatically be split by inserting spaces between
93 * the words. The default is to leave WordsSmashedTogetherLikeSo.
95 $WikiTheme->setAutosplitWikiWords(false);
98 * Layout improvement with dangling links for mostly closed wiki's:
99 * If false, only users with edit permissions will be presented the
100 * special wikiunknown class with "?" and Tooltip.
101 * If true (default), any user will see the ?, but will be presented
102 * the PrintLoginForm on a click.
104 $WikiTheme->setAnonEditUnknownLinks(false);
107 * You may adjust the formats used for formatting dates and times
108 * below. (These examples give the default formats.)
109 * Formats are given as format strings to PHP strftime() function See
110 * http://www.php.net/manual/en/function.strftime.php for details.
111 * Do not include the server's zone (%Z), times are converted to the
114 $WikiTheme->setDateFormat("%d %B %Y");
115 $WikiTheme->setTimeFormat("%H:%M");
118 * To suppress times in the "Last edited on" messages, give a
119 * give a second argument of false:
121 //$WikiTheme->setDateFormat("%B %d, %Y", false);
124 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
125 // (c-file-style: "gnu")
130 // c-hanging-comment-ender-p: nil
131 // indent-tabs-mode: nil