vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   showing pagenumbers when searching (https://vborg.vbsupport.ru/showthread.php?t=35772)

Crapforum 03-06-2002 07:26 AM

showing pagenumbers when searching
 
I would like to show the pagenumbers of topics too, when you do a search (active topics f.i.)

Does this take a lot of queries?
Can this be done easily?

thx,
www.crapforum.nl

Crapforum 03-07-2002 09:12 AM

guess not :(

Admin 03-27-2002 06:19 AM

I know this is old but I had this thread in my bookmarks and I'm just cleaning up. ;)

Anyhow, in search.php add this:
Code:

      if (($bbuserinfo['maxposts'] != -1) and ($bbuserinfo['maxposts'] != 0)) {
        $maxposts = $bbuserinfo['maxposts'];
      }
      if (($searchresult['replycount']+1) > $maxposts and $linktopages) {
                $thread = $searchresult; // for templates
        $totalpages = ($searchresult['replycount']+1)/$maxposts;
        if ($totalpages != intval($totalpages)) {
          $totalpages = intval($totalpages)+1;
        }

        $acurpage = 0;
        $pagenumbers = '';
        while ($acurpage++ < $totalpages) {
          if ($acurpage == $maxmultipage) {
            eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_more')."\";");
            break;
          } else {
            eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_pagenumber')."\";");
          }
        }
        eval("\$searchresult[pagenav] = \"".gettemplate('forumdisplay_multipagenav')."\";");
      } else {
        $searchresult['pagenav']='';
      }

right after this:
Code:

      } else {
        unset($paperclip);
      }

(yes, this is rudely taken from forumdisplay.php)

And now in your searchresultbit_threadonly template add:
Code:

<smallfont>$searchresult[pagenav]</smallfont>
in the same line after:
Code:

$searchresult[threadtitle]</a></normalfont>

Crapforum 03-27-2002 05:43 PM

wow, thx...

i will give it a try.

heynurse 05-06-2002 07:20 PM

My users had this exact request, since they use the "Todays Active Threads" link alot, I just followed FireFly directions and it worked great! Thanks FireFly!


All times are GMT. The time now is 02:27 AM.

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.00975 seconds
  • Memory Usage 1,718KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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