View Full Version : mod for cinq's hack (article)
Allan
04-11-2005, 09:16 PM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For this hack (https://vborg.vbsupport.ru/showthread.php?t=74189&highlight=articles)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Would it be possible to carry out a MOD which makes it possible to see in the postbit the number of articles written by the user ?
and if possible that one can click above to go directly to the articles ;)
KTBleeding
04-11-2005, 11:42 PM
I've been wanting this for a while.. hopefully it can be done.
Allan
04-12-2005, 07:12 AM
Big thank to "tnguy3n" for this mod :)
1. File Mod
Open includes/functions_showthread.php ,
FIND:
// format posts number
$post['posts'] = vb_number_format($post['posts']);
BELOW, ADD:
// show user articles in postbit
$userarticle = $DB_site->query_first("
SELECT COUNT(articles_articleid) AS articles FROM " . TABLE_PREFIX . "articles_article
WHERE author = $post[username]");
$totalarticles = $userarticle['articles'];
Save & close.
2. Template mod:
Open postbit(_legacy), (1 change)
FIND:
$vbphrase[posts]: $post[posts]
BELOW, ADD:
<if condition="($totalarticles != 0)"><br><smallfont>User Articles: <a href="articles.php?$session[sessionurl]">$totalarticles</a></smallfont></if>
that's it.
KTBleeding
04-12-2005, 12:35 PM
Thanks!
FYI this will add one query per each post in a thread if I am not mistaken. so if you have a bunch of replies you could take a page load hit.
KTBleeding
04-12-2005, 06:05 PM
That's okay, I was planning on putting it in the profile rather than the postbit.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.