vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Next - Previous page (emergency) (https://vborg.vbsupport.ru/showthread.php?t=160591)

Mecho 10-19-2007 04:00 PM

Next - Previous page (emergency)
 
Hi ,

i want to make a Next - Previous page function in one site , so if ppl click on Next they will redirect to Second and ... pages and when they click on Previous button they will back to the Previous pages and main page ..

i would appreciate if someone help me . thanks :up:

MoT3rror 10-20-2007 02:46 AM

Here is a article about paging.
https://vborg.vbsupport.ru/showthrea...ighlight=pages

Mecho 10-20-2007 11:31 AM

Thanks man . but that Article is for VBulletin .. i need that code for other kind of site ..

thanks anyway

Opserty 10-20-2007 12:12 PM

You can adapt it to what you need most of the work is here which is fairly independent of vB:
PHP Code:

/*======================================================*\
 * Taken from: https://vborg.vbsupport.ru/showthread.php?t=120540
\*======================================================*/

 // Default lower and upper limit variables
    
$limitlower = ($pagenumber 1) * $perpage 1;
    
$limitupper $pagenumber $perpage;
    if (
$limitupper $bannedcount['bannedcount'])
    {
        
// Too many for upper limit
        
$limitupper $bannedcount['bannedcount'];
        if (
$limitlower $bannedcount['bannedcount'])
        {
            
// Too many for lower limit
            
$limitlower $bannedcount['bannedcount'] - $perpage;
        }
    }
    if (
$limitlower <= 0)
    {
        
// Can't have negative or null lower limit
        
$limitlower 1;
    } 

$pagenumber - Current page your on
$perpage - Number of X's to display on each page
$bannedcount['bannedcount'] - The number of the total X's

Mecho 10-20-2007 01:08 PM

u mean i have to add this code to my page then make buttons ??? if so would u plz tell me how can i buttons too ?
how i put commands for those buttons ( next/Previous )

sorry but i'm soooo noob in these stuff but i have to make these 2 button in the page . thanks

Mecho 10-28-2007 09:24 PM

anyone ???


All times are GMT. The time now is 10:28 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.00959 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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