Added theme: vanilla-blue-1.1.zip
[vanilla-miry.git] / themes / Vanilla2_Blue / panel.php
blob233272bf984e017a70340faac9ca422be4c1ef53
1 <?php
2 // Note: This file is included from the library/Framework/Framework.Control.Panel.php class.
4 echo '<div id="Panel">';
6 // Mini-mod Session by Seiji
7 if ($this->Context->Session->UserID > 0) {
8 echo str_replace('//1',
9 $this->Context->Session->User->Name,
10 $this->Context->GetDefinition('')).'';
11 } else {
12 echo '<div id="Welcome"><p style="margin-top: 2em;"><h2>'.$this->Context->GetDefinition('Howdy, Stranger!</h2></p><p style="margin-top: 1em;"><div id="Message">It looks like you are new here. If you want to take part in the discussions, click one of these buttons!').'<p style="margin-top: 1em;"><a href="'.AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl='.GetRequestUri()).'">'.$this->Context->GetDefinition('SignIn').'</a> &nbsp;';
13 echo '<a href="people.php?PostBackAction=ApplyForm">'.$this->Context->GetDefinition('ApplyForMembership').'</a></p></div>';
14 echo '</div>';
17 // Add the start button to the panel
18 if ($this->Context->Session->UserID > 0 && $this->Context->Session->User->Permission('PERMISSION_START_DISCUSSION')) {
19 $CategoryID = ForceIncomingInt('CategoryID', 0);
20 if ($CategoryID == 0) $CategoryID = '';
21 echo '<h1><a href="'.GetUrl($this->Context->Configuration, 'post.php', 'category/', 'CategoryID', $CategoryID).'">'
22 .$this->Context->GetDefinition('StartANewDiscussion')
23 .'</a></h1>';
26 $this->CallDelegate('PostStartButtonRender');
28 while (list($Key, $PanelElement) = each($this->PanelElements)) {
29 $Type = $PanelElement['Type'];
30 $Key = $PanelElement['Key'];
31 if ($Type == 'List') {
32 $sReturn = '';
33 $Links = $this->Lists[$Key];
34 if (count($Links) > 0) {
35 ksort($Links);
36 $sReturn .= '<ul>
37 <li>
38 <h2>'.$Key.'</h2>
39 <ul>';
40 while (list($LinkKey, $Link) = each($Links)) {
41 $sReturn .= '<li>
42 <a '.($Link['Link'] != '' ? 'href="'.$Link['Link'].'"' : '').' '.$Link['LinkAttributes'].'>'
43 .$Link['Item'];
44 if ($Link['Suffix'] != '') $sReturn .= ' <span>'.$this->Context->GetDefinition($Link['Suffix']).'</span>';
45 $sReturn .= '</a>';
46 $sReturn .= '</li>';
48 $sReturn .= '</ul>
49 </li>
50 </ul>';
52 echo $sReturn;
53 } elseif ($Type == 'String') {
54 echo $this->Strings[$Key];
58 $this->CallDelegate('PostElementsRender');
60 echo '</div>
61 <div id="Content">';