Log in

View Full Version : Given Reputations Trackback


Jing
10-29-2004, 10:00 PM
Hello, this if my first mini-hack, and I hope it could help out somebody. I did not do a thorough search if anyone has posted something exactly like this (which is quite likely since this is a fairly simple hack), so please forgive me if it already exists. I just thought I could share my codes for those who need it.


Introduction:
I was originally trying the hack at https://vborg.vbsupport.ru/showthread.php?t=61518 , which was released by vbmechanic. Ran into some weird looping problems like how someone mentioned at the second page, but manage to fix it anyway. While fixing the error, and thinking of adding more info to the trackback, I came out with my own version.

This is completely independent of vbmechanic's hack however.


What it does
This hack adds another list for the Latest Reputation Given to other members by yourself that is identical to the original Latest Reputation Received table. You can have a look at the screenshot included and it will explain everything much better.


Changes to your vBulletin:
1 extra query on usercp.php
1 template change
1 new small template
1 new phrase

This would take only a maximum of 5 mins to finish installing. :)


Installation:
Instruction is included as a text attachment.


Changes Log:
05-11-2004 Found a bug in the link that points to the profiles of the recipients of the given points. Fixed with instructions posted below. The existing instruction text file has also been replaced with an updated version.

01-11-2004 Changed the header of "Posted By" to "Posted To" under template USERCP for the Latest Reputation Given table. It's located at step 4, line 139 of the textfile included.

31-10-2004 I have completely re-done this hack to separate the listing of reputations received and given as requested

30-10-2004 Added the simple hack here.

Borgs8472
10-30-2004, 07:30 PM
I -think- I'm interested in this hack - you say it combines rep given and rep received into a single list? :/

I'd prefer a separate list of my reputation comments given rather than a combined one personally.

( Sorry if this is unhelpful! )

Jing
10-31-2004, 12:51 AM
It's not hard to do it like what you want it to be. :) Just at the expense of more queries. I wouldn't mind to release the hack that separate them, but since I am having finals now, I am a bit reluctant to do everything now as the support later could be a headache and I really do not have time for them.

What I suggest now is, use this hack temporarily first. And a few weeks later I will come back and work on the alternative version of this hack. It's as easy to uninstall as to install since it's just a one-line change. :)

Jing
10-31-2004, 07:23 AM
I changed my mind and modified it like you requested today since I had a bit of free time. Check it out and remember to click Install! :)

Borgs8472
10-31-2004, 09:24 PM
Was about to get installing - but it this compatible with the reputation ratings on multiple pages hack, and/or the show last 10 people you have given reputation to hack? :D

If you're not sure, don't worry, I'll try it out in time on a test skin set. :)

Jing
11-01-2004, 04:26 AM
I am not quite sure which hack is that, but I think it shouldn't have a problem with it since it is adding the codes onto usercp.php instead of changing the current codes. :)

Loxias
11-01-2004, 06:14 AM
Can you see reputation given by other members as well or just your own? (Haven't looked at the code, just thought I'd ask.)

Paul M
11-01-2004, 07:01 AM
I did not do a thorough search if anyone has posted something exactly like this (which is quite likely since this is a fairly simple hack), so please forgive me if it already exists. I just thought I could share my codes for those who need it.
If you had searched, you would have found this ;

https://vborg.vbsupport.ru/showthread.php?t=69296

:ermm:

Jing
11-01-2004, 09:02 AM
I did a brief search, and I could only find vbmechanic's hack. So I thought it could be helpful. :) It's okay if mod want to remove this to avoid duplicates. SInce I think the two hacks are pretty much doing the same thing.

Loxias: You can see the reputations given to other members, as well as reputations received from other members. :)

Borgs8472
11-01-2004, 09:22 PM
^ ^
nah, I'm interested in more complete listings with comments, not just the last 10 of them...

rex_b
11-02-2004, 12:30 AM
*installed

Jing
11-02-2004, 02:04 AM
thank you rex_b. :)

sorry wordforge, I don't think I am going to change my hack to extend the list. Maybe someone else can help you.

Loxias
11-02-2004, 03:56 AM
Loxias: You can see the reputations given to other members, as well as reputations received from other members. :)

I don't suppose there's a condition I could add to have who you've given rep to visible to only yourself and not others? I have my forum setup to hide who gives reputation from members to avoid conflict and this hack would negate that setting, but my members would really like to be able to see who they've last given rep to.

Jing
11-02-2004, 04:31 AM
Nope, this would not negate that setting. It would not change any of your current settings because this hack adds additional lines to the script for its own function and do not borrow the current codes or interfere with the existings codes, and thus will not mess up the original settings.

Paul M
11-02-2004, 08:41 AM
^ ^
nah, I'm interested in more complete listings with comments, not just the last 10 of them...In this version, or my version (see above), just change the LIMIT part of the SQL statement to LIMIT 0, nn where nn is the number of comments you want to see. Jing's currently uses the ACP option as it's limit, mine is hard coded to 10. :)

Roms
11-04-2004, 12:23 AM
<i>*installed</i>

Jing
11-04-2004, 02:36 AM
thank you infantrymen. :)

wordforge: yup, you can do it like Paul M suggested. Or you can just change from ACP to include a large number so it would show up every one of them. Just that I do not think that vBulletin included a "page" feature for reputations, so I don't think it's a good idea.

Jing
11-04-2004, 03:25 PM
I have found a bug with the link of the nicknames not pointing at members' profile, but to self's profile instead. Here's a fix. Only two words are changed here, so it shouldn't be hard. This is not a security fix so you can skip it if you do not wish to go thru the tiny bit of hassle. I apologize for any inconvenience caused.



At usercp.php, look up for...

// START REPUTATION HACK
$reputations2 = $DB_site->query("
SELECT
user.username, reputation.whoadded,
reputation.postid as postid,
reputation.reputation, reputation.reason,
post.threadid as threadid,
.
.
.




change the bolded and underlined text to the following


// START REPUTATION HACK
$reputations2 = $DB_site->query("
SELECT
user.username, reputation.userid,
reputation.postid as postid,
reputation.reputation, reputation.reason,
post.threadid as threadid,




At template usercp_reputationbits2, look up for


<tr>
<td class="alt2"><img src="$stylevar[imgdir_reputation]/reputation_$posneg2.gif" border="0" alt="" /></td>
<td class="alt1Active" id="p$reputation2[postid]" width="50%"><a class="smallfont" href="showthread.php?$session[sessionurl]p=$reputation2[postid]#post$reputation2[postid]">$reputation2[title]</a></td>
<td class="alt2" nowrap="nowrap"><span class="smallfont">$reputation2[dateline] <span class="time">$reputation2[timeline]</span></span></td>
<if condition="$vboptions['showuserraters']">
<td class="alt1" nowrap="nowrap"><a class="smallfont" href="member.php?$session[sessionurl]u=$reputation2[whoadded]">$reputation2</a></td>
</if>
<td class="$reputationbgclass2" width="50%"><span class="smallfont">$reputation2[reason]</span></td>
</tr>




and change to the following...


<tr>
<td class="alt2"><img src="$stylevar[imgdir_reputation]/reputation_$posneg2.gif" border="0" alt="" /></td>
<td class="alt1Active" id="p$reputation2[postid]" width="50%"><a class="smallfont" href="showthread.php?$session[sessionurl]p=$reputation2[postid]#post$reputation2[postid]">$reputation2[title]</a></td>
<td class="alt2" nowrap="nowrap"><span class="smallfont">$reputation2[dateline] <span class="time">$reputation2[timeline]</span></span></td>
<if condition="$vboptions['showuserraters']">
<td class="alt1" nowrap="nowrap"><a class="smallfont" href="member.php?$session[sessionurl]u=$reputation2[u][userid]">$reputation2[username]</a></td>
</if>
<td class="$reputationbgclass2" width="50%"><span class="smallfont">$reputation2[reason]</span></td>
</tr>


That's all. An updated text file has been uploaded to replace the current one, so new users will not be affected.

DjTaz
11-08-2004, 07:30 PM
Thanks for this - works a treat. One of my members was looking for it as well :D

Jing
11-08-2004, 09:41 PM
welcome :)

Lee
08-10-2005, 05:02 PM
I installed this modification and it brought up a question about vb's reputation system. The mod shows the last 5 reputation received and the last 5 given in your userCP. I noticed that the number it shows received is 89 and the number given is also 89. Can you only give as much as you receive or something like that? Or is the hack wrong? Any ideas?