Guy G
12-29-2004, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=65934)
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:
// insert new article
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "article
(articleid,title,firstpostid,categoryid,open,artic leusername,articleuserid,dateline,iconid,articleha sh)
VALUES (NULL,'" . addslashes($title) . "',
0,
$c,
$open,
'" . addslashes($bbuserinfo['username']) . "',
'$bbuserinfo[userid]',
" . TIMENOW . ",
$iconid,
'" . addslashes($posthash) . "')");
$newarticleid = $DB_site->insert_id();
under it add:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user
SET user_article_count = user_article_count+1 ");
Now run this query through PhpMyAdmin or something...
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:
$vbphrase[posts]:</span> $post[posts]</div>
directly under it add this(customize colors as you want..):
<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 Click Install! (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=73482) :]
This is an addon for the v3Article hack which can be found HERE (https://vborg.vbsupport.ru/showthread.php?t=65934)
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:
// insert new article
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "article
(articleid,title,firstpostid,categoryid,open,artic leusername,articleuserid,dateline,iconid,articleha sh)
VALUES (NULL,'" . addslashes($title) . "',
0,
$c,
$open,
'" . addslashes($bbuserinfo['username']) . "',
'$bbuserinfo[userid]',
" . TIMENOW . ",
$iconid,
'" . addslashes($posthash) . "')");
$newarticleid = $DB_site->insert_id();
under it add:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user
SET user_article_count = user_article_count+1 ");
Now run this query through PhpMyAdmin or something...
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:
$vbphrase[posts]:</span> $post[posts]</div>
directly under it add this(customize colors as you want..):
<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 Click Install! (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=73482) :]