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

Reply
 
Thread Tools
Posts Made by User Over the Past Week and PPD Trend Details »»
Posts Made by User Over the Past Week and PPD Trend
Version: 1.00, by Gamingforce Gamingforce is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-31-2002 Last Update: Never Installs: 13
 
No support by the author.

[ Feature Description ]
While I was taking a shower I thought it would be pretty cool to display how many posts someone made over the past 7 days (week) and show how active the user was over that period of time compared to normal.

The posts made over the past 7 days is pretty much self explanatory but let me explain the trend part. Say your current posts per day is 100. Over the past week you made 140 posts making the ppd average for the past 7 days 20. Your ppd trend is -80 posts per day for the past 7 days. If you don't post at all that week, and your ppd is 100, your trend will be -100. I thought it was a clever way to show how active the user was over the past week.

The query runs pretty fast even on my database of over 700k posts. Only one block of code to add to member.php and one template to edit!

[ What you need to modify/add ]
File to modify: member.php (1 time)
Templates to modify: getinfo
Templates to add: none

[ Tested on ]
vBulletin version 2.2.6 (should work on any vB 2+)

[ Example ]
http://www.gamingforce.com/forums/me...fo&userid=2262

Enjoy, and as always, comments are appreciated!

Show Your Support

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

Comments
  #2  
Old 08-01-2002, 11:23 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool!

Satan
Reply With Quote
  #3  
Old 08-01-2002, 01:19 PM
Massiel Massiel is offline
 
Join Date: Feb 2002
Location: Australia
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow your forums are mega cool!!
Reply With Quote
  #4  
Old 08-01-2002, 02:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't already have an index on dateline (post table), one might speed up the query.
Reply With Quote
  #5  
Old 08-01-2002, 02:22 PM
afterlab's Avatar
afterlab afterlab is offline
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job, gamingforce. I'll be planning to install this onto my forums.
Reply With Quote
  #6  
Old 08-01-2002, 03:08 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't suppose anybody could post of a picture of what this looks like, unless it's really simple. Maybe even a text version..

Anyways, it sounds cool, I'll defiantly have to add it
*clicks install*
Reply With Quote
  #7  
Old 08-01-2002, 03:26 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Gamingforce
Your forum looks nice. Can you tell me, which hacks you used in the member bios?

Thanks!
Reply With Quote
  #8  
Old 08-01-2002, 04:31 PM
kenny@ecn kenny@ecn is offline
 
Join Date: Apr 2002
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need some help, that second step has me baffled:

Quote:
STEP TWO -> Modify template: getinfo

[[ FIND ]]]

Add "$postsweek posts made over the past seven days. (trend: $ppdtrend posts per day)" to the getinfo template (according to your design) to display how many posts the user has made in the past week and their post per day trend!

What do I find to replace? What do I do? Some advice? THanks.


-Kenny
Reply With Quote
  #9  
Old 08-01-2002, 04:35 PM
kenny@ecn kenny@ecn is offline
 
Join Date: Apr 2002
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is my getinfo template, can someone just add it in there for me? lol

Quote:
{htmldoctype}
<html>
<head>
<title>$bbtitle - View Profile</title>
$headinclude
<script language="javascript" type="text/javascript">
<!--
function aimwindow(aimid) {
window.open("member.php?s=$session[sessionhash]&action=aimmessage&aim="+aimid,"_blank","toolbar=n o,location=no,menubar=no,scrollbars=no,width=175,h eight=275,resizeable=yes,status=no")
}
// -->
</script>
</head>
<body>
$header

<br>

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr id="cat">
<td align="left"><normalfont color="{tableheadtextcolor}"><b>Profile For $userinfo[username]</b></normalfont></td>
<td align="right"><a href="search.php?s=$session[sessionhash]&action=finduser&userid=$userinfo[userid]"><smallfont color="{tableheadtextcolor}" class="thtcolor">Search for all posts by this user.</smallfont></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Date Registered:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[datejoined]</normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Status:</b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$userinfo[usertitle]&nbsp;<img src="$userinfo[avatarurl]" border="0" align="middle"></normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Last Post:</b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$lastpostdat e $lastposttime<br><a href="$lastposturl">$lastposttitle</a>$nolastpost</normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Contact $userinfo[username]:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>
<a href="member.php?s=$session[sessionhash]&action=mailform&userid=$userinfo[userid]">Click here to email $userinfo[username]</a>
$userinfo[sendpm]
</normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Homepage: </b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont><a href="$userinfo[homepage]" target="_blank">$userinfo[homepage]</a>&nbsp;</normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>ICQ Number:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[icq] <!-- $ userinfo[icqicon] THE ICQ FLOWER - remove comments --></normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>AOL Instant Messenger Handle:</b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$userinfo[aim] <!-- $ userinfo[aimicon] AIM ICON - remove comments --></normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Yahoo Instant Messenger Handle:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[yahoo] <!-- $ userinfo[yahooicon] YAHOO ICON - remove comments --></normalfont></td>
</tr>
$referrals
$birthday
$customfields
<tr>
<td bgcolor="{tableheadbgcolor}" align="center" colspan="2"><smallfont>
<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=buddy&userid=$userinfo[userid]"><font color="{tableheadtextcolor}">Add $userinfo[username] to Your Buddy List</font></a>
&nbsp; &nbsp;
<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=ignore&userid=$userinf o[userid]"><font color="{tableheadtextcolor}">Add $userinfo[username] to Your Ignore List</font></a>
</smallfont></td>
</tr>
</table>
</td></tr></table>

<br>

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
<td align="center"><smallfont><b>
Administrative Options: <a href="moderator.php?s=$session[sessionhash]&action=useroptions&userid=$userinfo[userid]">User Options</a>
</b></smallfont></td>
</tr>
</table>

$footer

</body>
</html>
Reply With Quote
  #10  
Old 08-01-2002, 06:39 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Keeny in get info just add this as an example

Latest Posts From $userinfo[username]<br>Who has made $postsweek posts within last 7 Days($ppdtrend posts per day)
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 06:12 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.04676 seconds
  • Memory Usage 2,312KB
  • 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
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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