vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Posts Made by User Over the Past Week and PPD Trend (https://vborg.vbsupport.ru/showthread.php?t=41764)

Gamingforce 07-31-2002 10:00 PM

Posts Made by User Over the Past Week and PPD Trend
 
[ 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!

Chris M 08-01-2002 11:23 AM

Cool!:)

Satan

Massiel 08-01-2002 01:19 PM

Wow your forums are mega cool!!

Admin 08-01-2002 02:07 PM

If you don't already have an index on dateline (post table), one might speed up the query.

afterlab 08-01-2002 02:22 PM

Good job, gamingforce. I'll be planning to install this onto my forums.

Velocd 08-01-2002 03:08 PM

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..:p

Anyways, it sounds cool, I'll defiantly have to add it :D
*clicks install*

Birdie501 08-01-2002 03:26 PM

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

Thanks!

kenny@ecn 08-01-2002 04:31 PM

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

kenny@ecn 08-01-2002 04:35 PM

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>

Mr_P 08-01-2002 06:39 PM

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)


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01293 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete