PDA

View Full Version : [REQUEST] Count PM's as posts


Fred
07-02-2001, 12:19 AM
Anyone know how to count your pm's and add them to the post count at the top? is it a hack?

Fred
07-03-2001, 12:46 AM
upin'

joebob
07-03-2001, 06:33 PM
like on my board?

copyforum.com (http://www.copyforum.com)

Fred
07-04-2001, 06:29 AM
maybe.. dunno.. cant enter the forum without joining

joebob
07-04-2001, 12:06 PM
well join and see

G0D
07-04-2001, 12:19 PM
put this in your index.php

find:

$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");

UNDER it add:

$allpmcount=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage");


and if you want to add your pm count to your post count do this:
FIND:

$totalposts=$countposts['posts'];

REPLACE it with:

$totalposts=$countposts['posts']+$allpmcount;


you can also display the pmcount like this:
edit the template forumhome and put a text there like: total PM's: $allpmcount[messages]

Fred
07-05-2001, 06:50 PM
Thanks a lot. I'll try it in a bit.

Fred
07-05-2001, 10:28 PM
Doesn't work. Gives weird errors.

Fred
07-07-2001, 05:41 AM
anyone help?

Sarge
07-24-2001, 07:23 PM
I would really like to have this

A next addon would be under their post.. it lists their postcount and pm count!