vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   "New Post" feature include page number of threads? (https://vborg.vbsupport.ru/showthread.php?t=56880)

Sia Bani 09-08-2003 05:03 PM

"New Post" feature include page number of threads?
 
Hello fellas. A lot of my members use the "View New Posts" feature and were wondering if there was anyway to display the page numbers of a thread when the search results came up. Basically, they can either go to the first post or the last post, but there's not option for pages.

Any ideas?

Thanks.

Logician 09-08-2003 08:24 PM

This might be a little tricky because page count is not a fixed number, it changes according to user's settings or your settings in admin cp/options page.

Sia Bani 09-08-2003 09:30 PM

So there's no solution to this?

MetroSports82 09-09-2003 12:26 AM

Open SEARCH.PHP

FIND:
PHP Code:

unset($paperclip);
      } 

UNDERNEATHE ADD:
PHP 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']='';
      } 

SAVE AND CLOSE SEARCH.PHP and UPLOAD.


Now, OPEN your searchresultbit_threadonly TEMPLATE:

FIND:
PHP Code:

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

ADD RIGHT AFTER THAT:
PHP Code:

<smallfont>$searchresult[pagenav]</smallfont

That should do the trick. I've been using this for quite some time on my forums. ;)

Sia Bani 09-09-2003 12:54 AM

Awesome! Thanks.

Sia Bani 09-09-2003 01:00 AM

hmmm...didn't do the trick. Nothing's different. I'm running 2.2.8. Any ideas what the problem is?

MetroSports82 09-09-2003 01:10 AM

Doh! My bad.. Forgot the one step.

OPEN your searchresultbit_threadonly TEMPLATE:

FIND:
PHP Code:

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

ADD RIGHT AFTER THAT:
PHP Code:

<smallfont>$searchresult[pagenav]</smallfont

Sorry about that. :P Now it should come up w/o any problems. Let me know how that goes. :)

thanks.

Sia Bani 09-09-2003 01:20 AM

Thanks very much. Works really well!


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