PDA

View Full Version : Another hack


Ian
08-23-2004, 07:27 PM
It works on every page apart from the CMPS index page and I can't for the life of me figure out why (Please help Brian :))

This is the hack: New posts and threads v.2 (http://www.vbulletin.org/forum/showthread.php?t=66058)

I'm trying to add the post bit into the navbar.

I appreciate it's not really your problem, but it's not really the other guys either as it works fine on every page in vB itself.

The first picture shows the the CMPS page, the second pages within vb.

Brian
08-24-2004, 11:32 AM
In your forum/includes/vba_cmps_include_bottom.php file look for:

global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;

Replace that with:

global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $newposts;

And that should fix the problem. :)

Our Sponsors
 

Ian
08-24-2004, 12:59 PM
Works like a charm, well, apart from it reports 1 new post, when on the other pages it says 13 ;)

Any ideas on that one Brian?

And thanks a lot for the fix above too :)

Brian
08-24-2004, 02:39 PM
Strange... Try this instead. Look for:
function construct_adv_navbar($navbits = '', $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;


And remove it. Then just below that find:
return $navbar;
}


And remove that as well.

Our Sponsors
 

Ian
08-24-2004, 03:10 PM
That's fixed it, thanks a lot (again) Brian :)

Ian
03-11-2005, 09:52 PM
Me again, having the same problem with the new version, and I can't spot the above code to make the same change.

Brian
03-12-2005, 10:32 AM
Add 'newposts' to your 'Portal Output Global Variables' option.

Ian
03-14-2005, 02:07 PM
That fixed it not appearing at all, but the same problem as in post 3 of this thread is happening now though.

Brian
03-14-2005, 02:18 PM
Try adding 'newthreads' there as well and see if that helps.

Ian
03-14-2005, 02:29 PM
I don't use that part of the hack, I just use the $newposts part.

Brian
03-14-2005, 03:31 PM
Do you have the 'Show new posts' option enabled for the welcomeblock? That module uses $newposts as the variable, so it may be that the two are clashing.

Ian
03-14-2005, 05:56 PM
I do, I've changed the variable name for the navbar and now all is good.

Thanks for you guidance master :)