Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2004, 11:34 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vb's page nav

hi, well im sort of confused on how to correctly use this feature and exactly what function to do, i have used it before and it did not work correctly for me.

can someone show me how to use it
Reply With Quote
  #2  
Old 07-09-2004, 11:45 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What are you talking about?
Reply With Quote
  #3  
Old 07-09-2004, 11:51 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
What are you talking about?
Im with Jolten on this one
Reply With Quote
  #4  
Old 07-09-2004, 11:54 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb's pagination function i hope you know zac cause its a built in vb feature
Reply With Quote
  #5  
Old 07-09-2004, 11:55 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
vb's pagination function i hope you know zac cause its a built in vb feature
Oh that thing, it runs a query on the table, whichever it may be and finds out how many pages there should be links to, i think
Reply With Quote
  #6  
Old 07-10-2004, 12:03 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could you post an example code, i always mess this up
Reply With Quote
  #7  
Old 07-10-2004, 12:04 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ooo.. okay.. yeah.. that thing..
Reply With Quote
  #8  
Old 07-10-2004, 01:57 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im getting division by zero on 1707 in /includes/functions.php

my code is:
PHP Code:
            $countj$DB_site->query_first("SELECT COUNT(*) AS journals FROM ".TABLE_PREFIX."journals WHERE active='1'");
            
$pgnavconstruct_page_nav($countj[journals], journal.php); 
i think did it right and for the page nav being displayed it says "Page of 0"
Reply With Quote
  #9  
Old 07-10-2004, 07:01 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i fixed the division by zero part but im still experiencing alot of problems, first off it doesnt say which page i am on currently it just says page blank of 2. secondly if it goes past 3 page it doesnt show the 3rd one and if your on page 2 the next arrow leads you back to page 1. what did i do wrong

my code:
PHP Code:
            $countj$DB_site->query_first("SELECT COUNT(*) AS journals FROM ".TABLE_PREFIX."journals WHERE active='1'");
            
$perpage1;
            if(empty(
$page))
            {
                
$page1;
            }
            
$start= (($page $perpage) - $perpage);
            
$pgnavconstruct_page_nav($countj[journals], "journal.php?""pp=$perpage");
            
$fjournals$DB_site->query("SELECT
             journals.journal_id,journals.journalname,journals.journaldesc,
            journals.journalist,journals.journalist_id,journals.lastentry,
            journals.lastentry_date,journals.lastentry_id,journals.journalviews,
            journals.journal_totalrating AS totalrating,journals.journal_totalvotes AS totalvotes,COUNT(journal_entries.entry_id) AS entries
             FROM "
.TABLE_PREFIX."journals
            LEFT JOIN journal_entries 
            ON (journals.journal_id=journal_entries.journal_id AND entry_active=1) 
            WHERE journals.active='1'  
            GROUP BY journals.journal_id 
            LIMIT 
$start,$perpage
            "
); 
Reply With Quote
  #10  
Old 07-10-2004, 10:17 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am still experiencing problems i need help

here is my updated code:
PHP Code:
            $countj$DB_site->query_first("SELECT COUNT(*) AS journals FROM ".TABLE_PREFIX."journals WHERE active='1'");
            
$perpage2;
            if(empty(
$page))
            {
                
$page1;
            }
            
$pagenumber $page+1;
            if (
$pagenumber 1)
            {
                
$pagenumber 1;
            }
            else if (
$pagenumber $countj['journals'])
            {
                
$pagenumber $countj['journals'];
            }
            
$start= (($page $perpage) - $perpage);
            
$pgnavconstruct_page_nav($countj['journals'], "journal.php?""&pp=$perpage");
            
$fjournals$DB_site->query("SELECT
             journals.journal_id,journals.journalname,journals.journaldesc,
            journals.journalist,journals.journalist_id,journals.lastentry,
            journals.lastentry_date,journals.lastentry_id,journals.journalviews,
            journals.journal_totalrating AS totalrating,journals.journal_totalvotes AS totalvotes,COUNT(journal_entries.entry_id) AS entries
             FROM "
.TABLE_PREFIX."journals
            LEFT JOIN journal_entries 
            ON (journals.journal_id=journal_entries.journal_id AND entry_active=1) 
            WHERE journals.active='1'  
            GROUP BY journals.journal_id 
            LIMIT 
$start,$perpage
            "
); 
it seems as though my page is messing me up, it seems as though it affects my $start variable when i use ++ or +1 in the defining of $pagenumber. can someone help me define $pagenumber correctly
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09552 seconds
  • Memory Usage 2,283KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete