Thread: Miscellaneous Hacks - Reputation Report
View Single Post
  #28  
Old 08-28-2008, 02:51 AM
eviltechie eviltechie is offline
 
Join Date: Mar 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the idea of this mod. I was actually thinking I'd have to write it myself, but you saved me some work.

That said, I did notice a few problems with it.

1. The repreport.php file is missing quite a few instances of TABLE_PREFIX. This caused errors until I fixed them. I've attached a fixed version of the file with full TABLE_PREFIX'ing.

2. The templates had some bugs. Missing closing </form> tags. Extra </table> closing tags. Line breaks in weird places, etc. Below are my modified versions...in case anyone needs them.

RepReport
PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<!-- 
no cache headers -->
<
meta http-equiv="Pragma" content="no-cache" />
<
meta http-equiv="Expires" content="-1" />
<
meta http-equiv="Cache-Control" content="no-cache" />
<!-- 
end no cache headers -->
<
title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase> - Reputation Report</title>
$headinclude
</head>
<
body>
$header
$navbar
<!-- main -->

<
form name="vbform" action="repreport.php?do=rank&rb=$rb&mu=$mu">
<
input type="hidden" value="rank" name="do" />
<
input type="hidden" value="submit" name="action" />
<
input type="hidden" value="$rbname="rb" />
<
input type="hidden" value="$muname="mu" />

<
table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='80%' align='center'>
<
tr align='center'>
<
td class='thead'><div class="smallfont"><b><center>RANKED BY</b></center></center></div></td>
<if 
condition="$rb == ''">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=1&mu=$mu&posts=$post><center><b>Positive Rep</b></a></center></div></td></if>
<if 
condition="$rb == '1'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=1&mu=$mu&posts=$post><center><b>Positive Rep</b></a></center></div></td></if>
<if 
condition="$rb != ''">
<if 
condition="$rb != '1'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=1&mu=$mu&posts=$post><center>Positive Rep</a></center></div></td></if></if>
<if 
condition="$rb== '2'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=2&mu=$mu&posts=$post><center><b>Negative Rep</b></a></center></div></td></if>
<if 
condition="$rb != '2'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=2&mu=$mu&posts=$post><center>Negative Rep</a></center></div></td></if>
<if 
condition="$rb== '3'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=3&mu=$mu&posts=$post><center><b>Both</b></a></center></div></td></if>
<if 
condition="$rb != '3'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=3&mu=$mu&posts=$post><center>Both</a></center></div></td></if>
</
tr>

<
tr align='center'>
<
td class='thead'><div class="smallfont"><b><center>MAX USERS LISTED</b></center></center></div></td>
<if 
condition="$mu == ''">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=1&posts=$post><center><b>All Users</b></a></center></div></td></if>
<if 
condition="$mu == '1'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=1&posts=$post><center><b>All Users</b></a></center></div></td></if>
<if 
condition="$mu != ''">
<if 
condition="$mu != '1'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=1&posts=$post><center>All Users</a></center></div></td></if></if>
<if 
condition="$mu == '2'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=2&posts=$post><center><b>25</b></a></center></div></td></if>
<if 
condition="$mu != '2'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=2&posts=$post><center>25</a></center></div></td></if>
<if 
condition="$mu== '3'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=3&posts=$post><center><b>50</b></a></center></div></td></if>
<if 
condition="$mu != '3'">
<
td class='tcat'><div class="smallfont"><a href=repreport.php?do=rank&rb=$rb&mu=3&posts=$post><center>50</a></center></div></td></if>
</
tr>

<
tr align='center'>
<
td class='thead'><div class="smallfont"><b>TIME FRAME<b></div></td>
<
td class='tcat' colspan='3'><div class="smallfont">View Rep from last&nbsp;<INPUT TYPE="text" SIZE="3" NAME="posts" value="$post>&nbsp;posts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Submit" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" /></div>
</
td>
</
tr>
</
table>


<
br />


<
table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='60%' align='center'>
<
tr><td class='thead' colspan='4'><center><b>$yourname's Rep Report<b></center></td></tr>
<tr><td class='
thead'><center><b>Rank</b></center></td><td class='thead'><center><b>Username</b></center></td><td class='thead'><center><b>Rep Points</b></center></td><td class='thead'><center><b>Frequency</b></center></td></tr>
    $repreport
<if condition="$repreport == ''">
<if condition="$rb == '
1'">
<tr><td class='
alt1' colspan=4><center>You have no positive reputation</center></td></tr>
</if>
<if condition="$rb == '
2'">
<tr><td class='
alt1' colspan=4><center>You have no negative reputation</center></td></tr>
</if>
<if condition="$rb == '
3'">
<tr><td class='
alt1' colspan=4><center>You have received no reputation points</center></td></tr>
</if>
</if>
    <tr align="center">
    <td class="thead" colspan="4"><div class="smallfont">Aggiefans.com ? $copyrightyear <br/>Version $version</div></td>
    </tr>
</table>



</form>
<!-- /main -->
$footer
</body>
</html> 


RepReport_Posts
PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<!-- 
no cache headers -->
<
meta http-equiv="Pragma" content="no-cache" />
<
meta http-equiv="Expires" content="-1" />
<
meta http-equiv="Cache-Control" content="no-cache" />
<!-- 
end no cache headers -->
<
title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase> - Reputation Report</title>
$headinclude
</head>
<
body>
$header
$navbar
<!-- main -->

<
form name="vbform" action="repreport.php?do=rank&rb=$rb&mu=$mu">
<
input type="hidden" value="rank" name="do" />
<
input type="hidden" value="submit" name="action" />
<
input type="hidden" value="$rbname="rb" />
<
input type="hidden" value="$muname="mu" />

<
table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='60%' align='center'>
<
br/><br/>
<
tr><td class='thead' colspan='4'><center><b>$yourname's Rep Received from $giver <b></center></td></tr>
<tr><td class='
thead'>&nbsp;</td><td class='thead' width=250><center><b>Date</b></center></td><td class='thead'><center><b>Thread Title</b></center></td><td class='thead' width=300><center><b>Comment</b></center></td></tr>
    $repreport
    <tr align="center">
    <td class="thead" colspan="4"><div class="smallfont">Aggiefans.com ? $copyrightyear <br/>Version $version</div></td>
    </tr>
</table>
</form>
<!-- /main -->
$footer
</body>
</html> 
Attached Files
File Type: (21.4 KB, 4 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01449 seconds
  • Memory Usage 1,967KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete