vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - Vbadvanced Recent Thread pagination (https://vborg.vbsupport.ru/showthread.php?t=274647)

felixthekat85 11-24-2011 11:00 PM

Vbadvanced Recent Thread pagination
 
1 Attachment(s)
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

v123shine 11-26-2011 01:42 PM

Good idea...like it bro :)

vijayninel 11-26-2011 04:24 PM

Nice mod... :)

Lustikus 01-25-2012 10:11 AM

can anybody pls update to vb 4.x ???

too_cool_3 08-08-2012 01:36 PM

Anyone capable of updating this to work in vB4? Would be much appreciated.

mahmo0od 09-27-2012 01:29 AM

thank u friend
good job

matrex722 11-10-2012 12:33 PM

Wow thanks for this
i think i gonna use it

al2thero 11-13-2012 06:28 AM

i will try it

al2thero 11-25-2012 06:51 PM

thank u friend

viper357 10-14-2014 08:29 AM

This seems to only be partially working on vb 3.8.5 and vba 3.2.1. The pagenav is not showing up, just a blank line.

Is there anybody out there that can have a look and provide a fix? Pretty please? :)

RELAX13 10-29-2014 12:05 PM

Good Id :D


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01116 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete