A better way would be to add a new field to the user table instead -- this way you don't end up modifying original forum behaviour. Assuming your vBulletin tables have no prefix, you could run this query:
Code:
ALTER TABLE user ADD totalposts int(10) UNSIGNED NOT NULL DEFAULT '0' AFTER posts
And then, to populate them initially,
Code:
UPDATE user SET totalposts = posts
From now on, the 'totalposts' field will be available through $vbulletin->userinfo['totalposts'], or $bbuserinfo['totalposts'] for templates. To update totalposts whenever someone successfully makes a post, you could use the Plugin Manager to add the necessary code to, say, the
postdata_postsave plugin hook. (Doing this will also circumvent non-postcount forum behaviour.)
Code:
$this->dbobject->query_write("UPDATE " . TABLE_PREFIX . "user SET totalposts = (totalposts + 1) WHERE userid = " . intval($this->fetch_field('userid')));
I haven't tried it out myself, hopefully it works
(Note: the database object above corresponds to vBulletin 3.5x, you should check if your own install has the same syntax.)
Most amazing jew boots