-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiscussions.php
More file actions
54 lines (51 loc) · 1.83 KB
/
discussions.php
File metadata and controls
54 lines (51 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// Note: This file is included from the library/Vanilla/Vanilla.Control.DiscussionGrid.php class.
echo '<div class="ContentInfo Top">
<h1>
'.$this->Context->PageTitle.'
</h1>
'.$this->PageJump.'
<div class="PageInfo">
<p>'.($PageDetails == '' ? $this->Context->GetDefinition('NoDiscussionsFound') : $PageDetails).'</p>
'.$PageList.'
</div>
</div>
<div id="ContentBody">
<ol id="Discussions">';
$Discussion = $this->Context->ObjectFactory->NewContextObject($this->Context, 'Discussion');
$FirstRow = 1;
$CurrentUserJumpToLastCommentPref = $this->Context->Session->User->Preference('JumpToLastReadComment');
$DiscussionList = '';
$ThemeFilePath = ThemeFilePath($this->Context->Configuration, 'discussion.php');
$Alternate = 0;
$RowNumber = 0;
while ($Row = $this->Context->Database->GetRow($this->DiscussionData)) {
$RowNumber++;
$this->DelegateParameters['RowNumber'] = &$RowNumber;
$Discussion->Clear();
$Discussion->GetPropertiesFromDataSet($Row);
$Discussion->FormatPropertiesForDisplay();
// Prefix the discussion name with the whispered-to username if this is a whisper
if ($Discussion->WhisperUserID > 0) {
$Discussion->Name = @$Discussion->WhisperUsername.': '.$Discussion->Name;
}
$this->DelegateParameters['Discussion'] = &$Discussion;
$this->CallDelegate( 'PreSingleDiscussionRender' );
// Discussion search results are identical to regular discussion listings, so include the discussion search results template here.
include($ThemeFilePath);
$FirstRow = 0;
$Alternate = FlipBool($Alternate);
}
echo $DiscussionList.'
</ol>
</div>';
if ($this->DiscussionDataCount > 0) {
echo '<div class="ContentInfo Bottom">
<div class="PageInfo">
<p>'.$pl->GetPageDetails($this->Context).'</p>
'.$PageList.'
</div>
<a id="TopOfPage" href="'.GetRequestUri().'#pgtop">'.$this->Context->GetDefinition('TopOfPage').'</a>
</div>';
}
?>