4 require_once('lib/WikiTheme.php');
6 class WikiTheme_gforge extends WikiTheme {
9 global $HTML, $group_id, $group_public_name, $request, $project;
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.': '.htmlspecialchars($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(_("This project is shared with third-party users (non Alcatel-Lucent users).") .
46 (isset($external_msg) ? ' ' . $external_msg : ''));
54 $HTML->footer(array());
63 * The Signature image is shown after saving an edited page. If this
64 * is set to false then the "Thank you for editing..." screen will
68 $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
69 // Uncomment this next line to disable the signature.
70 $this->addImageAlias('signature', false);
75 $this->setLinkIcon('http');
76 $this->setLinkIcon('https');
77 $this->setLinkIcon('ftp');
78 $this->setLinkIcon('mailto');
80 $this->setButtonSeparator("");
83 * WikiWords can automatically be split by inserting spaces between
84 * the words. The default is to leave WordsSmashedTogetherLikeSo.
86 $this->setAutosplitWikiWords(false);
89 * Layout improvement with dangling links for mostly closed wiki's:
90 * If false, only users with edit permissions will be presented the
91 * special wikiunknown class with "?" and Tooltip.
92 * If true (default), any user will see the ?, but will be presented
93 * the PrintLoginForm on a click.
95 $this->setAnonEditUnknownLinks(false);
98 * You may adjust the formats used for formatting dates and times
99 * below. (These examples give the default formats.)
100 * Formats are given as format strings to PHP strftime() function See
101 * http://www.php.net/manual/en/function.strftime.php for details.
102 * Do not include the server's zone (%Z), times are converted to the
105 $this->setDateFormat("%d %B %Y");
106 $this->setTimeFormat("%H:%M");
110 $WikiTheme = new WikiTheme_gforge('gforge');
112 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
113 // (c-file-style: "gnu")
118 // c-hanging-comment-ender-p: nil
119 // indent-tabs-mode: nil