Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3 Articles, How many Articles a user made (in postbit) Details »»
v3 Articles, How many Articles a user made (in postbit)
Version: 1.00, by Guy G Guy G is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-29-2004 Last Update: Never Installs: 7
 
No support by the author.

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 Click Install! :]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-16-2005, 04:31 AM
Amavisca Amavisca is offline
 
Join Date: Oct 2003
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Guy G
Possible of course...

Ill see what i can do.
Ya plz do it, I was gonna have the same question 4 u
Reply With Quote
  #13  
Old 01-17-2005, 06:59 PM
Guy G Guy G is offline
 
Join Date: Nov 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amavisca
Ya plz do it, I was gonna have the same question 4 u
Ok im not sure this gonna happen, a new article system came out, a better one...
Reply With Quote
  #14  
Old 03-14-2005, 03:39 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way so that the number of articles written is shown only if the members has 1 article or more? not many of my members post articles and I would not like to see a bunch of
Quote:
"articles written : 0"
all over my site..
Reply With Quote
  #15  
Old 03-14-2005, 05:04 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably
PHP Code:
<if condition="$post[user_article_count]">Articles Written$post[user_article_count]</if> 
Reply With Quote
  #16  
Old 03-14-2005, 05:34 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Probably
PHP Code:
<if condition="$post[user_article_count]">Articles Written$post[user_article_count]</if> 
thanks kall... I will give it a try
Reply With Quote
  #17  
Old 03-15-2005, 09:40 AM
Guy G Guy G is offline
 
Join Date: Nov 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
<if condition="$post[user_article_count]">Articles Written: $post[user_article_count]</if>
if that wont work than this might

HTML Code:
<if condition="$post[user_article_count] >= 1">
<div class="postbit" align="left"">
                    <span style="color: #8B9DB0; font-weight: bold">Articles Written:</span> $post[user_article_count]</div>
[/if]
Reply With Quote
  #18  
Old 03-15-2005, 12:16 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm starting to have some problems with v3articles .... now I'm almost in the 130th article and it seems like the system just cant handle more articles... so I think I will start looking into other options :ermm:

thank you for the help anyways, I really appreciate it...
Reply With Quote
  #19  
Old 08-26-2005, 01:14 PM
commTRU commTRU is offline
 
Join Date: May 2005
Location: Tyne and Wear, UK
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a really useful add-on.. Sadly I can't seem to get it to work. In the post bit it says that everyone has posted a article when I have :\

Its a really good idea though
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:08 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04512 seconds
  • Memory Usage 2,308KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (7)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete