PDA


View Full Version : Top poster on forum home conflict with vBa


JohnBee
05-10-2005, 01:14 PM
I know I have brought this issue up in another thread but it was more of an
included topic and not the primary focus on that thread.

So I decided to make another more official thread and hopfully enough
information to hopfully help Brian or someone knowlegable see what is where
the interference is coming from.

Problem:
Top posting member in forum home no longer working after vBa installed on
vBulletin 3.0.3.

Hack used:
// Top Poster (Template Mod Style) by Lesane & assassingod (ffdcsite)

Code:
// Top Poster (Template Mod Style)
// Original: Lesane
// vB3 Re-Make: assassingod (ffdcsite)

Step one:
Open up the 'phpinclude_start' template and at the bottom, add:
if (THIS_SCRIPT == "index")
{
$topposter = $DB_site->query_first("
SELECT username,posts,userid
FROM " . TABLE_PREFIX . "user
ORDER BY posts DESC
LIMIT 1
");
}


Step 2:
Now in the FORUMHOME template, add anywhere you want:
<br />
<b>Top Poster:</b> <a href="member.php?$session[sessionurl]u=$topposter[userid]">$topposter[username]</a> (With $topposter[posts] posts!)

After I install vBa on my site, this addon which normally reads:
Congratulations to JohnBee (With 104 posts!) no longer works.

Instead it displays: Congratulations to (With posts!)


Although the top posting feature in vBa 1.0.1 works without a problem
the forum one is the one that is affected.

Any help on this matter is apreciated, I would gladely use another hack
to accomplish this as well :)

Brian
05-10-2005, 01:33 PM
Try removing that code from your phpinclude_start template and place it in your forum/index.php file just above this line instead:
eval('print_output("' . fetch_template('FORUMHOME') . '");');

JohnBee
05-10-2005, 02:20 PM
Excellent stuff Brian!

Thanks again for your help .thumbsup.