vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=103046

Reputation comment in post - karma for 3.5
by l3vi
16 Dec 2005 01:08

4 Attachment(s)
This is my first hack for vbulletin that will show user comments in the post that they gave reputation for. Very popular with the users, they eat it up.

no one ever ported the first one from 3.0. so I wrote a new one just for 3.5.

Download, unzip and read install.txt

Don't forget to click installed if you installed it!

This hack makes each post's reputation visible to everyone. please see screen shots for examples

Modifications: add a little code to postbit template and install the xml file.

Install Time: 2 minutes max

Difficulty: Easy

Screenshot attached of a post with reputation comments!

dieselpowered 16 Dec 2005 02:11

Probably would be a good idea to give a better description as well as a screenshot. I am sure you will be asked anyway :)

YOimYO 16 Dec 2005 03:07

Hi, could i get a better description as well as a screenshot :P


jk :D

sounds nice :)


Ill test it out :D



thx ;)

Ravage1 16 Dec 2005 03:34

it is okay, not very impressive, but it works.....

l3vi 16 Dec 2005 03:45

Thanks guys,

first time around on all this. ;p

Its been updated!

l3vi 16 Dec 2005 03:46

Quote:

Originally Posted by Ravage1
it is okay, not very impressive, but it works.....

What where you expecting? its the same style of mod for 3.0 that no one could get around to porting, so when I moved to VB and seen no one had done it I wrote a new one.

Reeve of shinra 16 Dec 2005 05:46

How is it with queries? I found that the 3.0 one ran way too many extra queries so I had to remove it.

rb290 16 Dec 2005 06:08

few questions

for everyone that gets commented in the thread, does it show for them all ? or does it only show the comments for the thread creator. also, can everyone see the comments or only your own ?

rb290 16 Dec 2005 06:23

and when I went into a thread It gave me this:


Database error in vBulletin 3.5.2:

Invalid SQL:

SELECT user.username, reputation.reputation, reputation.reason
FROM reputation AS reputation
LEFT JOIN user AS user ON(user.userid = reputation.whoadded)
WHERE postid = 4096
ORDER BY reputation.dateline LIMIT;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5
Error Number : 1064
Date : Friday, December 16th 2005 @ 01:23:14 AM
Script : http://thugonline.net/showthread.php?p=4096#post4096
Referrer : http://thugonline.net/index.php
IP Address : 69.158.161.4
Username : DOPE.MAN
Classname : vb_database

l3vi 16 Dec 2005 07:51

Quote:

Originally Posted by rb290
few questions

for everyone that gets commented in the thread, does it show for them all ? or does it only show the comments for the thread creator. also, can everyone see the comments or only your own ?


everyone can see it.

l3vi 16 Dec 2005 07:55

Quote:

Originally Posted by rb290
Invalid SQL:

SELECT user.username, reputation.reputation, reputation.reason
FROM reputation AS reputation
LEFT JOIN user AS user ON(user.userid = reputation.whoadded)
WHERE postid = 4096
ORDER BY reputation.dateline LIMIT;

Its missing the end of the query after LIMIT should have a number.


replace: in manage plugins > edit plugin

$post_reputations_bit = $this->registry->db->query_read("
SELECT user.username, reputation.reputation, reputation.reason
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = reputation.whoadded)
WHERE postid = ".$post['postid']."
ORDER BY reputation.dateline LIMIT ".$this->registry->options['maxrepgv']
);

with:

$post_reputations_bit = $this->registry->db->query_read("
SELECT user.username, reputation.reputation, reputation.reason
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = reputation.whoadded)
WHERE postid = ".$post['postid']."
ORDER BY reputation.dateline"
);

As this is my first mod for vbull I would have to find someone with more exp to be able to tell us why your board is not getting $this->registry->options['maxrepgv']

Unless its not set in admin under reputation options.

l3vi 16 Dec 2005 08:03

Quote:

Originally Posted by Reeve of shinra
How is it with queries? I found that the 3.0 one ran way too many extra queries so I had to remove it.


It will run a query on each post, with one join. I have not noticed any big or small dif on my boards.

rb290 16 Dec 2005 09:12

what do the queries do ?
make it run slower or ???

Paul M 16 Dec 2005 10:06

Quote:

Originally Posted by l3vi
As this is my first mod for vbull I would have to find someone with more exp to be able to tell us why your board is not getting $this->registry->options['maxrepgv']

The answer to that is quite simple - 'maxrepgv' does not exist in default vbulletin.

It is a setting added by my "Display Reputation Given" hack which you obviously must have installed.

Enthonia Tech 16 Dec 2005 12:43

Thanks A Lot! :)


All times are GMT. The time now is 10:50.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.