Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Fred (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-12-2001 Last Update: Never Installs: 0
 
No support by the author.

How can I add the person's pm count to their post count. And then add all the pm count to the total post count at the top??

Could someone please help me with this. I've been asking for months and still no help!

Show Your Support

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

Comments
  #12  
Old 08-15-2001, 09:13 PM
BDJ
Guest
 
Posts: n/a
Default

Hmm...there's maybe a really non-server intensive way to do it...but i don't know it.


maybe create a script like this..

drop this in your vB directory...

Code:
<?php

include('./global.php');

$users = $DB_site->query("SELECT userid,posts FROM user");


while ($userrow = $DB_site->fetch_array($users)) {
    $pm = $DB_site->query("SELECT count(*) FROM privatemessage WHERE fromuserid=$userrow[userid] AND folderid>=0");
    $pmcount = mysql_result ($pm,0);
    $update = $DB_site->query("UPDATE user SET posts=posts+$pmcount WHERE userid=$userrow[userid]");
}

?>
Try running that and see if it works - maybe not the most efficient code or anything..but it might work
Reply With Quote
  #13  
Old 08-16-2001, 12:34 AM
Sarge
Guest
 
Posts: n/a
Default

Quote:
Originally posted by BDJ
Well, I don't know about old private messages, but the new ones should be easy enough to do.
Try adding this code to the private.php file (right after the INSERT command for a PM).

Code:
$DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$bbuserinfo[userid]");




Can you give me the line where to insert this?
I added it and it didn't work "Probably added it in the wrong place"

Version 2.0.0
Reply With Quote
  #14  
Old 08-16-2001, 02:51 AM
BDJ
Guest
 
Posts: n/a
Default

look under the section that starts with

if ($HTTP_POST_VARS[action] == 'dosend')

then, go down a little bit and you'll see a line that starts like this:
$DB_site->query("INSERT INTO privatemessage....

then,just insert that line of code after that.

(if it doesn't work - tell me; i'll test it out on my system. Right now, this is all from my head - don't know if it'll actually work)
Reply With Quote
  #15  
Old 08-16-2001, 03:47 AM
Sarge
Guest
 
Posts: n/a
Default

does not work

here is what i added

// enhanced - added $receipt to insert
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignatur e,iconid,messageread,folderid,receipt) VALUES (NULL,$touserinfo[userid],$touserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($title))."','".add slashes($message)."',".time(). ",'$signature','$iconid',0,0,$receipt)");
$DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$bbuserinfo[userid]");
// enhanced
Reply With Quote
  #16  
Old 08-16-2001, 03:48 AM
Sarge
Guest
 
Posts: n/a
Default

200 posts WHOOAH!

Any clues dude?
Reply With Quote
  #17  
Old 08-16-2001, 07:19 AM
BDJ
Guest
 
Posts: n/a
Default

I don't know dude...I just installed it on my system and it worked fine..

hmmmm
Reply With Quote
  #18  
Old 08-16-2001, 01:20 PM
Sarge
Guest
 
Posts: n/a
Default

did you install it in the same place as me?
Where I cut and pasted?
Reply With Quote
  #19  
Old 08-16-2001, 03:22 PM
BDJ
Guest
 
Posts: n/a
Default

yep.
Reply With Quote
  #20  
Old 08-16-2001, 05:50 PM
Sarge
Guest
 
Posts: n/a
Default

doesn't work for me at all
Reply With Quote
  #21  
Old 08-18-2001, 01:40 AM
Fred
Guest
 
Posts: n/a
Default

Ed Sullivan, I know you can do this. Can you help us out?
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 04:46 PM.


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.04869 seconds
  • Memory Usage 2,273KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (1)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • 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