mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Implemented configurable PMs-per-page for users' inbox.
This commit is contained in:
parent
3a0fb3ef32
commit
101685f997
@ -3,7 +3,10 @@
|
||||
|
||||
|
||||
$UserID = $LoggedUser['ID'];
|
||||
|
||||
//deal with users who have yet to configure this in their profile page
|
||||
if(!isset($LoggedUser['PrivateMessagesPerPage'])) {
|
||||
$LoggedUser['PrivateMessagesPerPage'] = 25; //problem solbed
|
||||
}
|
||||
|
||||
if (empty($_GET['action'])) {
|
||||
$Section = 'inbox';
|
||||
@ -14,7 +17,7 @@
|
||||
error(404);
|
||||
}
|
||||
|
||||
list($Page, $Limit) = Format::page_limit(MESSAGES_PER_PAGE);
|
||||
list($Page, $Limit) = Format::page_limit($LoggedUser['PrivateMessagesPerPage']);
|
||||
|
||||
View::show_header('Inbox');
|
||||
?>
|
||||
@ -79,7 +82,7 @@
|
||||
$DB->set_query_id($Results);
|
||||
$Count = $DB->record_count();
|
||||
|
||||
$Pages = Format::get_pages($Page, $NumResults, MESSAGES_PER_PAGE, 9);
|
||||
$Pages = Format::get_pages($Page, $NumResults, $LoggedUser['PrivateMessagesPerPage'], 9);
|
||||
echo "\t\t$Pages\n";
|
||||
?>
|
||||
</div>
|
||||
|
@ -381,6 +381,17 @@ function checked($Checked) {
|
||||
posts per page
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="comm_pmpp_tr">
|
||||
<td class="label tooltip" title="This option allows you to set the desired number of displayed private messages per page in your inbox."><strong>Private messages per page (inbox)</strong></td>
|
||||
<td>
|
||||
<select name="privatemessagesperpage" id="privatemessagesperpage">
|
||||
<option value="25"<?=$SiteOptions['PrivateMessagesPerPage'] == 25 ? ' selected="selected"' : ''?>>25 (default)</option>
|
||||
<option value="50"<?=$SiteOptions['PrivateMessagesPerPage'] == 50 ? ' selected="selected"' : ''?>>50</option>
|
||||
<option value="100"<?=$SiteOptions['PrivateMessagesPerPage'] == 100 ? ' selected="selected"' : ''?>>100</option>
|
||||
</select>
|
||||
private messages per page
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="comm_inbsort_tr">
|
||||
<td class="label tooltip" title="This option will force unread private messages to be listed first."><strong>Inbox sorting</strong></td>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user