vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   e-steki Karma BETA (https://vborg.vbsupport.ru/showthread.php?t=109716)

Lea Verou 03-06-2006 10:00 PM

e-steki Karma BETA
 
New version for 3.6, with a lot more features, bugfixes and better coding!!

-------------------------------------------------------------------------------
Beware that this is still a BETA. This means, it may have bugs. If you want to help with the beta-testing phase, please mention what happened with this hack (if it works or not, if you encountered any bugs, if everything is ok etc) as detailed as possible.


I used quite a lot code from User Rating 1.0 by tnguy3n for this modification. Then I changed it a lot to fit my needs, and I think it's so changed that it could be released as a separate modification. I also got his permission for this :)

What does e-steki Karma have that User Rating 1.0 doesn't?
1. When a user votes someone for a second (or third, fourth etc) time, the new vote replaces the old instead of being added. I felt it was more fair this way.
2. There is a complete statistics page, with 7 tables that display various statistics
3. Ratings are from -5 to 5 instead of 1-10 and they are represented by images
4. The Karma of each user displays in the postbit (unless he has it turned off)
5. 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.
6. Since there are no comments, there is no possibility that the user gets a "you didn't complete all fields" error. In fact, even the phrase for it is removed.
7. The table is not placed where the hack author wants (above the footer in UR1) but where YOU want it (by inserting a small comment in the place that you want it in MEMBERINFO). This, however, means one more template change is involved.
8. There is no field that you should add via the userfield manager. This caused bugs in UR1 as you had to run a query to set all the checkboxes to 1 and new registrants had their karma turned off by default.
9. IP in who rated
10. Although they can't see who voted, they can see if they have rated a user and with what (see screenshot).


Why somebody may prefer User Rating 1.0 over e-steki Karma?
I have removed some of the user rating 1.0 features that I didn't need. Some of you may need them though, so pay a visit to User Rating's thread as well.
1. There are no comments in this hack. Nowhere. I've removed anything that has to do with comments.
2. There is no "anonymous voting". In my site, only admins see who has voted, so it's useless to us.
3. No template changes in UR1.
4. A little bit less queries and plugins (since there are less abilites in certain things) in UR1.
5. The "can rate himself" is off by default.
6. Only admins can see who voted. This is planned to be a usergroup permission in the future though.

Misc features
1. WOL location for stats
2. Fully phrased
3. Usergroup permissions

Why is it a beta?
1. Because the end product is the biggest modification I've worked on and there is a high chance I missed something
2. The permission for "Can view Stats" is not working sometimes.
3. I'm not sure how if the install code is going to give an error on an existing installation of e-steki Karma or UR1.

Planned features
1. Of course, bugfixes
2. Usergroup permission for who can see who voted. (currently only admins can see that.)
3. The stats line in memberinfo wont appear if the user does not have permission to view the stats.
4. Ignore specific usergroups from the karma (such as banned)
5. Suggest your own, as long as they keep the system as fair as possible. My main concern is that the system is fair and democratic, and this is why I made most of the changes.

Don't forget to click INSTALL if you use this or you will be damned to hell :p

The Chief 03-07-2006 02:01 PM

looks cool, ill check it out sometime :)

Lea Verou 03-07-2006 02:01 PM

First post reserved (hey, everyone does it :p)

edit: Darn, The Chief got there before me :(

mark1491 03-07-2006 02:36 PM

thanks again Michelle!

stamos2003 03-07-2006 02:37 PM

Geia sou ;)


looks nice but.....

when calling the karma_stats.php it answers with:
PHP Code:

WarningInvalid argument supplied for foreach() in /karma_stats.php on line 60
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 80
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 86
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 90
 
Warning
arsort() expects parameter 1 to be array, null given in /karma_stats.php on line 98
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 100
 
Warning
asort() expects parameter 1 to be array, null given in /karma_stats.php on line 111
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 113
 
Warning
arsort() expects parameter 1 to be array, null given in /karma_stats.php on line 125
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 127
 
Warning
array_count_values(): The argument should be an array in /karma_stats.php on line 140
 
Warning
arsort() expects parameter 1 to be array, null given in /karma_stats.php on line 157
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 159
 
Warning
arsort() expects parameter 1 to be array, null given in /karma_stats.php on line 172
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 174
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 188
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 189
 
Warning
Invalid argument supplied for foreach() in /karma_stats.php on line 190
 
Warning
array_count_values(): The argument should be an array in /karma_stats.php on line 191 

any ideas?

p.s. there is a typo at the bitfields "Can view the Karma ststistics?" missing a "a" ;)

Lea Verou 03-07-2006 02:40 PM

If there are no votes, the stats wont work.
I don't have time to fix it now, I'm going out to eat.
See you guys and gals! :)
Please write any bugs here and I'll take a look when I come back :)

The Chief 03-07-2006 02:45 PM

Quote:

Originally Posted by Michelle
First post reserved (hey, everyone does it :p)

edit: Darn, The Chief got there before me :(

ah, sorry for that, I will install for that :)

[high]* The Chief clicks install[/high]

stamos2003 03-07-2006 02:48 PM

true, with the first votes the errors disappeared.

MissKalunji 03-07-2006 02:49 PM

Lets thest this

MissKalunji 03-07-2006 02:54 PM

ok first bug

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
ALTER TABLE user ADD karma SMALLINT(1) NOT NULL DEFAULT '1';

MySQL Error  : Duplicate column name 'karma'
Error Number : 1060
Date        : Tuesday, March 7th 2006 @ 11:53:04 AM
Script      : http://www.dancehallareaz.com/forum/admincp/plugin.php
Referrer    : http://www.dancehallareaz.com/forum/admincp/plugin.php?do=productadd
IP Address  : xxxx
Username    : MissKalunji
Classname    : xxxx

Perhaps :) if table exist drop it :p

projectego 03-07-2006 03:06 PM

Sounds interesting, I'll be sure to check this out once the bugs are resolved. :)

MissKalunji 03-07-2006 03:10 PM

its nto really a bug just annoying if you had a previous karma installed on previous vb thats all :)

MissKalunji 03-07-2006 03:20 PM

template isnt working..............

Snake 03-07-2006 04:09 PM

Sweeet! I've been waiting for this. :D

Gizmo5h1t3 03-07-2006 04:12 PM

rofl...10 most HATED users?

reckon thats the wrong choice of phrase for an install on a board which tries to promote user participation.

hack itself looks really promising apart from that tho.

Lea Verou 03-07-2006 05:20 PM

Gizmo5h1t3 the hack is fully phrased. There is no need to keep that phrase ;)
MissKalunji which template? Also, if you drop the userrating table you will lose the votes :( I have to figure out a way to overwrite without drop :(
Also, it seems that you have a column named karma on your "user" table??? UR1 did not add that. Did you have another karma system installed in the past? Whas there something like that? Which hack was it?

Lea Verou 03-07-2006 05:26 PM

Admincp sceenshot added. I had forgotten :o

hiiped 03-07-2006 05:36 PM

great work Michelle

looks nice

< reserves space # 18 >

< clicks install >

Lea Verou 03-07-2006 05:44 PM

Quote:

Originally Posted by hiiped
< reserves space # 18 >

LOL, that was smart! :D

Tell me how it goes.



Also, ppl, do not only mention bugs. If you installed it and you found no bugs please mention that too. Your experience helps in the development of this hack, since it's a beta. It only takes you 1 minute to post what happened ;)

MissKalunji 03-07-2006 05:52 PM

Quote:

Originally Posted by Michelle
Gizmo5h1t3 the hack is fully phrased. There is no need to keep that phrase ;)
MissKalunji which template? Also, if you drop the userrating table you will lose the votes :( I have to figure out a way to overwrite without drop :(
Also, it seems that you have a column named karma on your "user" table??? UR1 did not add that. Did you have another karma system installed in the past? Whas there something like that? Which hack was it?

the memberinfo isnt showing

and i realise in usercp i cant tick : enable karma system...

and yes back on vb2 i had karma system

Lea Verou 03-07-2006 05:58 PM

Quote:

Originally Posted by MissKalunji
the memberinfo isnt showing

and i realise in usercp i cant tick : enable karma system...

and yes back on vb2 i had karma system

Did you add the html comment mentioned in the readme file?
You mean that if you tick the checkbox and then go back it's not ticked?
How was that karma system? Can you give me a link? :)

MissKalunji 03-07-2006 06:05 PM

Quote:

Originally Posted by Michelle
Did you add the html comment mentioned in the readme file?
You mean that if you tick the checkbox and then go back it's not ticked?
How was that karma system? Can you give me a link? :)

www.dancehallareaz.com/forum/misskalunji

yes i added the <!--end rating--> right under the google add

not showing


i fixed the checkbox error i 4got to rebuild the plugins...

but its still not showing....in the profile here the stats
http://www.dancehallareaz.com/forum/karma_stats.php

Lea Verou 03-07-2006 06:37 PM

Quote:

Originally Posted by MissKalunji
www.dancehallareaz.com/forum/misskalunji

yes i added the <!--end rating--> right under the google add

not showing


i fixed the checkbox error i 4got to rebuild the plugins...

but its still not showing....in the profile here the stats
http://www.dancehallareaz.com/forum/karma_stats.php

-Is the karma system enabled?
-Have you adjusted the permissions?
-Do you have YOUR karma enabled?
-Does the postbit part show?
-Try disabling and enabling your karma
-Try placing the comment somewhere else
-Stupid but check this too: Are you logged in?
-If nothing works try removing the conditional "<if condition="$doesparticipate[karma]">" and tell me if it worked.

Good luck!

PS: I may go to sleep in a few minutes.

MissKalunji 03-07-2006 07:50 PM

i figured it out :-/ there was custom template that i did with the other user rating and forgot to revert them :)

MissKalunji 03-07-2006 08:21 PM

Next question i dont want it to show has average 5 i want it show example

average 5 = 5 stars
average 4 = 4 stars etc

how can i do that?

Injektilo 03-07-2006 08:30 PM

i get this errors on karma_stats.php

Code:

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 174

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 189

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 190


mark1491 03-07-2006 08:47 PM

Quote:

Originally Posted by Injektilo
i get this errors on karma_stats.php

Code:

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 60

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 80

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 86

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 90

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 100

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 113

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 127

Warning: array_count_values(): The argument should be an array in /karma_stats.php on line 140

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 159

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

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 174

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 188

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 189

Warning: Invalid argument supplied for foreach() in /karma_stats.php on line 190

Warning: array_count_values(): The argument should be an array in /karma_stats.php on line 191


Quote:

Originally Posted by Michelle
If there are no votes, the stats wont work.
I don't have time to fix it now, I'm going out to eat.
See you guys and gals! :)
Please write any bugs here and I'll take a look when I come back :)

Read Michelle's comment that was already posted

eNforce 03-07-2006 09:03 PM

Great plugin, installed :)

Injektilo 03-07-2006 09:10 PM

Quote:

Originally Posted by mark1491
Read Michelle's comment that was already posted


i've posted wrong error messages... check again now :P

lazytown 03-07-2006 10:24 PM

THANK YOU FOR YOUR BRILLIANT WORK!

Great mod! Will install once it gets ironed out a bit (or perhaps install on one of my smaller forums first). Ranked it a 5 * for now to show support. :)

IDEA 1: I've modified some ratings systems (like for photos) so that, for example, if there are more than 3 votes the lowest scored vote gets dropped (or the highest, etc). Or the lowest score gets a boost of one point. So if you have a user with 25 votes and 4.99 score (because of one bad vote) they rank higher than a user with 2 votes at 5.0. This could be customizable somehow.

IDEA 2: The effects/weight of a karma vote could be modified by the voting member's stats in some way (like number of posts, registration date, their karma, etc). This would be a little more like the rep system, but not really because it is always an average with one vote per person. This would be a big change but would be a lot more accurate of "true karma."

QUICK QUESTION: Are the stats only visible to admins? If they are visible to everyone, it would be nice to be able to turn some sections on/off (though I probably could do this with template changes if you used templates for the display of stats).

Thanks
-vissa

Vizionz 03-08-2006 12:09 AM

Invalid SQL:
SELECT karma FROM user WHERE userid=358;

i get that when i try to view the posts now

tnguy3n 03-08-2006 12:12 AM

Quote:

Originally Posted by Vizionz
Invalid SQL:
SELECT karma FROM user WHERE userid=358;

i get that when i try to view the posts now

It means you don't have karma column in user table. Re-import the product xml and choose Overwrite option to insert necesary data.

Vizionz 03-08-2006 12:13 AM

same thing after importing it again with overwrite

Vizionz 03-08-2006 12:25 AM

i cant even uninstall it now either :(

Invalid SQL:
ALTER TABLE usergroup DROP userratingday, DROP userratingperm;

MySQL Error : Can't DROP 'userratingday'. Check that column/key exists

then if i overwrite it again it says installed same errors try to uninstall and go through the same thing ovr and over

Lea Verou 03-08-2006 02:49 AM

Quote:

Originally Posted by vissa
THANK YOU FOR YOUR BRILLIANT WORK!

Great mod! Will install once it gets ironed out a bit (or perhaps install on one of my smaller forums first). Ranked it a 5 * for now to show support. :)

You could install it in your test forum so that there are more beta-testers :)

Quote:

IDEA 1: I've modified some ratings systems (like for photos) so that, for example, if there are more than 3 votes the lowest scored vote gets dropped (or the highest, etc). Or the lowest score gets a boost of one point. So if you have a user with 25 votes and 4.99 score (because of one bad vote) they rank higher than a user with 2 votes at 5.0. This could be customizable somehow.
Very nice, but can you think of an algorithm for that?

Quote:

IDEA 2: The effects/weight of a karma vote could be modified by the voting member's stats in some way (like number of posts, registration date, their karma, etc). This would be a little more like the rep system, but not really because it is always an average with one vote per person. This would be a big change but would be a lot more accurate of "true karma."
Nah, I don't agree with this. It's not fair. For instance, how would you feel if in the elections your vote counted less than the president's?

Quote:

QUICK QUESTION: Are the stats only visible to admins? If they are visible to everyone, it would be nice to be able to turn some sections on/off (though I probably could do this with template changes if you used templates for the display of stats).
There are usergroup permissions for the stats. However strangely enough they don't work all the time :ermm: After some tries though the permissions gets stored at last (one of the known issues) :p

tnguy3n 03-08-2006 02:51 AM

Quote:

Originally Posted by Vizionz
i cant even uninstall it now either :(

Invalid SQL:
ALTER TABLE usergroup DROP userratingday, DROP userratingperm;

MySQL Error : Can't DROP 'userratingday'. Check that column/key exists

then if i overwrite it again it says installed same errors try to uninstall and go through the same thing ovr and over

Go to Maintenance -> Execute SQL Query, then run following queries (1 query a time).
Code:

ALTER TABLE usergroup ADD userratingday SMALLINT(4) NOT NULL DEFAULT '0'
Code:

ALTER TABLE usergroup ADD userratingperm INT(10) NOT NULL DEFAULT '0'
Code:

CREATE TABLE IF NOT EXISTS userrating (voteid) int(10) NOT NULL DEFAULT '0'
Code:

ALTER TABLE user ADD karma SMALLINT(1) NOT NULL DEFAULT '1'
Then uninstall the product.

Lea Verou 03-08-2006 02:52 AM

Quote:

Originally Posted by MissKalunji
Next question i dont want it to show has average 5 i want it show example

average 5 = 5 stars
average 4 = 4 stars etc

how can i do that?

In the postbit and memberinfo:
With conditionals that check $averating. But you will lose accuracy, as they will only show whole numbers.
You can put the actual rating as the alt text though :)
Also you can make half images, but I don't want to think about how complicated those conditionals will be :ermm:

Lea Verou 03-08-2006 02:54 AM

Quote:

Originally Posted by tnguy3n
Go to Maintenance -> Execute SQL Query, then run following queries (1 query a time).
...
Then uninstall the product.

Thanks a lot for helping with the support :) :)
But why wouldn't those fields be installed? The install code is supposed to install those too :(

Lea Verou 03-08-2006 02:56 AM

Quote:

Originally Posted by Vizionz
Invalid SQL:
SELECT karma FROM user WHERE userid=358;

i get that when i try to view the posts now

What exact error message do you get?
If you get "column karma does not exist" or something like that, your problem is what tnguy3n says.

MissKalunji 03-08-2006 03:12 AM

Quote:

Originally Posted by Michelle
In the postbit and memberinfo:
With conditionals that check $averating. But you will lose accuracy, as they will only show whole numbers.
You can put the actual rating as the alt text though :)
Also you can make half images, but I don't want to think about how complicated those conditionals will be :ermm:

lol ok i guess im stuck to be using the numbers til i figure it out

thanks!


All times are GMT. The time now is 01:59 AM.

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

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

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete