Back to vBulletin 3.0 Add-Ons

v3 Articles, How many Articles a user made (in postbit)
Mod Version: 1.00, by Guy G

This modification is in the archives.
vB Version: 3.0.3 Rating: (1 vote - 5.00 average) Installs: 7
Released: 30 Dec 2004 Last Update: Never Downloads: 0
Not Supported  

This is my first hack so please be nice to me :P
This is an addon for the v3Article hack which can be found HERE
Anyway, this hack will add a field in the postbit for how many articles a user has posted.

Specs:
Templates Edited:1
Queries added: 1 during new article post.
File Edits: 1
Tables Changed: 1
Installation Time: 3min

So, first of all open Article.php and find the following code:
PHP Code:
// insert new article
    
$DB_site->query("INSERT INTO " TABLE_PREFIX "article
    (articleid,title,firstpostid,categoryid,open,articleusername,articleuserid,dateline,iconid,articlehash)
    VALUES (NULL,'" 
addslashes($title) . "',
    0,
    
$c,
    
$open,
    '" 
addslashes($bbuserinfo['username']) . "',
    '
$bbuserinfo[userid]',
    " 
TIMENOW ",
    
$iconid,
    '" 
addslashes($posthash) . "')");
    
$newarticleid $DB_site->insert_id(); 
under it add:
PHP Code:
        $DB_site->query("UPDATE " TABLE_PREFIX "user 
        SET user_article_count = user_article_count+1 "
); 
Now run this query through PhpMyAdmin or something...
PHP Code:
ALTER TABLE vb3_user` ADD `user_article_count` INT(10) UNSIGNED DEFAULT '0' NOT NULL; 
note that "vb3" should be your table prefix!

now after you done that its time for template editing..
go to postbit_legacy (for me) and search for this line:
PHP Code:
$vbphrase[posts]:</span$post[posts]</div
directly under it add this(customize colors as you want..):
PHP Code:
<div class="postbit" align="left"">
                    <span style="
color#8B9DB0; font-weight: bold">Articles Written:</span> $post[user_article_count]</div> 
note: if you already created articles than it will not update your status, you will need to manually add the numbers to the ppl who posted articles.

Feel free to comment and enhance this hack by any way.

Thats it! your done :]

Download

No files for download.

Screenshots

 

Similar Mods

[v3 Articles] Printable Articles vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024