Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2008, 04:39 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Small pagination problem

please check this page and perform category search at the bottom with "Chats and Forums".

1. I am limiting 8 records to show on the search results per page. But the categories that have more than 8 records (for ex. Chats and Forums) do show the navigation bar, counts the records BUT on click/navigate, it shows empty. I think its loosing the session somehow. This is what I am doing to construct page nav:-

PHP Code:
//construct the page nav
$pagenav construct_page_nav($pagenumber$perpage$linkcount['linkcount'], 'links.php?do=search' $vbulletin->session->vars['sessionurl'] . '&view');
//End construct page nav 
2. Also, how can I carry the search results form data to the next page ? Currently it resets on every page load.

Please test the above problems here

Thank You
Reply With Quote
  #2  
Old 08-02-2008, 02:12 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It seems to be working for me. Did you fix it?
Reply With Quote
  #3  
Old 08-02-2008, 03:12 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it isn't working fine !! I think you are talking about the main links page. Its fine there.

The problem is at the search results page. Just make a search for "Chats and Forums" category and then try to navigate, you would notice the second page says empty which actually isn't.

Thanks
Reply With Quote
  #4  
Old 08-02-2008, 03:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, OK. Notice the link when you go to page 2: http://www.vinayaks.com/testvb/links.php?do=search&view&page=2 You are not passing anything for view. I think, though, you need to pass the category id somehow - set it as a hidden input?
Reply With Quote
  #5  
Old 08-02-2008, 03:56 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ya.. but how do i append the category ID to the URL ??

--------------- Added [DATE]1217696802[/DATE] at [TIME]1217696802[/TIME] ---------------

I am sure it has to do something with this

PHP Code:
$pagenav construct_page_nav($pagenumber$perpage$linkcount['linkcount'], 'links.php?do=search' $vbulletin->session->vars['sessionurl'] . '&view'); 
Reply With Quote
  #6  
Old 08-02-2008, 04:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the variable name you are using for the category? I think you want to put that instead of the 'view' in your line. Something like "&category=Chats%20and%20Forums" ? You also need to pass the parameter for descending/ascending.

(Sorry veenu, forms aren't my strongpoint. I think I've said before that I code by trial and error. :/ )
Reply With Quote
  #7  
Old 08-02-2008, 04:32 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

even I code by trial and error lol

see variable name is $searchcat that contains the category name that is searched for on links.php?do=search

I understand what I wanna do but not able to append category name. When I am putting something like $amp;category=$searchcat , it displays the variable name instead.

I then created a hidden field $searched to store the value of $searchcat, and I notice in source code that it does contain the searched value, but still it shows just the variable instead of the value in the URL.

Thanks
Reply With Quote
  #8  
Old 08-02-2008, 04:58 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well in your first post you had this code.
PHP Code:
$pagenav construct_page_nav($pagenumber$perpage$linkcount['linkcount'], 'links.php?do=search' $vbulletin->session->vars['sessionurl'] . '&view'); 
Which view is being put at the end of the url then vbulletin will add the &page=X. So if you aren't using view you can just remove &view. If you want to use view just do something like this.
PHP Code:
$pagenav construct_page_nav($pagenumber$perpage$linkcount['linkcount'], 'links.php?do=search' $vbulletin->session->vars['sessionurl'] . '&view=' $variable); 
Also here is a article if you haven't found it yet.
Reply With Quote
  #9  
Old 08-02-2008, 05:07 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for replying.. well I had already gone through that article..

PHP Code:
//construct page nav
$pagenav construct_page_nav($pagenumber$perpage$linkcount['linkcount'], 'links.php?do=search' $vbulletin->session->vars['sessionurl'] . '&view=' $searchcat);
//end construct page nav 
This code helped me to append the category to the URL.. but still can't make it to view that second page.. please check it once again.

Thanks

--------------- Added [DATE]1217701132[/DATE] at [TIME]1217701132[/TIME] ---------------

ahhh... got it !!! DONE :up:

Now, last thing:-

How do I carry the search data onto the next page ?? say I searched for "Chats and Forums" in "Ascending" , so I want that both should be selected on the next page and should not reset to default.

Thanks
Reply With Quote
  #10  
Old 08-02-2008, 05:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you using searchid at all? If so, that has those variables in it (this is how vb does it). Or, I suppose you can either a)pass them in the url in your "construct_page_nav" call, or b)make them hidden and then make sure you grab them, and spit them out as hidden again, in your search page.
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:01 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.04444 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (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_postinfo_query
  • fetch_postinfo
  • 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