PDA

View Full Version : Some things I need help with


Mijae
12-30-2002, 06:10 PM
I want to have the following info displayed on my forum front page:

User's Posts
User's Title
User's Registry date
User's ID
Total Members registered today
Total Forum Hits
Total Thread/Post views
Top 5 posters

I have the following hacks installed: New Statistiks, vbStats

What do I have to edit in index.php to get all the above to display?

Mijae
01-03-2003, 08:13 PM
Bah, anyone? This should be easy for someone >_<

Logik
01-03-2003, 08:22 PM
I think i know a few :). Im new to php so..

User id

$post[userid]


User number

#$post[userid]


And i uno the rest.. :ermm:

Logik
01-03-2003, 08:24 PM
I could be wrong

Mijae
01-03-2003, 08:46 PM
But I need the code to be placed into index.php, not the variables I have to use.

Logik
01-03-2003, 08:52 PM
Oh... Uhm... Might want to ask someone else. Lol..

Dean C
01-03-2003, 08:55 PM
1/ $bbuserinfo[posts]
2/ $bbuserinfo[title] (i think)
3/ requires hacking
4/ $bbuserinfo[userid]
5/ requires hacking
6/ requires hacking
7/ $totalthreads | requires hacking
8/ requires hacking

Regards

- miSt

filburt1
01-03-2003, 10:20 PM
8: put this in phpinclude:

if (strpos($_SERVER['PHP_SELF'], "index.php") != false)
{
$result = $DB_site->query("SELECT userid, username, posts FROM user ORDER BY posts DESC LIMIT 5");
$top5 = array();
$shash = $session['sessionhash'];
while ($bits = $DB_site->fetch_array($result))
{
$userid = $bits['userid'];
$username = $bits['username'];
$posts = $bits['posts'];
array_push($top5, "<a href=\"member.php?s=$shash&action=getinfo&userid=$userid\" target=\"blank\">$username</a> with $posts posts");
}
$top5 = implode("<br>\n", $top5);
}

Then put $top5 where you want the list to show up in forumhome.

Dean C
01-04-2003, 11:44 AM
That adds one query - right?

- miSt

Logik
01-04-2003, 07:23 PM
thats nice filburt. :)

filburt1
01-09-2003, 05:40 PM
Originally posted by Mist
That adds one query - right?

- miSt

Right, but only to forumhome.