2 // Avoid direct call to this file.
3 // PHPWIKI_VERSION is defined in lib/prepend.php
4 if (!defined('PHPWIKI_VERSION')) {
11 require_once('lib/WikiTheme.php');
13 class WikiTheme_gforge extends WikiTheme {
16 global $HTML, $group_id, $group_public_name, $request, $project;
18 $pagename = $request->getArg('pagename');
20 $submenu = Template('navbar');
23 if (!$project->isPublic()) {
24 //if it's a private group, you must be a member of that group
25 session_require(array('group'=>$group_id));
28 //for dead projects must be member of admin project
29 if (!$project->isActive()) {
30 //only SF group can view non-active, non-holding groups
31 session_require(array('group'=>'1'));
34 $HTML->header(array('title'=> $group_public_name.': '.htmlspecialchars($pagename),
37 'submenu' => $submenu->asXML()
41 // Display a warning banner for internal users when the wiki is opened
43 if ($project->getIsExternal()) {
44 $external_user = false;
45 if (session_loggedin()) {
46 $user = session_get_user();
47 $external_user = $user->getIsExternal();
49 if (!$external_user) {
50 $page = $request->getPage();
51 if ($page->get('external')) {
52 $external_msg = _("This page is external.");
54 echo $HTML->warning_msg(_("This project is shared with third-party users (non Alcatel-Lucent users).") .
55 (isset($external_msg) ? ' ' . $external_msg : ''));
63 $HTML->footer(array());
72 * The Signature image is shown after saving an edited page. If this
73 * is set to false then the "Thank you for editing..." screen will
77 $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
78 // Uncomment this next line to disable the signature.
79 $this->addImageAlias('signature', false);
84 $this->setLinkIcon('http');
85 $this->setLinkIcon('https');
86 $this->setLinkIcon('ftp');
87 $this->setLinkIcon('mailto');
89 $this->setButtonSeparator("");
92 * WikiWords can automatically be split by inserting spaces between
93 * the words. The default is to leave WordsSmashedTogetherLikeSo.
95 $this->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 $this->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 $this->setDateFormat("%d %B %Y");
115 $this->setTimeFormat("%H:%M");
119 $WikiTheme = new WikiTheme_gforge('gforge');
121 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
122 // (c-file-style: "gnu")
127 // c-hanging-comment-ender-p: nil
128 // indent-tabs-mode: nil