PDA

View Full Version : $pagenav in navbar Template to Display on forumdisplay.php


inciarco
07-02-2010, 02:13 AM
$pagenav in navbar Template to Display on forumdisplay.php

Hello.

I've placed $pagenav in navbar Template to be displayed there.

It works fine on all Locations (like showthread.php and private.php) but for forumdisplay.php it doesn't Display the Page Navigation.

- ?What Code Edits should I do for the $pagenav to be Displayed on navbar Template for forumdisplay.php? :confused:

(It's very curious because as I mentioned for all the other Locations it Displays the Page Navigation Fine on navbar).

I Appreciate Your Help and Guide.

My Best Regards.

:)

inciarco
07-30-2010, 06:38 PM
Hello.

Could You Please Point me to the Files I Should Look to be Able to Activate the $pagenav of forumdisplay.php for it to be Displayed on the Navbar Template. :confused:

This can Maybe Point me into the Code I Should Look in those Files and in Similar Ones (like the Ones the Apply on showthread.php), to see if I Can Find and Add the Missing Code for forumdisplay.php to Display the $pagenav on the Navbar Template.

I Appreciate Your Guide and the Pointings You Can Give me to see if I Can Figure How to do it, (If I Solve it I'll Share the Solution in this Thread).

My Best Regards.

:)

Lynne
07-30-2010, 08:39 PM
Look at your showthread template and see where $pagenav is defined (middle of the page) relative to the $navbar (near the bottom) - it's defined before it. Look at the forumdisplay.php page and look at where $pagenav is defined (bottom of the page) relative to the $navbar (top of the page) - it's defined after it. If you want to use $pagenav in the $navbar template, it needs to be defined before it.

inciarco
08-01-2010, 01:10 AM
Look at your showthread template and see where $pagenav is defined (middle of the page) relative to the $navbar (near the bottom) - it's defined before it. Look at the forumdisplay.php page and look at where $pagenav is defined (bottom of the page) relative to the $navbar (top of the page) - it's defined after it. If you want to use $pagenav in the $navbar template, it needs to be defined before it.

THANK YOU VERY MUCH LYNNE !!! :up:

You're Right, by Moving the $navbar Code Block Below the $pagenav Code Block, it Displays on Navbar.

I Share the File Changes for those who Need it:

On forumdisplay.php:

Move the Block Code (Or Copy it and Comment it on it's Original Location with // on Each Line)

// draw nav bar
$navbits = array();
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $vbulletin->forumcache["$forumID"]['title'];
$navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$forumID"] = $forumTitle;
}

// pop the last element off the end of the $nav array so that we can show it without a link
array_pop($navbits);

$navbits[''] = $foruminfo['title'];
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');


Above the Code Line

if (!$vbulletin->GPC['prefixid'] AND $newthreads < 1 AND $unreadchildforums < 1)


And That's it, the Navbar is Displayed and as it's Below the Block Code that Displays the $pagenav, then, as Lynne Instructed, the $pagenav is Displayed in the Navbar Template. :up:

My Best Regards, and Again Thank You Very Much Lynne for Pointing me into this Solution. :up::up::up:

:)

downloadsuk
08-04-2010, 10:54 AM
this might help me here. what is the $pagenav variable? I'm trying to move my navbar around but it won't perform well unless it comes below the header. Can you tell me what's in it?

Lynne
08-04-2010, 01:51 PM
The $pagenav isn't in the navbar or header. It's the series of numbers that indicate which page you are on > 1, 2, 3, etc