Back to vBulletin 3.8 Template Modifications

Vbadvanced Recent Thread pagination
Mod Version: 1.00, by felixthekat85

vB Version: 3.8.x Rating: (1 vote - 5.00 average) Installs: 5
Released: 25 Nov 2011 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

This is one modification I made to recenthread.php to display a pagination as news.php

I'm no expert on this, in fact. I do not know anything. I'm sure someone with more knowledge, can upgrade.

Sorry my bad english

Modules/recentthreads.php
Find
Code:
if ($mod_options['portal_threads_maxthreads'])
{
Add after
Code:
/////PAGINATION By Felixthekat////////////
$perpage = 10;
$itemcount = $db->query_first("SELECT count(thread.threadid) as itemcount FROM " . TABLE_PREFIX . "thread as thread
$rthread_join
WHERE open != 10
AND thread.visible = 1 " .
iif($mod_options['portal_threads_cutoffdate'],
'AND thread.lastpost > ' . (TIMENOW - $mod_options['portal_threads_cutoffdate'] * 86400)
) .
iif($ignusers,
' AND thread.postuserid NOT IN(' . $ignusers . ')'
) . "$vba_threads_condition");
$pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);
sanitize_pageresults($itemcount['itemcount'], $pagenumber, $perpage,$perpage,$perpage); 
$limitlower = ($pagenumber - 1) * $perpage + 1; 
$limitupper = $pagenumber * $perpage; 
if ($limitupper > $itemcount['itemcount'])
{
$limitupper = $itemcount['itemcount'];
if ($limitlower > $itemcount['itemcount'])
{
$limitlower = $itemcount['itemcount'] - $perpage;
}}
if ($limitlower <= 0)
{
$limitlower = 1;
}
$pagenav = construct_page_nav($pagenumber, $perpage, $itemcount['itemcount'], 'index.php?');
/////////////////////////////////
Find
Code:
LIMIT $mod_options[portal_threads_maxthreads]
Replace
Code:
LIMIT " . ($limitlower - 1) . ", $perpage
Go to Admincp > Styles and Templates > Your template > Templates of vbadvanced CMPS > adv_portal_recthreads_exp_head
add to the end
Code:
<tr>
<td>
$pagenav
</td>
</tr>
Enjoy!!

Screenshot

Download

No files for download.

Screenshots

Click image for larger version
Name:	RecentThreadPag.jpg
Views:	599
Size:	87.1 KB
ID:	134690  


vblts.ru supports vBulletin®, 2022-2024