PDA

View Full Version : Profile Enhancements - e-steki Karma version 2.2


Pages : [1] 2

Lea Verou
08-03-2007, 10:00 PM
http://www.leaverou.gr/logo.gif

e-steki Karma v2
I'm really excited to present the new, better from all aspects, version of my previous hack (the one that was in beta stage). I've spent numerous hours to make this, its my greatest modification so far, so I hope you like it!

What is it?
e-steki Karma is a powerful system to let users rate each other with a rating from -5 to +5. Each user's karma is a number, which is the average of all votes they have received. Refer to the Features section for more information.

What's the use?

Less flames. Users vent their spleens on rating the one that got on their nerves with a -5 and that's it.
Easier spotting of bad members/trolls by new users. This way, new users will not take seriously the bad members' posts and they won't get a bad idea about your forum, they will just think "oh nobody likes that guy anyway, he's not representative of the forum".
Users try to have a good behaviour because they know that otherwise their karma will decrease.
On a big board, it makes it easier for you to spot members that would perhaps make a good moderator (if they have a high karma value) or members that may need to get banned (if they have a very low karma value). You will also be able to judge how a ban will affect your other users, according to how much they like the soon-to-be-banned user (which is reflected in his karma value).

Features

The features in bold were added in the second version. Features in bold italics were enriched in version 2 but existed in version 1 partially.Admin/Mod Features
Now compatible with vBulletin 3.6.8 (link to e-steki Karma 1.0 for 3.5.x (https://vborg.vbsupport.ru/showthread.php?t=109716)).
Customizable via a lot of settings.
Much better and more safe coding than the previous version. Most of the code has been rewritten from scratch.
Great power about who will use the system, via the permission settings.
Maintenance section
Easier installation than version 1 (Only one template edit (placement of a small comment), the others that version 1 had are now performed via template hooks).
Fully phrased (exept for the AdminCP Maintenance section)
Users with karma administrative priviledges can see for every user who they rated and by whom they have been rated and remove any vote they wish (useful for karma flooding that some users perform to be in the stats).
Most of the bugs in the previous version are now fixed with the maintenance section addition.
The bug with the date of the last vote in the profile is now fixed.
Displaying the karma in the postbit is now done with no queries.
Users with karma administrative priviledges can see the IP of the rater in each vote
A nice, usable and extensive html manual instead of an ugly readme.txt ;-)End user Features

Users that have the Karma turned off don't count at all for the system. their votes don't count in anything, and the votes others gave them before they turned it off also don't count at all. Those users also, can't see anything that has to do with the karma system, anywhere. It's like the karma does not exist for them and they don't exist for the karma. However, if they switch it on again, nothing is lost and they may continue from the point where they deactivated it.
Rating is now performed by clicking on an image, no form submitting required (saves one click)
There is a complete statistics page, with 7 tables that display various statistics.
The Karma of each user displays in the postbit (unless he has opted out of the Karma, is not permitted to use it, or the admin has turned off this feature) and users can rate him from there

In each member's profile they can see if they have previously rated them and what rating they gave.
They can view all the votes they have given in a separate page and remove some of them if they wish (or go to the member's profile and change them). Votes that are not active at the time are marked with an admin-controlled formatting. He can also sort the votes by date or rating (default sorting is controlled by the admin). In the same page, users with karma administrative priviledges can also view who rated each user (fully, with sorting, formatting and vote removal).
Controversy feature, via an admin customizable algorithm. Controversy for each user is displayed in their profile, as well as in the stats and is color-coded as well as descriptive.
Each user can view the percentages of the votes he (or every user, if set so by the admin) has received in a nice graph by clicking in the controversy value.Don't forget to Mark as INSTALLED!
Important: Supported for only a few days after each release.
Installation/Upgrade instructions included in the zip.

Changelog
2.2.1: Important bugfixes
2.2: I don't remember as apparently, I forgot to add it to the changelog initially :o:p
2.1: fixed bugs, cached templates and added the feature of a popup menu rating form in the postbit.
2.0: Initial release

Lea Verou
08-04-2007, 02:25 AM
More screenshots :D

mktrilogy
08-04-2007, 03:30 AM
hmmm sounds good :) will feedback later

Lea Verou
08-04-2007, 03:34 AM
hmmm sounds good :) will feedback later
I'm waiting for your feedback! :) :) :)

gforce75
08-04-2007, 03:44 AM
will give it a shot

Lea Verou
08-04-2007, 03:46 AM
Tell me what happened gforce75!

Btw, I replaced the acp options screenshots, as they looked terrible after the downsize.

FreshFroot
08-04-2007, 04:38 AM
looks pretty cool :D

Kihon Kata
08-04-2007, 05:05 AM
Can you please explain in detail what it exactly does/is?

Lea Verou
08-04-2007, 05:56 AM
Can you please explain in detail what it exactly does/is?
I will, in 1-2 hours (I am currently watching a movie), I had forgotten to do so, lol :o

iogames
08-04-2007, 06:25 AM
Well I was looking the name of a website that I visited like 5 months ago, and was featured in Business 2.0...
It was about a Social Network regarding POPULARITY, teens/users vote each other for any joke/stunt/etc...
But I'm looking and looking for the name :(

Can you use this as a POPULARITY System? with aim to Prices or Awards?

Lea Verou
08-04-2007, 07:00 AM
Can you please explain in detail what it exactly does/is?

Done. Read the first post.

Well I was looking the name of a website that I visited like 5 months ago, and was featured in Business 2.0...
It was about a Social Network regarding POPULARITY, teens/users vote each other for any joke/stunt/etc...
But I'm looking and looking for the name :(

Can you use this as a POPULARITY System? with aim to Prices or Awards?

I don't know what you mean, can you explain in more detail?

iogames
08-04-2007, 07:07 AM
Ok, its a site where users rate to each other [by kissing, hugging, kicking, smacking, slapping, booting], then they make the top ten list...
The ARTICLE in Business 2.0 pointed that in the 'Search of the Popularity' was the success of this site...

So I can say that your hack is an amazing work, but it shows on the CMPS? does it creates a TopTen List in the Front Page?

[still can't remember the site Grrr! :mad: but you use peanuts to buy things and you can create 'game rooms']

Lea Verou
08-04-2007, 07:12 AM
Ok, its a site where users rate to each other [by kissing, hugging, kicking, smacking, slapping, booting], then they make the top ten list...
The ARTICLE in Business 2.0 pointed that in the 'Search of the Popularity' was the success of this site...

So I can say that your hack is an amazing work, but it shows on the CMPS? does it creates a TopTen List in the Front Page?

[still can't remember the site Grrr! :mad: but you use peanuts to buy things and you can create 'game rooms']

Hmm, users vote each other, there are top ten lists, but no points/awards and no CMPS module. A CMPS module is not very hard, the code already exists in the stats page. You just gave me an idea (I also have vba cmps)!!
I'll try to make a CMPS module of it, if it doesn't prove to be a hard task, but no promises :)

projectego
08-04-2007, 08:54 AM
/me clicks install

Lea Verou
08-04-2007, 08:57 AM
* Lea Verou clicks install
Thanks! How did the install go? Is everything working ok?

EnIgMa1234
08-04-2007, 10:14 AM
Great hack. Good to see you back in action :D

*installs

Zaiaku
08-04-2007, 11:44 AM
Bringing bacc the classics. Looks really good, may have to give this a try.

Rickeo
08-04-2007, 02:03 PM
Would be good if you could get this to work with advanced permissions so members could help me out.

Like if a members overall karma is -1+ then they wont be able to do certain things etc that would be cool :D

~Rick~

Rickeo
08-04-2007, 02:46 PM
I get these errors when I view statistics any help??

Warning: arsort() expects parameter 1 to be array, null given in /karma.php on line 505

Warning: Invalid argument supplied for foreach() in /karma.php on line 507

Warning: Invalid argument supplied for foreach() in /karma.php on line 524

Warning: Invalid argument supplied for foreach() in /karma.php on line 525

lasto
08-04-2007, 03:20 PM
does this in any way replace the current karma system that is on vbulletin as bit useless having 2.

I like idea of yours though esp since it has stats and everyone loves stats dont they ? :)

lasto
08-04-2007, 05:15 PM
Does not work for me

fresh installed version 3.6.8

here is what i get if i go to member.php?u=6612 (profile page)

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT karma FROM user WHERE (userid=6612 OR userid=1) AND karma=1 AND userid NOT IN () AND usergroupid NOT IN (1,3,4);

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 ') AND usergroupid NOT IN (1,3,4)' at line 1
Error Number : 1064
Date : Saturday, August 4th 2007 @ 02:13:04 PM

if i try to load karma.php here is what i get

Warning: implode() [function.implode]: Bad arguments. in /karma.php on line 125

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 129

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 342

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT * FROM userrating WHERE active=1 AND userid NOT IN () AND raterid NOT IN () ORDER BY `dateline` DESC;

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 ') AND raterid NOT IN () ORDER BY `dateline` DESC' at line 1
Error Number : 1064
Date : Saturday, August 4th 2007 @ 02:15:12 PM

lasto
08-04-2007, 05:36 PM
has anyone actually managed to install this without any probs as reading this thread many people say they will try it but hardly any have reported back saying they managed to install it without any of the errors mentioned in mine and Rickeo posts.

Greek76
08-04-2007, 05:39 PM
Is this similar to the reputation mod? What is the difference? Im just curious thanks.

iogames
08-04-2007, 06:53 PM
Thanks! How did the install go? Is everything working ok?

Hehehe! first time I see a Coder worried for an User... [is the world falling apart? :confused:]

Ok I made my research and I tried and tried to remember the site and I FOUND IT!

www.xuqa.com

Are you able to do something like this? for vB

p.s. it has changed a lot since my last visit to the site...

VIPER-MAN
08-04-2007, 07:02 PM
Excuse me I'm new to vB and all of the available add-ons.

When someone says "Don't forget to MARK AS INSTALLED" what exactly do they mean? Where do I "mark as installed"?? In the adminCP? On here?:confused:

da420
08-04-2007, 07:17 PM
Excuse me I'm new to vB and all of the available add-ons.

When someone says "Don't forget to MARK AS INSTALLED" what exactly do they mean? Where do I "mark as installed"?? In the adminCP? On here?:confused:

Take a look at the screenshot.

VIPER-MAN
08-04-2007, 07:38 PM
thank you Da420

TheBlackPoet
08-04-2007, 07:56 PM
when i go to install.. i get this error.... i installed the files... and tried to import

Khalid-B
08-04-2007, 08:07 PM
hello,
its not work at 3.6.8 .
I installed but when i tried to go my profile at forum got datbase error.

Lea Verou
08-04-2007, 09:03 PM
Hello! Just woke up! I will reply now to your comments :)

Lea Verou
08-04-2007, 09:04 PM
Great hack. Good to see you back in action :D

*installs

Thanks!

I get these errors when I view statistics any help??

Are there any votes?

Lea Verou
08-04-2007, 09:07 PM
Does not work for me

fresh installed version 3.6.8

here is what i get if i go to member.php?u=6612 (profile page)



Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT karma FROM user WHERE (userid=6612 OR userid=1) AND karma=1 AND userid NOT IN () AND usergroupid NOT IN (1,3,4);

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 ') AND usergroupid NOT IN (1,3,4)' at line 1
Error Number : 1064
Date : Saturday, August 4th 2007 @ 02:13:04 PM


if i try to load karma.php here is what i get

Warning: implode() [function.implode]: Bad arguments. in /karma.php on line 125

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 129

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 342

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT * FROM userrating WHERE active=1 AND userid NOT IN () AND raterid NOT IN () ORDER BY `dateline` DESC;

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 ') AND raterid NOT IN () ORDER BY `dateline` DESC' at line 1
Error Number : 1064
Date : Saturday, August 4th 2007 @ 02:15:12 PM

Can you please provide a screenshot of your karma main settings?

Lea Verou
08-04-2007, 09:13 PM
Is this similar to the reputation mod? What is the difference? Im just curious thanks.
The basic difference is that rating is done per user, not per post and this way I believe it's more fair. For more information look at the features.
Hehehe! first time I see a Coder worried for an User... [is the world falling apart? :confused:]

Ok I made my research and I tried and tried to remember the site and I FOUND IT!

www.xuqa.com (http://www.xuqa.com)

Are you able to do something like this? for vB

p.s. it has changed a lot since my last visit to the site...

I didn't signup but judging from the front page it looks more like a SNS... I don't think I can/need something like this... I made the karma because I need it (and spent extra time to make it availiable for release), I won't make a hack that I don't need at all, sorryyy :o

when i go to install.. i get this error.... i installed the files... and tried to import

Do you have the previous Karma installed? Or User Rating 1.0?

Lea Verou
08-04-2007, 09:17 PM
hello,
its not work at 3.6.8 .
I installed but when i tried to go my profile at forum got datbase error.
What database error exactly?

Lea Verou
08-04-2007, 09:19 PM
Those that get a database error in the profile, please go to the settings, and put a 0 with no spaces in the setting "Userids that are not allowed to use the karma system". Then tell me what happened.

Lea Verou
08-04-2007, 09:23 PM
I think I know what causes these problems, I'll post a fix and if it works I'll update the zip. :)

Khalid-B
08-04-2007, 09:30 PM
What database error exactly?


same as at post #28 at 2nd page .. https://vborg.vbsupport.ru/attachment.php?attachmentid=68026&d=1186260931

Lea Verou
08-04-2007, 09:44 PM
For the karma.php errors, try the attached karma.php and PLEASE come back to tell me if it solved the problems.

Lea Verou
08-04-2007, 09:46 PM
same as at post #28 at 2nd page .. https://vborg.vbsupport.ru/attachment.php?attachmentid=68026&d=1186260931
Do you have any previous version of e-steki Karma or User Rating 1.0 installed?

Lea Verou
08-04-2007, 09:53 PM
For the member.php issue, replace the code in the plugin "e-steki Karma main code" with the one in the attached php file (without the <?php and ?> tags!) and PLEASE tell me if it was fixed!

DJ XtAzY
08-04-2007, 10:00 PM
Hi! I was wondering if this suggestion is possible?

I was wondering if you can add an option that allow us to create different purposes for these karmas. For example, users can participate a karma system for rating each other whether they are good or bad members in the forum . Then, some users can participate the other karma system for the purpose of whether they are trusted or not when they are selling, trading, etc, stuff. They can join different karma systems in the UserCP.

In short, I was wondering if you can add a feature where you can create different purpose/rating for this karma system. Hope i make sense =].

kaptanblack
08-04-2007, 10:06 PM
Thanks Michelle...

very nice.

Lea Verou
08-04-2007, 10:13 PM
Hi! I was wondering if this suggestion is possible?

I was wondering if you can add an option that allow us to create different purposes for these karmas. For example, users can participate a karma system for rating each other whether they are good or bad members in the forum . Then, some users can participate the other karma system for the purpose of whether they are trusted or not when they are selling, trading, etc, stuff. They can join different karma systems in the UserCP.

In short, I was wondering if you can add a feature where you can create different purpose/rating for this karma system. Hope i make sense =].
That would be useful for some forums, but I don't have the time to do something I won't personally use, especially if it's time consuming, sorry :/

Lea Verou
08-04-2007, 10:14 PM
Thanks Michelle...

very nice.
Thanks. Tell me how the install went :)

Khalid-B
08-04-2007, 10:39 PM
Do you have any previous version of e-steki Karma or User Rating 1.0 installed?

Hello,
No i havnt any e-steki version installed befor that .
Thanks

Lea Verou
08-04-2007, 10:42 PM
Hello,
No i havnt any e-steki version installed befor that .
Thanks
What hacks that involve DB changes do you have installed?

Khalid-B
08-04-2007, 10:48 PM
i have installed some templete mods and some others as like ,, dream,s chatbox , colour legend , paypal, Ajax Reg , Cyb - Advanced Forum Statistics , Global Announcement , Latest 10 PM Admin Index , Referrer Statistics , ibProArcade for vBulletin and Global Announcement.
Thanks

iogames
08-04-2007, 10:48 PM
Thanks. Tell me how the install went :)

Are you alright? :eek:


Ok the whole idea is for users to vote on each other to make the top ten in 3 different categories lets say, I don't need the whole system/site...
I can give you 3 reasons [$$$] ;)

iogames
08-04-2007, 11:07 PM
Well here 3 more samples to give you an idea...

Lea Verou
08-04-2007, 11:54 PM
@iogames: What do you mean by "are you allright?"? The quote was referring to another person :p
No thanks, at the moment I don't take custom jobs, I don't find that fullfilling, I only like coding for myself. :)
You can find a lot of talented coders here that can take that job though :)

lasto
08-05-2007, 03:30 AM
Warning: implode() [function.implode]: Bad arguments. in /karma.php on line 125

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 129

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 342

and thats putting a 0 in the main karma setting

Hate to say it but after messing it simply dont work on 3.6.8

also i loaded the new karma.php that u had on the previous page and here is the error i get now

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /karma.php on line 342
Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT * FROM userrating WHERE active=1 AND userid NOT IN () AND raterid NOT IN () ORDER BY `dateline` DESC;

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 ') AND raterid NOT IN () ORDER BY `dateline` DESC' at line 1
Error Number : 1064
Date : Sunday, August 5th 2007 @ 12:32:08 AM

finally look what happens if i try to uninstall the product from the admincp

Database error in vBulletin 3.6.8:

Invalid SQL:
ALTER TABLE user DROP karmatotal;

MySQL Error : Can't DROP 'karmatotal'; check that column/key exists
Error Number : 1091
Date : Sunday, August 5th 2007 @ 12:39:04 AM

Lea Verou
08-05-2007, 03:58 AM
Damn.
I'll try to fix this shortly.
For the time, disable the product.

Lea Verou
08-05-2007, 05:03 AM
lasto, do you have any banned users? (not karma-banned, generally banned)

Lea Verou
08-05-2007, 05:05 AM
Also, try putting a 0,0 instead of a 0 in that setting and tell me what happened

TheBlackPoet
08-05-2007, 05:50 AM
Database error in vBulletin 3.6.8:

Invalid SQL:
ALTER TABLE usergroup ADD userratingday SMALLINT(4) NOT NULL DEFAULT '0', ADD userratingperm INT(10) NOT NULL DEFAULT '0';

MySQL Error : Duplicate column name 'userratingday'
Error Number : 1060
Date : Sunday, August 5th 2007 @ 01:47:30 AM
Script : http://www.theblackpoet.com/xxxxxx/admincp/plugin.php?do=productimport
Referrer : http://www.theblackpoet.com/xxxxx/admincp/plugin.php?do=productadd
IP Address : xxxxxxx
Username : xxxxxx
Classname : vB_Database


this is my error.. i go to import... and get this.....

ged
08-05-2007, 06:18 AM
And I didn't have any of my templates changed.

Lea Verou
08-05-2007, 06:19 AM
Database error in vBulletin 3.6.8:

Invalid SQL:
ALTER TABLE usergroup ADD userratingday SMALLINT(4) NOT NULL DEFAULT '0', ADD userratingperm INT(10) NOT NULL DEFAULT '0';

MySQL Error : Duplicate column name 'userratingday'
Error Number : 1060
Date : Sunday, August 5th 2007 @ 01:47:30 AM
Script : http://www.theblackpoet.com/xxxxxx/admincp/plugin.php?do=productimport
Referrer : http://www.theblackpoet.com/xxxxx/admincp/plugin.php?do=productadd
IP Address : xxxxxxx
Username : xxxxxx
Classname : vB_Database


this is my error.. i go to import... and get this.....
Which hacks that involve DB changes do you have? It's quite weird to have this.
Anyway, that column is not needed in v2, its from the install code of v1. It then gets removed with the install code of v2, so perhaps I should remove it completely.

Lea Verou
08-05-2007, 06:20 AM
And I didn't have any of my templates changed.
Huh? What do you mean?

PS: Nice avatar

TheBlackPoet
08-05-2007, 06:24 AM
Which hacks that involve DB changes do you have? It's quite weird to have this.
Anyway, that column is not needed in v2, its from the install code of v1. It then gets removed with the install code of v2, so perhaps I should remove it completely.

i was jacking around with that commune hack and broke my dbase/site.... im reinstalling all my hacks now... after having to uninstall them all one by one...

i havent really been having any dbase issues since i took all my hacks off and ran tools.php...

i dont know why this one would give me any trouble

Lea Verou
08-05-2007, 06:27 AM
i was jacking around with that commune hack and broke my dbase/site.... im reinstalling all my hacks now... after having to uninstall them all one by one...

i havent really been having any dbase issues since i took all my hacks off and ran tools.php...

i dont know why this one would give me any trouble
Since you are a coder, you can edit the product xml and remove any queries about that column (userratingday) in the install/uninstall code, its not needed at all, it gets added and then removed during install, in order to have consistency with users having v1 (v1 needed that column).
It's weird though that you have such a column in your db..
If you can't do the above, tell me to upload a product xml without it.

Lea Verou
08-05-2007, 07:46 AM
lasto (and others with problems with karma.php) try this karma.php and tell me what happened.

TheBlackPoet
08-05-2007, 07:46 AM
i took out the references.. and still had an error.. i could have done something wrong... and at this point i'm to chicken to risk losing the dbase again...... so, if you edited the xml, that would be fine with me... and appreciated.....

Lea Verou
08-05-2007, 07:53 AM
i have installed some templete mods and some others as like ,, dream,s chatbox , colour legend , paypal, Ajax Reg , Cyb - Advanced Forum Statistics , Global Announcement , Latest 10 PM Admin Index , Referrer Statistics , ibProArcade for vBulletin and Global Announcement.
Thanks

Black poet, which of those do you have installed? (since you have the same bug)

Lea Verou
08-05-2007, 07:54 AM
i took out the references.. and still had an error.. i could have done something wrong... and at this point i'm to chicken to risk losing the dbase again...... so, if you edited the xml, that would be fine with me... and appreciated.....
Ok, I will shortly :)
In the meantime, can you reply to my above question, so I can determine if there are any inconsistencies with a specific hack?

TheBlackPoet
08-05-2007, 08:01 AM
Cyb Donate
Ajax Reg
Cyb - Advanced Forum Statistics,
ibProArcade

i have these hacks installed

Lea Verou
08-05-2007, 10:05 AM
TheBlackPoet and anyone else with his problem, try the attached product instead of the original.

PS: Sorry for the delay, I had a problem on my forum with vba cmps 3.0 (btw DON'T upgrade to it its full of bugs :mad: better wait till its gold)

Lea Verou
08-05-2007, 10:35 AM
Attachment in the previous post updated (I had forgotten something).
Black Poet, if you have the userrating table in your database,you should probably drop it, otherwise the install will give you a db error. Same goes with columns 'karma' and 'karmatotal' in user table if you have them.

Lea Verou
08-05-2007, 11:06 AM
Black poet can you please tell me what happened because in less than half an hour I will be afk for a lot of hours so I will not be able to assist you?

TheBlackPoet
08-05-2007, 11:12 AM
i almost hate to bother you!!!!!

this is the new error:


Database error in vBulletin 3.6.8:

Invalid SQL:
CREATE TABLE userrating (
`voteid` int(10) NOT NULL auto_increment,
`userid` int(10) NOT NULL default '0',
`raterid` int(10) NOT NULL default '0',
`ratername` varchar(50) NOT NULL default '',
`rating` int(10) NOT NULL default '0',
`active` tinyint(1) NOT NULL default '1',
`dateline` int(10) NOT NULL default '0',
`ipaddress` varchar(25) NOT NULL default '',
PRIMARY KEY (`voteid`)
) TYPE=MyISAM AUTO_INCREMENT=1;

MySQL Error : Table 'userrating' already exists
Error Number : 1050
Date : Sunday, August 5th 2007 @ 07:12:02 AM
Script : http://www.theblackpoet.com/forum/admincp/plugin.php?do=productimport
Referrer : http://www.theblackpoet.com/forum/admincp/plugin.php?do=productadd
IP Address : 70.246.27.95
Username : theblackpoet
Classname : vB_Database


when i delete it..., it gives me an error for karma column... but i dont have that table....... and then... my next error is this userrating again... i assume it installed it back....

Khalid-B
08-05-2007, 11:48 AM
lasto (and others with problems with karma.php) try this karma.php and tell me what happened.

Hello,
I tried this karma.php file but still same error , here it is,

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT karma FROM user WHERE (userid=1 OR userid=1) AND karma=1 AND userid NOT IN (7,8,16,38,59,64,323,340,372,559,576,738,999,1000, 1002,1163,1322,1701,2086,2120,2428,2509,2787,2953, 2971,3409,3660,4012,4049,4132,4970,5331) AND usergroupid NOT IN ();

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 1
Error Number : 1064
Date : Sunday, August 5th 2007 @ 08:46:00 AM
Script : http://www.xxxxx.com/Forums/member.php?find=lastposter&f=x
Referrer : http://www.xxxxx.com/Forums/index.php
IP Address : xyz
Username : abc
Classname : vb_database

Thanks

Lea Verou
08-05-2007, 11:57 AM
i almost hate to bother you!!!!!

this is the new error:


Database error in vBulletin 3.6.8:

Invalid SQL:
CREATE TABLE userrating (
`voteid` int(10) NOT NULL auto_increment,
`userid` int(10) NOT NULL default '0',
`raterid` int(10) NOT NULL default '0',
`ratername` varchar(50) NOT NULL default '',
`rating` int(10) NOT NULL default '0',
`active` tinyint(1) NOT NULL default '1',
`dateline` int(10) NOT NULL default '0',
`ipaddress` varchar(25) NOT NULL default '',
PRIMARY KEY (`voteid`)
) TYPE=MyISAM AUTO_INCREMENT=1;

MySQL Error : Table 'userrating' already exists
Error Number : 1050
Date : Sunday, August 5th 2007 @ 07:12:02 AM
Script : http://www.theblackpoet.com/forum/admincp/plugin.php?do=productimport
Referrer : http://www.theblackpoet.com/forum/admincp/plugin.php?do=productadd
IP Address : 70.246.27.95
Username : theblackpoet
Classname : vB_Database


when i delete it..., it gives me an error for karma column... but i dont have that table....... and then... my next error is this userrating again... i assume it installed it back....

the karma column is in the user table. Same for the karmatotal column.

Lea Verou
08-05-2007, 11:59 AM
Hello,
I tried this karma.php file but still same error , here it is,



Thanks

You don't want to prevent any usergroup for participating in the karma? What about guests? Add usergroup 1 to the restricted usergroups list and this will most likely fix it.

Khalid-B
08-05-2007, 01:17 PM
Hello,
I am trying to uninstall but cant , getting this error now .

Database error in vBulletin 3.6.8:

Invalid SQL:
ALTER TABLE user DROP karmatotal;

MySQL Error : Can't DROP 'karmatotal'; check that column/key exists
Error Number : 1091
Date : Sunday, August 5th 2007 @ 10:15:29 AM
Script : http://www.domine.com/Forums/admincp/plugin.php?do=productkill
Referrer : http://www.domine.com/Forums/admincp/plugin.php?do=productdelete&productid=userrating&s=
IP Address : xyz
Username : user
Classname : vb_database

Please helo.
How can uninstall ??
Thanks

lasto
08-05-2007, 03:09 PM
using the karma.php u added on last page gives this error

MySQL Error : Table 'custom.userrating' doesn't exist
Error Number : 1146
Date : Sunday, August 5th 2007 @ 12:08:43 PM

also trying to uninstall throws up exactly the same error as the post before me.

Afraid this hack does not work or something is badly missing.

lasto
08-05-2007, 05:06 PM
also using the new plugin u posted above gives this error

Warning: implode() [function.implode]: Bad arguments. in /member.php(838) : eval()'d code on line 71

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT karma FROM user WHERE (userid=1 OR userid=1) AND karma=1 AND userid NOT IN () AND usergroupid NOT IN (1);

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 ') AND usergroupid NOT IN (1)' at line 1
Error Number : 1064
Date : Sunday, August 5th 2007 @ 02:06:03 PM

lasto
08-05-2007, 05:08 PM
BRB gonna try this on a fesh installed Board with HTTaccess (so i dont break licence agreement)

lasto
08-05-2007, 05:16 PM
fresh install of vbulletin - no hacks installed at all
2 Users - 1 made when installing Vbulletin and another made for test purposes

going to karma.php brings up this error

Warning: Invalid argument supplied for foreach() in /karma.php on line 399

Warning: Invalid argument supplied for foreach() in /karma.php on line 407

Warning: Invalid argument supplied for foreach() in /karma.php on line 415

Warning: Invalid argument supplied for foreach() in /karma.php on line 422

Warning: Invalid argument supplied for foreach() in /karma.php on line 429

Warning: arsort() expects parameter 1 to be array, null given in /karma.php on line 437

Warning: Invalid argument supplied for foreach() in /karma.php on line 439

Warning: asort() expects parameter 1 to be array, null given in /karma.php on line 454

Warning: Invalid argument supplied for foreach() in /karma.php on line 456

Warning: arsort() expects parameter 1 to be array, null given in /karma.php on line 472

Warning: Invalid argument supplied for foreach() in /karma.php on line 474

Warning: array_count_values() [function.array-count-values]: The argument should be an array in /karma.php on line 491

Warning: Wrong parameter count for max() in /karma.php on line 494

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: Division by zero in /karma.php on line 507

Warning: array_count_values() [function.array-count-values]: The argument should be an array in /karma.php on line 575

Now going to look at member.php throws up another problem

Warning: implode() [function.implode]: Bad arguments. in /member.php(838) : eval()'d code on line 71
Invalid SQL:
SELECT karma FROM user WHERE (userid=2 OR userid=1) AND karma=1 AND userid NOT IN () AND usergroupid NOT IN (1,3,4);

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 ') AND usergroupid NOT IN (1,3,4)' at line 1
Error Number : 1064
Date : Sunday, August 5th 2007 @ 02:15:34 PM

So unsure wots going on but it aint working.Its a fresh installed board with only this hack added as a product and the command entered in memberinfo template.

arco
08-05-2007, 09:51 PM
I've got the same problems as everyone else. Too bad, seems like it could be a very nice mod.

ninjashoes
08-05-2007, 10:30 PM
pretty cool alternative to rep, these things can add alot to a forum

Lea Verou
08-06-2007, 05:16 AM
Good morning everyone, just woke up.
I'll look into these errors shortly. :(

PS: I swear, it worked fine (and still does) in my test board!! :( :(, I don't know why it caused you so many errors :( And I feel so bad for that :( Is there anyone of those 27 people that clicked install that got it working?

Lea Verou
08-06-2007, 05:18 AM
Hello,
I am trying to uninstall but cant , getting this error now .

Database error in vBulletin 3.6.8:

Invalid SQL:
ALTER TABLE user DROP karmatotal;

MySQL Error : Can't DROP 'karmatotal'; check that column/key exists
Error Number : 1091
Date : Sunday, August 5th 2007 @ 10:15:29 AM
Script : http://www.domine.com/Forums/admincp/plugin.php?do=productkill
Referrer : http://www.domine.com/Forums/admincp/plugin.php?do=productdelete&productid=userrating&s=
IP Address : xyz
Username : user
Classname : vb_database

Please helo.
How can uninstall ??
Thanks

Was it the first time that you tried to uninstall that you got that error?

Lea Verou
08-06-2007, 05:25 AM
Added "is in beta stage" till the issues get resolved :(
And they WILL be resolved, this is a promise.

TheBlackPoet
08-06-2007, 05:47 AM
a woman on a mission... gotta love it!!

0tolerance
08-06-2007, 06:00 AM
I will install this on my Dev board and tell you of any errors i run into along the way, i think this is a massively awesome asset.. it will keep my users from ranting at each other on the forum and making each other look like fools

Lea Verou
08-06-2007, 07:21 AM
These problems were caused because I was working on a backup of my actual board, so it had over 2000 members, a lot banned etc. I hadn't tested on a smaller board, and that's what caused most problems, for instance I hadn't taken into account that there might be no banned users, I took for granted that some existed.
lasto provided me access to his test forum, so I performed some tests and changes to my code and the issues seem to be resolved. I'm now going to cache some templates I had forgotten to cache, transfer the plugin changes to my product and then I will update the zip on the first post :)

You will be informed when the zip is updated with a new post. :)

Lea Verou
08-06-2007, 08:26 AM
Zip updated.
Please tell me if it works so that I can send an update email. :)

* Lea Verou prays it works (atheists are not supposed to pray, so you can understand how much anxiety I have atm :p)

cynthetiq
08-06-2007, 09:31 AM
thanks for the update. I just installed it.

I don't get that error that everyone else has any longer, but now get this one:

Warning: implode() [function.implode]: Bad arguments. in /member.php(838) : eval()'d code on line 201
Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT karma FROM vb_user WHERE (userid=1 OR userid=1) AND karma=1 AND userid NOT IN () AND usergroupid NOT IN (0);

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 ') AND usergroupid NOT IN (0)' at line 1
Error Number : 1064
Date : Monday, August 6th 2007 @ 03:25:31 AM
Script : http://myforum.com/forum/member.php?u=1
Referrer :
IP Address :
Username : Iorek
Classname : vB_Database

Lea Verou
08-06-2007, 09:34 AM
WTF? I thought I had fixed that! I'll have a look now :S

Lea Verou
08-06-2007, 09:45 AM
Try this product file instead... (although I'm not so sure it will be fixed, I found a small thing I missed that could be causing that)
Do you get any errors in karma.php?
Do you have any banned users?
Any karma banned users?
Which are the restricted usergroups? The 0 I saw in the query? Guests are usergroup 1 btw, not 0. ;)

Khalid-B
08-06-2007, 10:13 AM
Was it the first time that you tried to uninstall that you got that error?


Hello,
Yes this is first time iam uninstalling but cannt.
I installed but its not work got DB error as i told you before so decided to uninstall ang again DB error as i told you .
Please help me thanks

Lea Verou
08-06-2007, 10:18 AM
Hello,
Yes this is first time iam uninstalling but cannt.
I installed but its not work got DB error as i told you before so decided to uninstall ang again DB error as i told you .
Please help me thanks
Try to install the current product I uploaded.
Then probably you will be able to uninstall it (if you wish so)
If you still have issues, inform me.

Khalid-B
08-06-2007, 10:20 AM
zip is updated so lemme try again, wait
Thanks

Khalid-B
08-06-2007, 10:32 AM
hello,
I tried with again but still the same error , if you want i can give u my testid so you can check better.
Thanks

Harley77
08-06-2007, 11:08 AM
Is there a way to have a pop-up box that will allow you to rate an individual? The reason I ask is I currently use zoints local and do not use the built-in members profile page. So being able to rate an individual outside the vb member profile page would be awesome.

cynthetiq
08-06-2007, 12:13 PM
Try this product file instead... (although I'm not so sure it will be fixed, I found a small thing I missed that could be causing that)
Do you get any errors in karma.php?
Do you have any banned users?
Any karma banned users?
Which are the restricted usergroups? The 0 I saw in the query? Guests are usergroup 1 btw, not 0. ;)

Acutally that is leftover from the other attempts that you suggested to other people.

I reset it back to:
Usergroups that are not permitted to use the Karma system
1,3,4
and will try the new XML

Lea Verou
08-06-2007, 12:39 PM
Acutally that is leftover from the other attempts that you suggested to other people.

I reset it back to:

and will try the new XML
I didn't tell them to put the zero there but in the disallowed userids. ;)

Harley77, it would be really easy to put the rating "form" in a popup, but not at all to display the extra info that shows in the profile(last rate date, votes, controversy and whether or not the user viewing it has rated and with what), as that would mean some queries PER POST, which would be too heavy for the server. The average rating is displayed without any extra query, and this is why its "cached" in the user table. But to display the other info, that would need queries.

Lea Verou
08-06-2007, 12:44 PM
hello,
I tried with again but still the same error , if you want i can give u my testid so you can check better.
Thanks

Then go to the product's uninstall code and delete this line, since obviously, it already has been executed:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP karmatotal");
Then uninstall again.
If you get another error, delete the whole version 2.0 uninstall code and try again.

Harley77
08-06-2007, 01:04 PM
Harley77, it would be really easy to put the rating "form" in a popup, but not at all to display the extra info that shows in the profile(last rate date, votes, controversy and whether or not the user viewing it has rated and with what), as that would mean some queries PER POST, which would be too heavy for the server. The average rating is displayed without any extra query, and this is why its "cached" in the user table. But to display the other info, that would need queries.

Well, for the detailed information, It could be on a seperate page. Just for example, "www.mywebsite.com/forums/karma.php?userid=123". This would keep any extra queries contained to a separate page. I know this may be beyond the scope of what your idea/goal of this mod is, but It's worth considering I think to make it a bit more flexible for a variety of situations.

Lea Verou
08-06-2007, 01:08 PM
Well, for the detailed information, It could be on a seperate page. Just for example, "www.mywebsite.com/forums/karma.php?userid=123". This would keep any extra queries contained to a separate page. I know this may be beyond the scope of what your idea/goal of this mod is, but It's worth considering I think to make it a bit more flexible for a variety of situations.
A separate page is too much for so little information. A popup pehaps, now that I think of it, would be a nice idea :)
However you will have to make this, as its too much work (not hard, just too much) for something I don't need (I'm planning to add a popup menu rating in the postbit for the next version however).

cynthetiq
08-06-2007, 01:43 PM
I just realized that I don't see the karma icon on my postbit. I only have one account on the system right now, just the admin.

Lea Verou
08-06-2007, 09:34 PM
I just realized that I don't see the karma icon on my postbit. I only have one account on the system right now, just the admin.
There is no icon on the postbit, just "Karma: " (which links to the user's profile at the place where the karma table is) and the user's karma.

cynthetiq
08-06-2007, 10:25 PM
There is no icon on the postbit, just "Karma: " (which links to the user's profile at the place where the karma table is) and the user's karma.

Okay. I don't see that either. Did I miss a step with the installation and need to edit the postbit template?

The only template edit I did was for MEMBERINFO

Lea Verou
08-06-2007, 10:32 PM
No, it doesn't need an edit, its done via template hooks. I chose not to do the same with MEMBERINFO to give the admin more freedom in the placement of the karma table.
Ensure that:
1. You have the "Show karma on postbit" option set to yes
2. You have vbulletin 3.6.8 (otherwise you will need to manually add the hook, I'm not sure it exists on older versions)
3. The user that you are looking at his postbit is not banned or otherwise restricted from the karma and has it set to on.
4. Your postbit template has all the new hooks added (if you are manually changing it on each update then probably you don't have the hooks, as Jelsoft never gives that extensive template upgrading info)

Btw is everything else working ok?

cynthetiq
08-06-2007, 10:42 PM
Yes. I made a test account, and cannot see the karma in the postbit at all.

1. Yes.

2. yes.

3. yes.

btw, everything else seems to be fine.

Lea Verou
08-06-2007, 10:45 PM
Yes. I made a test account, and cannot see the karma in the postbit at all.

1. Yes.

2. yes.

3. yes.

btw, everything else seems to be fine.
What about 4? I edited my post.

Lea Verou
08-06-2007, 10:45 PM
To cut a long story short, ensure that you have $template_hook[postbit_userinfo_right_after_posts] in the postbit template that you use.

RTFA
08-06-2007, 11:11 PM
Looks like a really nice hack. Looks like a lot of DB problems now though, waiting for a few good installs. :erm:

Lea Verou
08-06-2007, 11:47 PM
Looks like a really nice hack. Looks like a lot of DB problems now though, waiting for a few good installs. :erm:
You can help out on that by installing it on your test board and give me feedback on what happened ;)

Lea Verou
08-07-2007, 12:24 AM
cynthetiq what happened with your issue?

cynthetiq
08-07-2007, 01:48 AM
sorry went out for dinner :)

i'm trying to add "$template_hook[postbit_userinfo_right_after_posts]" into postbit and postbit legacy.

Lea Verou
08-07-2007, 01:51 AM
Only add it if its not already present.
Take a look at the original vb3.6.8 postbit template and put it where its located there.
You'll perhaps have the same issue with the modifyoptions template, if you have customized it in a previous version.

cynthetiq
08-07-2007, 01:55 AM
It existed already in the file in both postbit and postbit legacy.

I just looked and I no longer see the karma check box in the user options. It has disappeared for some reason. Karma settings in vbulletin options is set to yes.

I also checked my MEMBERINFO template and inserted the comment:
<!-- / main info - avatar, profilepic etc. -->
<!--end rating-->

I'm not very good at the vbulletin stuff but did lots of manual edits for phpbb. Please bear with me since I'm not 100% up to speed on vbulletin. Thank you for your patience and please also be as detailed as you can in your explanations. thank you.

Lea Verou
08-07-2007, 03:41 AM
Version 2.1
------------------
Bugfixes
Cached templates (I had forgotten a lot)
New feature: Option to have a popup menu rating form in the postbit, so that users can rate from there.

Lea Verou
08-07-2007, 03:55 AM
Is there a way to have a pop-up box that will allow you to rate an individual? The reason I ask is I currently use zoints local and do not use the built-in members profile page. So being able to rate an individual outside the vb member profile page would be awesome.

I think you'll like the update ;)

TheBlackPoet
08-07-2007, 04:30 AM
okay... i finally was able to find the damn karma & other error source in my dbase.. they were in the USER table... (for those who dont know....).... i deleted them and ftp'd the files... imported the product and it installed no problem... i was looking for a drop down in my acp, but there was none.. so i went into my options and saw three options... and one in the maintenance area.... but nothing in my front end....... so.... help a brother out michelle!!!!

Lea Verou
08-07-2007, 04:33 AM
okay... i finally was able to find the damn karma & other error source in my dbase.. they were in the USER table... (for those who dont know....).... i deleted them and ftp'd the files... imported the product and it installed no problem... i was looking for a drop down in my acp, but there was none.. so i went into my options and saw three options... and one in the maintenance area.... but nothing in my front end....... so.... help a brother out michelle!!!!
Btw you could know from the db error you were getting that they were in the user table, lol. I thought you already knew that!
About the frontend: Go to a member's profile (that is not banned, karma banned, restricted, and has the karma set to active (its active by default). You should see the karma table there, with links to other karma pages (if you have performed the template edit for memberinfo). Also, you should notice the karma option added in Edit options and karma in the postbit (for users that are not banned etc).

TheBlackPoet
08-07-2007, 04:38 AM
oh!!!!! no..... i see it.... it was there..... in a neat looking drop down!!! oh yeah baby!!! it looks really good....

it tried to rate someone.... and got this error...

Sorry, we were unable to process your vote. This might be caused by one of the following reasons:

The appropriate time between rating two different users has not passed yet
You tried to rate yourself.
You tried to rate someone that is banned or has chosen not to participate in the karma system
You tried to rate someone that does not have the permission to participate in the karma system
You have chosen not to participate in the karma system
You are banned
You are not allowed to participate in the karma system

Lea Verou
08-07-2007, 04:41 AM
Glad you like the postbit addition :D
Is any of these reasons true?
Have you rated any user before?

TheBlackPoet
08-07-2007, 04:45 AM
okay.... i saw the tables in the edit options... in two places... the checkboxes are there... but no text.... i figure i didnt load something right.... do you know which one???

i could click them all but i dont know what im clicking....

Lea Verou
08-07-2007, 04:47 AM
CheckboxES? There should be only one!
Also, the text is on phrases, search your phrases, perhaps something's missing there.

Btw I have to go to the super market, so I will be away for 1-2 hours.

TheBlackPoet
08-07-2007, 04:48 AM
okay.... but just so you know.... you did a fine job!!!! i will hit you up when you come back....

*update....

i got it working... and its working fine.... you are a winner in my book!!!

mktrilogy
08-07-2007, 04:57 AM
gimme some time, i click installed but i will install it in my forums later.

cynthetiq
08-07-2007, 10:34 AM
Okay, I installed it but still don't see anything in post bit.

I thought maybe I have another mod stepping on this one so I installed on an older 3.6.5 dev that had no mods except vBadvanced. Still no luck.

Lea Verou
08-07-2007, 10:36 AM
Okay, I installed it but still don't see anything in post bit.

I thought maybe I have another mod stepping on this one so I installed on an older 3.6.5 dev that had no mods except vBadvanced. Still no luck.
cynthetiq, this requires 3.6.8.

Black Poet, I'm back but very tired, I'll go to sleep, sorry.

cynthetiq
08-07-2007, 10:50 AM
cynthetiq, this requires 3.6.8.

Black Poet, I'm back but very tired, I'll go to sleep, sorry.
sleep well! I'll update that older dev to 3.6.8

edit:

Updated on the Dev system and installed.

It looks GREAT!!!!

Tho, I don't know why it's not working on my production system. I guess another mod is stepping on it?

As far as the updated dev goes, I can't rate anyone. The pop up works, the history works, stats work. But no ability to rate. I get an error stating:

Sorry, we were unable to process your vote. This might be caused by one of the following reasons:

The appropriate time between rating two different users has not passed yet
You tried to rate yourself.
You tried to rate someone that is banned or has chosen not to participate in the karma system
You tried to rate someone that does not have the permission to participate in the karma system
You have chosen not to participate in the karma system
You are banned
You are not allowed to participate in the karma system

TheBlackPoet
08-07-2007, 02:15 PM
sleep well! I'll update that older dev to 3.6.8

edit:

Updated on the Dev system and installed.

It looks GREAT!!!!

Tho, I don't know why it's not working on my production system. I guess another mod is stepping on it?

As far as the updated dev goes, I can't rate anyone. The pop up works, the history works, stats work. But no ability to rate. I get an error stating:


the error is because whoever you are trying to rate... has not elected to participate in the Karma system..... I'm HOPING Michelle will re-wite this option to give the admin control of this little choice.. because getting 200+ Members to do it.., is like pulling tiger's teeth...


http://yoursite.com/forum/profile.php?do=editoptions at the bottom of the page is where you select the option to participate

cynthetiq
08-07-2007, 02:53 PM
the error is because whoever you are trying to rate... has not elected to participate in the Karma system..... I'm HOPING Michelle will re-wite this option to give the admin control of this little choice.. because getting 200+ Members to do it.., is like pulling tiger's teeth...


http://yoursite.com/forum/profile.php?do=editoptions at the bottom of the page is where you select the option to participate

That is what I had suspected as well, and I created a new user specifically so that I could test a number of items and made sure that this individual account is enabled.

still no luck.

subnet_rx
08-07-2007, 02:58 PM
I think you have something really good going here. The problem is, I always here complaints about how the rep system is just a popularity contest. Many boards disable it because of this. Does this help that in any way? I'm looking for some type of improved rep system so that it doesn't turn into rep a few friends, neg rep that guy I don't like, and repeat in 24 hours.

TheBlackPoet
08-07-2007, 04:11 PM
okay..., im trying to karma folks via posbit... and its giving me that error... is this only working for one time?? or can i give them neg or pos ratings anytimes (and im missing something)????

0tolerance
08-07-2007, 09:35 PM
hopefully i when i get ALOT of time, i will update my board to 3.6.8 and then re-install all my mods and then install this!

In my eyes this is an excellent mod!
You just need to add the options to turn it on for a user group or not & take the option away from the user to select whether they participate.

Overall: Keep up the excellent work!

Lea Verou
08-08-2007, 04:58 AM
Good morning.
You don't have to enable it for all the users, its enabled by default. You can look at the user table of your database, the karma is 1 for all.
I'm going to look at the rest of your posts now. :)

Lea Verou
08-08-2007, 05:01 AM
I think you have something really good going here. The problem is, I always here complaints about how the rep system is just a popularity contest. Many boards disable it because of this. Does this help that in any way? I'm looking for some type of improved rep system so that it doesn't turn into rep a few friends, neg rep that guy I don't like, and repeat in 24 hours.

I also didn't like the rep system, this is why I made this on the first place.
In this, you don't rate the posts, you rate the users. And you can't rate someone more than once (if you do, the new vote will replace the old one).

Lea Verou
08-08-2007, 05:06 AM
okay..., im trying to karma folks via posbit... and its giving me that error... is this only working for one time?? or can i give them neg or pos ratings anytimes (and im missing something)????

Rating via the postbit uses the same code as rating via the profile. It's just links. They take you momentarily to karma.php, which processes the vote, checks permissions and everything and takes you afterwards to the user's profile (I should make the postbit one via AJAX on the next version, if I ever learn AJAX good enough :p)
Check if the appropriate time has passed when you are trying to vote someone. That time is configurable via the settings. Most e-steki Karma settings apply to the admin as well (as I was mad when the other admin on my site turned his karma off :p)

Lea Verou
08-08-2007, 05:07 AM
hopefully i when i get ALOT of time, i will update my board to 3.6.8 and then re-install all my mods and then install this!

In my eyes this is an excellent mod!
You just need to add the options to turn it on for a user group or not & take the option away from the user to select whether they participate.

Overall: Keep up the excellent work!

These settings are already there, look at the screenshots ;)

Lea Verou
08-08-2007, 07:05 AM
Btw check if the sceduled task has been added, as I've never have made before a sceduled task in a product of mine.

cynthetiq
08-08-2007, 10:56 AM
Rating via the postbit uses the same code as rating via the profile. It's just links. They take you momentarily to karma.php, which processes the vote, checks permissions and everything and takes you afterwards to the user's profile (I should make the postbit one via AJAX on the next version, if I ever learn AJAX good enough :p)
Check if the appropriate time has passed when you are trying to vote someone. That time is configurable via the settings. Most e-steki Karma settings apply to the admin as well (as I was mad when the other admin on my site turned his karma off :p)

Okay, I'll check the time in between rating, but I don't think that I rated a single person.

edit: I chanded the minimum time between rating 2 different users to 0
changed can rate self to yes, ignore users that haven't visited for x days to 0

and I still can't rate anyone.

:(

Lea Verou
08-08-2007, 11:10 AM
Okay, I'll check the time in between rating, but I don't think that I rated a single person.

edit: I chanded the minimum time between rating 2 different users to 0
changed can rate self to yes, ignore users that haven't visited for x days to 0

and I still can't rate anyone.

:(
Then its not it.
in your karma.php find:
//oops! problem!
add below that:
echo "Userid: " . $vbulletin->userinfo['userid'] . " Karma banned: $mysql_kbanned Restricted: $mysql_restricted Banned: $mysql_banned TimeOK: $timeok UsersOK: $users_temp";
Then vote again and paste me the message that is echoed at the top (don't forget to remove the line afterwards).

cynthetiq
08-08-2007, 01:20 PM
Userid: 70 Karma banned: Restricted: Banned: TimeOK: 1 UsersOK: 1

Lea Verou
08-08-2007, 01:29 PM
That's really weird :confused:
Thanks, I'll look into it.

Lea Verou
08-08-2007, 01:32 PM
Are you trying to rate yourself?

cynthetiq
08-08-2007, 01:36 PM
nope trying to rate a test account.

though I did try my own account as well.

Lea Verou
08-08-2007, 06:19 PM
I'm trying to fix some newfound bugs for some hours now.
I will release an update tomorrow (I hope).
I would release it today, but I'm too tired to continue and I'm going to sleep.
It will not have new features, just bugfixes and better code (I finally learned to use a mysql join! :) )
So if you have problems wait until that please.
Goodnight!

Lea Verou
08-09-2007, 07:52 AM
Version 2.2
---------------
-Various bugfixes
-Better coding & structure
-Separate admincp navigation menu

I hope the bugs are fixed now *sigh*

cynthetiq
08-09-2007, 10:29 AM
Now that works!!!!!!!! and it's HOT! I really like it even more that I can use it. It will work great for the community. I can see exactly why you created it.

I added it to my actual production one but that still doesn't work for some reason. I don't see karma in the postbit at all. If you'd like to troubleshoot that maybe it would be helpful for others who have other mods and can't seem to get it to work.

I clicked on the Controversy link and got the following error:

Database error in vBulletin 3.6.8:

Invalid SQL:
SELECT voteid, rating FROM vb_userrating WHERE userid=68 AND active=1 AND userid NOT IN () AND raterid NOT IN () ORDER BY `dateline` DESC;

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 ') AND raterid NOT IN () ORDER BY `dateline` DESC' at line 1
Error Number : 1064
Date : Thursday, August 9th 2007 @ 04:23:11 AM
Script : http://factanonverba.org/forums/karma.php?do=userstats&u=68
Referrer :
IP Address : X.X.X.X
Username : cynthetiq
Classname : vB_Database

Lea Verou
08-09-2007, 10:46 AM
The error on the userstats popup is only at your production forum or the test forum as well?
Also please provide the main karma settings you have set.

cynthetiq
08-09-2007, 10:54 AM
this is just the test forum, I can't get the whole karma system to work on the production forum.

Here's the screenie of my options

Lea Verou
08-09-2007, 11:01 AM
The screenshot seems a bit messed up.
Anyway, try to put a userid (or 2 if one does not work) in the restricted userids list and tell me if its solved.
Of course thats not an "official" fix, but it will help me find the problem.

Lea Verou
08-09-2007, 11:05 AM
Don't do anything, just found the cause.
new karma.php coming soon.

Lea Verou
08-09-2007, 11:19 AM
Try this one and tell me.

cynthetiq
08-09-2007, 12:08 PM
Beautiful!!!!!!!!! It works!

Lea Verou
08-09-2007, 12:35 PM
:) I'm glad we found it. I'm going to update the zip with that then :):)
Phew, at last! :D

cynthetiq
08-09-2007, 01:17 PM
The production forum doesn't have alot of data on it, but has alot a good number of mods. I keep track of them in a forum so that I can easily remember all the additions and changes I make.

So far, I cannot see the karma mod on the postbit at all nor the user profile options to participate in the karma system.

and yes, the mod is active. I just double checked that setting.

dprundle
08-09-2007, 03:56 PM
* clicks install works great

cynthetiq
08-09-2007, 10:51 PM
I had made some changes to the graphics. I thought the thumbs were a bit small so I changed the graphic.

I was trying to change the middle neutral and I was surprised that it wasn't neutral.gif, but it was. I think you'll want to change that.

http://www.e-steki.com/forum/images/smilies/noexpression.gif

Khalid-B
08-09-2007, 11:14 PM
wow ,,, great work man ,, finally its work great at 3.6.8 ..

Thanks for quick updated.
Clicked install.
Thanks

Lea Verou
08-10-2007, 03:29 AM
Good morning everyone :)
Thanks nosherwan and dpruntle :)
cynthetic, do you you have msn? Can you sent it to me in a pm? I think IM will be better to solve this problem.

Lea Verou
08-10-2007, 03:32 AM
I had made some changes to the graphics. I thought the thumbs were a bit small so I changed the graphic.

I was trying to change the middle neutral and I was surprised that it wasn't neutral.gif, but it was. I think you'll want to change that.

http://www.e-steki.com/forum/images/smilies/noexpression.gif
Have I left the full URL there? :eek:

Lea Verou
08-10-2007, 06:17 AM
cynthetiq's problem is solved. He had confused the restricted usergroupids with the restricted userids in the settings. :)

Lea Verou
08-10-2007, 10:38 AM
Please re-download the zip and replace karma_cron.php as I just found a small error in my query that was returning a database error.

cynthetiq
08-10-2007, 12:12 PM
cynthetiq's problem is solved. He had confused the restricted usergroupids with the restricted userids in the settings. :)


Aiigh!!!!!! PEBCAK!!!!!!

thanks for the assist. You taught me alot, may not seem like alot to you, but still learning all this after coming from the world of phpbb.

downloaded and donated!

Thanks again!!!!

Lea Verou
08-10-2007, 12:20 PM
Thanks for the donation cynthetiq, its my first donation ever, lol :)

Alfa1
08-10-2007, 11:11 PM
How about a function to see which member has received the most karma points in the last month? Either in Calendar month or as in last 30 days.
Another feature that would be nice is member that received most karma points in a certain (sub)forum. That would make it easier to ID potential moderator for a (sub)forum.

Lea Verou
08-11-2007, 07:11 AM
Another feature that would be nice is member that received most karma points in a certain (sub)forum. That would make it easier to ID potential moderator for a (sub)forum.

What about the members that rated from the profile then?

Lea Verou
08-11-2007, 07:31 AM
A bug was found that turned the karma off to most members, instead of only those that hadn't visited the site for X days (if that setting was set to on). You are strongly advised to re-download the zip and replace karma_cron.php.
If anyone was affected by this bug, ask me for information on how to turn it on for the other members.

dprundle
08-12-2007, 07:36 AM
How do I turn it on for the other users? This happened to me.

Lea Verou
08-12-2007, 08:16 AM
How do I turn it on for the other users? This happened to me.
Run the following query:
UPDATE user SET karma=1 WHERE 1;
Add your table prefix in front of the word user in the query (for instance if your prefix is vb_ then it will be vb_user).

This will turn it on for ALL users. To turn it off for those who haven't visited for the amount of days specified, run the new cron.

Also, please don't PM me for support issues unless I told you so or there is a special reason for that.

RTFA
08-12-2007, 12:35 PM
You can help out on that by installing it on your test board and give me feedback on what happened ;)

Installed...no DB errors, but I dont see anything in the postbit or edit options page.

I am sure it is because I dont have a hook installed in the right place. What exactly is a "hook" is that like a DB querry? And in order for this to work which ones do I need and EXACTLY where should I put them? Please list? :confused:

Lea Verou
08-12-2007, 03:28 PM
Installed...no DB errors, but I dont see anything in the postbit or edit options page.

I am sure it is because I dont have a hook installed in the right place. What exactly is a "hook" is that like a DB querry? And in order for this to work which ones do I need and EXACTLY where should I put them? Please list? :confused:
Ensure that "$template_hook[postbit_userinfo_right_after_posts]" is in your postbit template.
If it is, provide me a screenshot of your main karma settings.

RTFA
08-12-2007, 10:15 PM
I have that hook in my postbit...not anywhere else though. I found the option in the User Control panel.

http://img337.imageshack.us/img337/4609/scrf6f8a66fo9.png (http://imageshack.us)
Shot at 2007-08-12

This is my Postbit template

$template_hook[postbit_start]
$template_hook[postbit_userinfo_right_after_posts]
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>

<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>


<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
$template_hook[postbit_userinfo_left]

</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show_p_tdob">
<div>
$vbphrase[tdob_time_on_board]: <if condition="$post['timeonboard'] >= 1"><if condition="$show['timespentyears']">$timeboardspent[year] <if condition="$timeboardspent[year] == 1">$vbphrase[year]<else />$vbphrase[years]</if>, </if><if condition="$show['timespentmonths']">$timeboardspent[month] <if condition="$timeboardspent[month] == 1">$vbphrase[month]<else />$vbphrase[months]</if>, </if><if condition="$show['timespentweeks']">$timeboardspent[week] <if condition="$timeboardspent[week] == 1">$vbphrase[week]<else />$vbphrase[weeks]</if>, </if><if condition="$show['timespentdays']">$timeboardspent[day] <if condition="$timeboardspent[day] == 1">$vbphrase[day]<else />$vbphrase[days]</if> $vbphrase[tdob_and] </if>$timeboardspent[hour]:<if condition="$timeboardspent[min]<10">0$timeboardspent[min]<else />$timeboardspent[min]</if>:<if condition="$timeboardspent[sec]<10">0$timeboardspent[sec]<else />$timeboardspent[sec]</if> $vbphrase[hours]<else />$vbphrase[tdob_nodata]</if>
</div>
</if>
<!-- START POSTING FREQUENCY MOD -->
<div>Posting Frequency
<table border="0" cellpadding="0" cellspacing="0">
<tr onmouseover="this.title='$post[posts] posts ($post[postsperday] posts per day)'">
<td><img border="0" src="images/polls/bar-l.gif" width="4" height="17"></td>
<td width="100" background="images/polls/bar-bk.gif"><img border="0" src="images/polls/bar.gif" width="$post[frequency]" height="17"></td>
<td><img border="0" src="images/polls/bar-r.gif" width="4" height="17"></td>
</tr>
</table>
</div>
<!-- END POSTING FREQUENCY MOD -->

<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->

$template_hook[postbit_messagearea_start]

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

$template_hook[postbit_signature_start]

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

$template_hook[postbit_signature_end]

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
$template_hook[postbit_controls]
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
$template_hook[postbit_end]

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
$template_hook[postbit_user_popup]
</table>
</div>
<!-- / post $post[postid] popup menu -->

EnIgMa1234
08-12-2007, 10:54 PM
karmatest.php give a db error

Invalid SQL:

SELECT userrating.voteid as voteid, userrating.userid as userid, userrating.raterid as raterid, userrating.ratername as ratername, userrating.rating as rating, userrating.active as active, userrating.dateline as dateline, userrating.ipaddress as ipaddress
FROM vb_userrating AS userrating
INNER JOIN vb_user AS user ON ( userrating.raterid = user.userid
AND user.karma =1)
WHERE userrating.userid = AND user.karma = 1 AND user.usergroupid NOT
IN (1,3,4) AND ((1186962797-user.lastactivity)/86400<=30)
ORDER BY userrating.rating DESC;

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 'AND user.karma = 1 AND user.usergroupid NOT
IN (1,3,4) AND ((1186962797-user' at line 5
Error Number : 1064

Alfa1
08-12-2007, 11:26 PM
What about the members that rated from the profile then?
Those ratings likely have to do more with the member in general, than their contributions in one forum.

Lea Verou
08-13-2007, 11:09 AM
karmatest.php give a db error

Invalid SQL:

SELECT userrating.voteid as voteid, userrating.userid as userid, userrating.raterid as raterid, userrating.ratername as ratername, userrating.rating as rating, userrating.active as active, userrating.dateline as dateline, userrating.ipaddress as ipaddress
FROM vb_userrating AS userrating
INNER JOIN vb_user AS user ON ( userrating.raterid = user.userid
AND user.karma =1)
WHERE userrating.userid = AND user.karma = 1 AND user.usergroupid NOT
IN (1,3,4) AND ((1186962797-user.lastactivity)/86400<=30)
ORDER BY userrating.rating DESC;

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 'AND user.karma = 1 AND user.usergroupid NOT
IN (1,3,4) AND ((1186962797-user' at line 5
Error Number : 1064
karmatest.php?? Did I include that in the package??
LOL!! :D
Ignore that file, its just a test I was doing to debug sth, I forgot it inside the package.

Lea Verou
08-13-2007, 11:14 AM
I have that hook in my postbit...not anywhere else though. I found the option in the User Control panel.


You don't have the hook at the right place. You have it at the beginning of the template and its supposed to be under:
<div>
$vbphrase[posts]: $post[posts]
</div>

Centrix
08-13-2007, 11:14 AM
cant you just use the reputation system for this? o.o

Lea Verou
08-13-2007, 11:16 AM
cant you just use the reputation system for this? o.o
The reputation system works in a completely different way, and imho, less fair.

RTFA
08-13-2007, 12:28 PM
You don't have the hook at the right place. You have it at the beginning of the template and its supposed to be under:
<div>
$vbphrase[posts]: $post[posts]
</div>


Arrghh! :D:D This is driving me nuts, OK I put it where you said, nothing. I put it before and after, nothing. So I started messing around just because I wanted to see the dang thing work. So I put it in the postbit legacy, LOL!

Oh Yeah, it showed up...and doubled itself after every post. I had about a hundred of them showing up between the posts by the end of the thread. :D

Anyway, I can see everything on this....except I absolutely can not get it to show in the postbit. Want a Temp Admin account?

dellow
08-13-2007, 10:07 PM
hello,

it is great hack,

installed in testing forum and there is a quistion:

1- how can i disallow users to edit the option (Participate in the Karma system) in user CP ?

Regards,

Lea Verou
08-14-2007, 07:58 AM
Arrghh! :D:D This is driving me nuts, OK I put it where you said, nothing. I put it before and after, nothing. So I started messing around just because I wanted to see the dang thing work. So I put it in the postbit legacy, LOL!

Oh Yeah, it showed up...and doubled itself after every post. I had about a hundred of them showing up between the posts by the end of the thread. :D

Anyway, I can see everything on this....except I absolutely can not get it to show in the postbit. Want a Temp Admin account?
Try firstly to give me a screenshot of the issue, cause I didn't exactly understand what happened.

Lea Verou
08-14-2007, 07:59 AM
hello,

it is great hack,

installed in testing forum and there is a quistion:

1- how can i disallow users to edit the option (Participate in the Karma system) in user CP ?


Regards,
There is a setting for restricted usergroups and restricted userids. Use the one that suits you (depending on whether you want to restrict a whole usergroup or just some users)

dellow
08-14-2007, 08:34 AM
thank you Michelle

what i need is to force all members to be (Participate in the Karma system) and there is not option for a user to uncheck the option (Participate in the Karma system) even if his user group allowed to use Karma system.


another thing when i remove some usergroup from (Usergroups that are not permitted to use the Karma system) then return it all members of this usergroup are marked as not Participate in the Karma system so each user need to check the option in his user CP to join the system again.

i think we need in admincp to enter the usergroup id that we want to force them to use the system and a usergroup that optionaly can use the system and the usergroup that not allowed to use the system.


think about it please :)


Regards,

Lea Verou
08-14-2007, 08:38 AM
Normally, the user will not have to check that option again to join the karma. Are you sure that this is the case? :confused:

Also, forcing a person to use the karma, is not something that will be made, I don't consider it ethical.

dellow
08-14-2007, 08:50 AM
Normally, the user will not have to check that option again to join the karma. Are you sure that this is the case? :confused:

I am sorry, i am wrong.

but for some reason when i plaing in admin cp i found all users are NOT Participate in the Karma system . but i don't know for sure why.

Lea Verou
08-14-2007, 08:54 AM
How did you found that out? (which is quite odd)

dellow
08-14-2007, 09:03 AM
i really don't know how.

but i will try to do.

Regards,

EnIgMa1234
08-14-2007, 09:09 AM
The template edits didnt work. I even tried to manually add them but still no luck

RTFA
08-14-2007, 12:03 PM
Try firstly to give me a screenshot of the issue, cause I didn't exactly understand what happened.

Crap! I got it, It needs to go in the postbit legacy...not in postbit. Right after where you said put it. I was putting it in the postbit. Works great now! :)

dellow
08-15-2007, 12:40 AM
Hello Michelle,

i try it many many times,

there is no reason two uncheck Participate in the Karma system ,

some times only to clicks on forum then i lost permission . some times i rate my self two times or three times then i lost permission.

now all users with no permission with unknowen reason

i am making testing with my local server windows with PHP 4.3.6 and mysql 4.0.18

Regards,

DJ XtAzY
08-15-2007, 12:58 AM
For some reason, when i go to Edit Options in UserCP, it just gave me a deadlink page. When i disabled this product, everything was fine.

Lea Verou
08-15-2007, 07:56 AM
Hello Michelle,

i try it many many times,

there is no reason two uncheck Participate in the Karma system ,

some times only to clicks on forum then i lost permission . some times i rate my self two times or three times then i lost permission.

now all users with no permission with unknowen reason

i am making testing with my local server windows with PHP 4.3.6 and mysql 4.0.18



Regards,
Are you sure you have the latest version? There was a similar problem with karma_cron.php and I updated it in post #164. If you haven't replaced it then, do so and then run the query mentioned on post #166 to turn it back on to everybody.

Lea Verou
08-15-2007, 07:57 AM
The template edits didnt work. I even tried to manually add them but still no luck
All of them didn't work?
Also, which version of vB are you on?

Lea Verou
08-15-2007, 07:58 AM
For some reason, when i go to Edit Options in UserCP, it just gave me a deadlink page. When i disabled this product, everything was fine.
I don't have a clue why this could be happening :confused:
Can you provide more details?

dellow
08-15-2007, 08:44 AM
Are you sure you have the latest version? There was a similar problem with karma_cron.php and I updated it in post #164. If you haven't replaced it then, do so and then run the query mentioned on post #166 to turn it back on to everybody.

Thank you , i just re-download karma_cron.php and will give it try again.





But now i would like to understand how Controversy works ?

for i example this user with more than average rating:

when average rating from 1 and more the Controversy is very high.
when average rating from -0.99 to +0.99 the Controversy is high.
when agerage rating from -1 to -5 the Controversy is very high.


this is the results that i am getting right now when i try testing with one user.
my qustion is my result working fine ? if so how it is working and when the user will get low Controversy for example ?


Controversy classes i am using in admincp is 0.75,0.5,0.15



Regards,

Lea Verou
08-15-2007, 08:55 AM
The controversy has to do with the percentage of votes being close to the average rating.
For instance, lets suppose a user has an average rating of 3.2
With your controversy classes, if more than 75% of the votes are either 2, or 3 or 4, he will have a low controversy.
If 50%-75% of his votes are either 2, or 3 or 4, he will have a medium controversy.
If 15%-50% of his votes are either 2, or 3 or 4, he will have a high controversy.
And if less than 15% of his votes are either 2, or 3 or 4, he will have a very high controversy.

DJ XtAzY
08-15-2007, 01:26 PM
I don't have a clue why this could be happening :confused:
Can you provide more details?
It doesnt give me any error messages in logs, but i believe it has something to do with the "e-steki Karma profile field part 2" plugin. If i disable it, then the page loads fine. If i enabled, then it wont even let me enter the Edit Options area.

Lea Verou
08-15-2007, 02:17 PM
It doesnt give me any error messages in logs, but i believe it has something to do with the "e-steki Karma profile field part 2" plugin. If i disable it, then the page loads fine. If i enabled, then it wont even let me enter the Edit Options area.
Yeah, this is the plugin that adds the template :confused:
Do the other automatic template edits work?
Do you have a modified modifyoptions template perhaps?

EnIgMa1234
08-15-2007, 09:09 PM
All of them didn't work?
Also, which version of vB are you on?

3.6.8

dellow
08-15-2007, 11:19 PM
The controversy has to do with the percentage of votes being close to the average rating.
For instance, lets suppose a user has an average rating of 3.2
With your controversy classes, if more than 75% of the votes are either 2, or 3 or 4, he will have a low controversy.
If 50%-75% of his votes are either 2, or 3 or 4, he will have a medium controversy.
If 15%-50% of his votes are either 2, or 3 or 4, he will have a high controversy.
And if less than 15% of his votes are either 2, or 3 or 4, he will have a very high controversy.

i am really sorry, but need more explain.

you said if some user average is 3.2 , what if another value ?

Lea Verou
08-16-2007, 07:27 AM
i am really sorry, but need more explain.

you said if some user average is 3.2 , what if another value ?
If you're good at maths, here is the algorithm:
Let's suppose a user has an average rating of X.
With your controversy classes, if more than 75% of the votes are either [X+0.5]-1, or [X+0.5] or [X+0.5]+1, he will have a low controversy.
If 50%-75% of his votes are either [X+0.5]-1, or [X+0.5] or [X+0.5]+1, he will have a medium controversy.
If 15%-50% of his votes are either [X+0.5]-1, or [X+0.5] or [X+0.5]+1, he will have a high controversy.
And if less than 15% of his votes are either [X+0.5]-1, or [X+0.5] or [X+0.5]+1, he will have a very high controversy.
Where [X] is the whole/integer part of X (eg [3.2]=3, [0.5]=0, [1.7]=1 etc)

Lea Verou
08-16-2007, 07:28 AM
3.6.8
You didn't answer my other questions, does this happen with all the automatic template edits that the hack involves?

yahoooh
08-16-2007, 07:47 AM
can we use it with vbcredets product ?

dellow
08-16-2007, 08:42 AM
With your controversy classes, if more than 75% of the votes are either [X+0.5]-1, or [X+0.5] or [X+0.5]+1, he will have a low controversy.


again and again sorry, but ...


if 75% of the votes ...

is the votes that for that user ? or the entire votes of the site ?

Lea Verou
08-16-2007, 08:44 AM
can we use it with vbcredets product ?
I don't think so, as I've never heard of that product.

again and again sorry, but ...


if 75% of the votes ...

is the votes that for that user ? or the entire votes of the site ?
Of course the votes for that user! Controversy is a user statistic, not a site statistic!

yahoooh
08-16-2007, 09:56 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=151924" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=151924</a>

dellow
08-16-2007, 11:59 AM
what is default controversy classes ? and which one is the best you think ?

Lea Verou
08-16-2007, 12:15 PM
Leave it at its default and then after a while adjust the values according to what happens on your community. If you see eg too many members with very high controversy, or too many members with low it means you have to adjust the classes so that they are almost equally distributed.

dellow
08-16-2007, 12:49 PM
great idea..

but what if you make tha controversy classes generated automaticly by calculating the entire comunity votes, rather than i adjust it manualy using my mine ?

Lea Verou
08-16-2007, 01:22 PM
great idea..




but what if you make tha controversy classes generated automaticly by calculating the entire comunity votes, rather than i adjust it manualy using my mine ?
Nice idea but:
1. Its hard to do so (from a coding point of view)
2. Members will not like the algorithm changing all the time. At least in my forum where karma plays a very important role they would be mad)

dellow
08-16-2007, 09:01 PM
hello,

when user post his rate in the postbit, he should forwarded to same page.
users will not like to vote becuse thay need to go back to the thread that thay was reading.

am i right ?

dellow
08-16-2007, 09:03 PM
hello,

i think if there is option in admincp to allow only member with number of post more than x

thank you :)

DJ XtAzY
08-16-2007, 10:02 PM
Yeah, this is the plugin that adds the template :confused:
Do the other automatic template edits work?
Do you have a modified modifyoptions template perhaps?
The other auto template edits works fine. I dont have the modifyoptions customized either. It doesnt work on the original vb default skin either. Oh im using PHP5 in case your wondering.

Wolf Link
08-17-2007, 05:34 AM
Once I add the xml, I get an error.

What's wrong? :(

Lea Verou
08-17-2007, 09:06 AM
hello,

when user post his rate in the postbit, he should forwarded to same page.
users will not like to vote becuse thay need to go back to the thread that thay was reading.

am i right ?

You are right, its something I want as well. However, I haven't found a way to do that so far.

hello,

i think if there is option in admincp to allow only member with number of post more than x

thank you :)

You can create a usergroup that members will automatically join after X posts (via the user promotions system that is built in vB) and then allow only this usergroup to participate ;) This is what I have done in my forums ;)

Once I add the xml, I get an error.

What's wrong? :(

What is the error?

The other auto template edits works fine. I dont have the modifyoptions customized either. It doesnt work on the original vb default skin either. Oh im using PHP5 in case your wondering.

Do you have $template_hook[usercp_options_other] in your modifyoptions template?

dellow
08-17-2007, 09:13 AM
i just install the Karma in my production forum, every thing seems good, but after about 10 hours i find about 85% of members are not participate Karma.
i am using latest version and this is the cron file that i am use:
i changed the value 0 to be 1 and return back all members to Karma, but i think still there is a problem ethir with me or woth code.


<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'karma_cron');

// ######################### REQUIRE BACK-END ############################
//require_once('./global.php');

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################


//exclude from the karma, users that are inactive, if such a thing has been set
if (!is_object($vbulletin->db))
{
exit;
}
if($vbulletin->options['karma_lastactivity'])
{
$vbulletin->db->query_write("UPDATE `" . TABLE_PREFIX . "user` SET `karma` = 0 WHERE((" . TIMENOW . "-lastactivity)/(24*3600)>" . $vbulletin->options['karma_lastactivity'] . ")");
}

?>

dellow
08-17-2007, 09:15 AM
You are right, its something I want as well. However, I haven't found a way to do that so far.


what about AJAX ?

dellow
08-17-2007, 10:06 AM
Michelle ,

i am sorry for too many post here, but how can add top five rated members in the bottum of home page?

Lea Verou
08-17-2007, 10:30 AM
1. How many days have you set in the setting "Ignore users that haven't visited for X days"?
2. AJAX would be perfect but I haven't learned AJAX good enough yet. If I ever understand AJAX, its one of my plans to make the vote & the remove vote with AJAX ;)
3. This needs a new plugin, if you have a knowledge of php, take a look at karma.php in the stats section and fit it to your needs. Sorry, I can't make it as I'm too busy at the moment with another hack I'm making (I have to make a lot this month for an update of my board that I'm planning) and also I don't need it (my members are too concerned with their karma already, I don't want it to get worse :p)

dellow
08-17-2007, 12:59 PM
1. How many days have you set in the setting "Ignore users that haven't visited for X days"?


it was 100 days.

Lea Verou
08-17-2007, 01:45 PM
it was 100 days.
Are you sure that these users have visited your forum for the last 100 days?

dellow
08-17-2007, 04:33 PM
ohh..

no not sure..

i think thay did not visit the forum in last 100 days.

i just know that if user did not visit the forum for las x days he will be not participate Karma.
i was think his votes only will not be counted.

i think the user should not removed from participate Karma, but should only delete his votes.

Regards,

Wolf Link
08-17-2007, 04:49 PM
<a href="http://www.shadowshr.com/forums/member.php?find=lastposter&f=3" target="_blank">http://www.shadowshr.com/forums/memb...lastposter&f=3</a>

"Warning: require_once(./includes/karma_functions.php) [function.require-once]: failed to open stream: No such file or directory in /member.php(838) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required './includes/karma_functions.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.tiema/shadows/shadowshr.com/forums/member.php(838) : eval()'d code on line 1"

Lea Verou
08-17-2007, 05:45 PM
ohh..

no not sure..

i think thay did not visit the forum in last 100 days.

i just know that if user did not visit the forum for las x days he will be not participate Karma.
i was think his votes only will not be counted.

i think the user should not removed from participate Karma, but should only delete his votes.


Regards,

I think its not nice to register on a forum, post some messages and then visit it again in some months and see that you have an average rating of -3 for instance.
If his votes don't count, then he shouldn't be participating at all, its not fair to be rated when your votes to others don't count!

http://www.shadowshr.com/forums/member.php?find=lastposter&f=3

"Warning: require_once(./includes/karma_functions.php) [function.require-once]: failed to open stream: No such file or directory in /member.php(838) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required './includes/karma_functions.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.tiema/shadows/shadowshr.com/forums/member.php(838 (http://shadowshr.com/forums/member.php%28838)) : eval()'d code on line 1"

You probably did not upload karma_functions.php in your includes folder.

DJ XtAzY
08-17-2007, 08:32 PM
You are right, its something I want as well. However, I haven't found a way to do that so far.



You can create a usergroup that members will automatically join after X posts (via the user promotions system that is built in vB) and then allow only this usergroup to participate ;) This is what I have done in my forums ;)



What is the error?



Do you have $template_hook[usercp_options_other] in your modifyoptions template?
Yes i do.... if i remove all those conditional statements and just have eval(....), then it works fine.

Lea Verou
08-17-2007, 08:37 PM
Yes i do.... if i remove all those conditional statements and just have eval(....), then it works fine.
:confused: :confused: :confused:
I have no idea, I've never faced something like that before... :confused:

DJ XtAzY
08-18-2007, 10:16 PM
:confused: :confused: :confused:
I have no idea, I've never faced something like that before... :confused:
I just tried it on a fresh testvb and again it doesnt work. Maybe it's just me. Can anyone who installed this hack go to UserCP-->Edit Options and tell me if it works for you guys?

dellow
08-18-2007, 10:19 PM
Hi Michelle,

i just complete the top X users rating in homepage and it is working very fine.

but only one problem, the problem is : it is show the top rating regardless checking the option karma_stats_minvotes , and because i am just a goat owner :D i don't know how to add the (if) function to check the option karma_stats_minvotes .

the code is:

if ($adet<1)
{
$adet = 5;
}

$getkarmax = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY karmatotal DESC LIMIT 0, $adet");
while ($getkarma= $db->fetch_array($getkarmax))
{
$topkarmausers .= "<a href=\"member.php?u=".$getkarma['userid']."\">".$getkarma['username']."</a> (".$getkarma['karmatotal']."), ";
}



would you please help what to add to fix it?


Regards,

Techno05
08-26-2007, 04:02 AM
I installed it but in the postbit there is 4 different things that say karma :P can you help me?

Lea Verou
08-30-2007, 08:33 AM
I installed it but in the postbit there is 4 different things that say karma :P can you help me?
Huh? :eek:
Can you post a screenshot?

DJ XtAzY
08-31-2007, 05:49 PM
I just tried it on a fresh testvb and again it doesnt work. Maybe it's just me. Can anyone who installed this hack go to UserCP-->Edit Options and tell me if it works for you guys?
Ok i finally got it to work. It was my fault on my end... something to do with gzip. Anyways now i get this error msg when i Edit Options

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /profile.php(879) : eval()'d code on line 5

Lea Verou
09-01-2007, 07:25 AM
Ok i finally got it to work. It was my fault on my end... something to do with gzip. Anyways now i get this error msg when i Edit Options

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /profile.php(879) : eval()'d code on line 5
Can you provide more details about the conditions that this error occurs?
How many members does this board have?
Does it occur all the time in the edit options page?

NolF
09-06-2007, 01:18 PM
Installed, and gave me no errors.
I have a whole bunch of hacks installed and no conflics. Abou 60k users and hips of posts xD so it works ^^

3 suggestiosn I can think at the moment

First: The images (thumbs up down and neutral) should be in the misc folder of the theme instead of the root folder of images :) ($stylevar[imgdir_misc]/)

Second: Put a link to the stats on the "quick link" menu :)

Third: An option to hide who gave the karma

Lovely hack, and honestly great work :) hoppefully we'll see the unvote hack for 3.6 :D
Keep up with the good work and good luck with the MOTM

Lea Verou
09-06-2007, 02:29 PM
Installed, and gave me no errors.
I have a whole bunch of hacks installed and no conflics. Abou 60k users and hips of posts xD so it works ^^

3 suggestiosn I can think at the moment

First: The images (thumbs up down and neutral) should be in the misc folder of the theme instead of the root folder of images :) ($stylevar[imgdir_misc]/)

Second: Put a link to the stats on the "quick link" menu :)

Third: An option to hide who gave the karma

Lovely hack, and honestly great work :) hoppefully we'll see the unvote hack for 3.6 :D
Keep up with the good work and good luck with the MOTM
Thanks NolF, especially for the "good luck with the MOTM" part :) (although I'm sadly loosing :()

I agree with your first and second suggestion, however I don't have the time atm to update or support this modification (as I said, its only supported for a few days after each release). The third suggestion is not needed, as they are already hidden for the members.

DJ XtAzY
09-06-2007, 03:32 PM
ok i fixed this myself. I have to change a little for the sql query in the "e-steki Karma profile field part 2" to get rid of this error for some reason


$isthere = mysql_num_rows($db->query_read("SELECT karma FROM " . TABLE_PREFIX . "user WHERE userid = ".$vbulletin->userinfo['userid']." AND karma=1"));


to


$isthere = $db->num_rows($db->query_read("SELECT karma FROM " . TABLE_PREFIX . "user WHERE userid = ".$vbulletin->userinfo['userid']." AND karma=1"));

NolF
09-08-2007, 02:03 AM
Well I've found couple of interesting things. One is a serious bug, which never came to my mind, but has to be fixed :O because is a big one aye


When u give karma to someone, you use this link
./karma.php?do=processvote&u=$$$$&rating=[b]4
But if you use firefox (works on ie too u just have to bother yourself coping the link word for word), and copy the link, you cna change that number to any number, for example 100, and it will give 100 karma points to that user. if you put -1000 it will take 1000 points from that user :O

I wonder how one of my users figured it out, but very cleaver indeed. The creep didn't even report it, but there you go

[bug? 2]
I'm pretty sure it is how you intended it to, but, is a bit ehhh to classify inactive users as not having opted to participate in the system. I mean, in the stats page the part which says "users have chosen to not participate in the Karma system. Shame on them!"
In my personal opinion, only active users, who have opted not to participate should be counted here. :D

[Suggestion 1]
Okey this suggestion, is better than any of the previous 3 ^^
When you give karma, you are redirected to the members profile, but my users (at least) find it quite annoying. I guess vBulletin has made them used to been redirected to the same page they were at.

[Suggestion 2]
At the moment, in order to calculate karma averages, you are using the old fashion add all scores and divide by the number. However, it is not the same to have 100 votes and an average of 4 than having 5 votes and an average of 5.
I recon a formula such as the one used on imdb.com is more aquarate than the current formula
weighted rating (WR) = (v ? (v+m)) ? R + (m ? (v+m)) ? C

where:
R = average for the movie (mean) = (Rating)
v = number of votes for the movie = (votes)
m = minimum votes required to be listed in the Top 250 (currently 1300)
C = the mean vote across the whole report (currently 6.7)
Variables, I guess should be determined via ACP, or calculated to correspond with the votes flux

[Comment]
I run a Spanish forum, so I had to translate the phrases, I just wanted to say, it was quite complicated at times to translate them, because it wasn't intuitive from the names, and the original English sentence what the purpose of the phrase was.
Also in many cases, you just put a word/sentence, which will be followed by a variable (ie number username etc) and dont use the {1} that makes it quite complicated to translate in many languagues
I could do a list if you are interested :)

Thx for listening ^^

Lea Verou
09-08-2007, 02:10 AM
Really useful feedback NolF. Thanks a lot.
I hope my users don't figure out bug #1 till I have time to fix it :(
Its so scary to think of what can happen if they do, they really take the karma seriously. :(
I don't think bug #2 can easily be fixed though. Perhaps a workaround would be to substract inactive users from that number, whether they have opted out voluntarily or not.
I'll try to find some time to fix bug #1 soon, it doesn't seem too time consuming to fix.

About the phrases, {1},{2} etc is used in vB phrases as well, its supposed to be the "correct" way. Placing a variable next to the phrase is problematic if a language requires it to be before the phrase or in the middle of it.

edit: Perhaps you should put bug #1 in code tags, till its fixed, so that it can't be read by guests or unlicensed users. You never know who's reading.

Lea Verou
09-08-2007, 02:16 AM
Bug #1 bothered me quite a lot, so here's a workaround.
Tell me if it works.

NolF
09-08-2007, 03:00 AM
yep that works, when u give 100 for example, it is set back to 5, and if you use 4.5 for example it counts as 4 :)

great job :) faster than I expected great job


About the phrases, {1},{2} etc is used in vB phrases as well, its supposed to be the "correct" way. Placing a variable next to the phrase is problematic if a language requires it to be before the phrase or in the middle of it.That is what I was trying to say ^^. Some of your phrases don't use the {1} etc
for example
karma_rated ---- {1} has rated
in my opinion should be {1} has rated {2}

karma_you_have_voted ---- You have rated this user a
it should be -> You have rated this user a {1}
etc there are some more

Lea Verou
09-08-2007, 03:02 AM
Oh, lol :o
Yeah, a list of those would help, so that I change them in the next update. :)

NolF
09-08-2007, 03:36 AM
Here you go, a list with the sentences I recon need the {1}s

karma_percent_of_votes == % of total votes => {1} % of total votes [Note: I think this phrase is not beign used]

karma_rated == {1} has rated => {1} has rated {2}

karma_ratedby == {1} was rated by => {1} was rated by {2}

karma_users_have_rated == users have rated => {1} users have rated {2} users

karma_users_not_participate == users have chosen to not participate in the Karma system. Shame on them! => {1} users have chosen to not participate in the Karma system. Shame on them!

karma_users_that_gave_the_most_x_votes == users that gave the most {1} votes => {2} users that gave the most {1} votes [Note: the {2} is the number 10 by default]

karma_you_have_voted == You have rated this user a => You have rated this user a {1}

userrating_lastrated == Last rated on => Last rated on {1}

=======
Note: I've only included the ones users can see, ACP functions can go in english no problem

Thx for the fix once again ^^

ijob
09-08-2007, 07:41 AM
I'm wanting to install this hack but am unsure about if its working without problems? Can someone advise on its status? does it work?

cheers

MikeHolohan
09-08-2007, 07:54 AM
This is an excellent hack, well done, just a question tho can I change the word Karma to something else?

thanks, Mike.

NolF
09-08-2007, 10:34 AM
I'm wanting to install this hack but am unsure about if its working without problems? Can someone advise on its status? does it work?

cheers

Yes it works perfectly on 3.6.8 (at least to me :O)
use this file (https://vborg.vbsupport.ru/showpost.php?p=1334630&postcount=235), instead of the one in the zip :)

ged
09-15-2007, 09:04 AM
Can we modify it for a range of [-1,1]?

Lea Verou
09-15-2007, 01:27 PM
Can we modify it for a range of [-1,1]?
I guess that won't be very difficult :)

ged
09-16-2007, 07:54 AM
How?

wtrk
09-17-2007, 01:26 AM
does anybody have this working on their site, id like to see a demo of it (besides screen shots, i need action) to be sure i want to really install it (maked it anyway just in case).

Ski-Whiz
09-22-2007, 03:23 AM
Great hack!!!

Is there a way to remove the redirect to the member's profile, when they vote???

When you vote, it then sends you to their profile. It's kind of annoying..

other than that, I love it!

Ski-Whiz
09-23-2007, 02:22 PM
Ok I figured this out myself..

My members got tired of viewing a thread... Then they would give karma to a member. But it would not return them to the thread they were reading once they rated someone. It would kick them to their profile.

So what I did was edit karma.php

Find:

$vbulletin->url = 'member.php?' . $vbulletin->session->var['sessionurl'] . "u=$userid";

And remove it, save the file and upload it..

It will now bring you back to the page you were viewing..

NolF
09-25-2007, 11:15 PM
Thank you a lot Ski-Whiz ^^ worked perfectly :D now ppls should not complain :P

Ski-Whiz
09-27-2007, 01:21 PM
No problem. My members hated that it redirected them to the profile, and I was sure I wasn't alone. :D

Lea Verou
09-28-2007, 05:33 AM
Thanks Ski-Whiz, this will be a default in the next version :)
(Along with some bugfixes).

I expect to start working on the next version in a few days, just after I finish another hack I'm developing for the past month (one that's only for my personal use). :)