vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Karma Hack v 1.0 (https://vborg.vbsupport.ru/showthread.php?t=34882)

AndyTSJ 03-01-2002 06:38 PM

Got it to work though - a great follow up to v1 :)

Sweet

pgowder 03-01-2002 06:57 PM

I did.

Thanks

pgowder 03-01-2002 07:10 PM

How can I create a page to show the 10 highest user's?

Lionhead 03-01-2002 07:49 PM

Really great job

let me install it today

Thanks a ton certify!

pgowder 03-01-2002 09:50 PM

Is there a way to make the Karma button only useable by Mods and Admins?

I had some users really take offense at that part!

Limpkinw 03-01-2002 10:08 PM

I must be missing something.. I Can Not get this to install.

First I had to replace action=$script with action=install_point.php in the install file to even get it to run. Now I can run it, and it apepears to have worked. But karma doesnt show up anywhere in the forums.
Any advice appreciated!

www.limpkinw.com
(I just started this stuff couple days ago forgive the rough look)

Guichi 03-01-2002 10:10 PM

Quote:

Originally posted by pgowder
Is there a way to make the Karma button only useable by Mods and Admins?

I had some users really take offense at that part!

yeah im wondering the same thing, Thanks much certify this is the hack ive been waiting for!

Neil 03-02-2002 01:16 AM

LOVE the hack! I have a problem and a couple of suggestions.

I have two different styles on my forum ( http://forum.gravitoncity.com ), and when I installed the hack I made sure I updated the templates for both styles. However, the hack only seems to work on the style that I've selected. There are no karma lights under usernames, no karma button under the posts, and no karma score under the username on the front page.

I wanted to re-run the install to make sure that I read all the instructions right, but I realised that I might wipe all the karma given already by creating the database tables again! *gulp* I'm not great with php or mysql, so I don't wanna screw it up hehe.

Can anyone help?

Suggestions:

More karma=more lights under the username. Let the admin set how many points = how many lights.

Apply the selected style to the karma rating box. It's just white at the moment. Also, I agree the text is too small and the box too big.

For some reason if i select positive karma and enter a comment, hitting enter resets the form rather than submitting it. It is habit for me to hit enter rather than click submit, so this is a bit annoying.

Have a list of preset comments that ppl can choose from if they cant be bothered writing a comment. The slashdot keywords (eg: Interesting, Toll, Funny, Flamebait, Informative, Redundant) might be a good start.

Show a karma rating for each post. We know the karma for the user, but not for their posts. Parhaps put it at the top next to where the post topic appears (if there is one).

I'd LOVE to be able to filter posts ala slashdot based on their karma.

Add a column to the memberlist page with their karma shown, and allow the list to be sorted by karma (as it can now be done with number of posts).

Allow a user to see all comments made to their posts, rather than having to go to each post. There could be a link in the user CP perhaps to a list of all comments, and the posts they're associated with. The karma for that post could also be listed there.

Ability for the admin to change the phrase in the popup box via the admin CP. I didn't like "Agree/Disagree" because that means something completely different from "good/bad" post. Someone might make a brilliantly written post that I don't agree with, but the wording would suggest that I should give them negative Karma. (I've hacked the adis file to change it on mine).

I like the previously mentioned idea of awarding karma for each referral. Would encourage more referrals.

Allow the admin to choose how much they give/take as extra on each post. Setting it in the CP is easy, but it means that all posts to be awarded must be awarded by the same ammount.

*phew* That's all I can think of for the moment. I hope I havn't been too demanding with these suggestions. I love the hack so far, and think that it can get even better. Use or ignore these as you see fit!

THANKS once again for the hack!

cditty 03-02-2002 04:06 AM

I keep getting mysql errors that I can't figure out. The forum is working fine and all the posts are there, but I am getting mysql connect errors everywhere there is a karma database string.

Quote:

On the main page

Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/html/sweeps/forum_dev/index.php3 on line 114

Warning: MySQL: A link to the server could not be established in /home/httpd/html/sweeps/forum_dev/index.php3 on line 114

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 116

Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/html/sweeps/forum_dev/index.php3 on line 122

Warning: MySQL: A link to the server could not be established in /home/httpd/html/sweeps/forum_dev/index.php3 on line 122

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 123

Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/html/sweeps/forum_dev/index.php3 on line 129

Warning: MySQL: A link to the server could not be established in /home/httpd/html/sweeps/forum_dev/index.php3 on line 129

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 130

Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/html/sweeps/forum_dev/index.php3 on line 132

Warning: MySQL: A link to the server could not be established in /home/httpd/html/sweeps/forum_dev/index.php3 on line 132

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 133

Quote:

In adis.php3

Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/html/sweeps/forum_dev/adis.php3 on line 1

Warning: MySQL: A link to the server could not be established in /home/httpd/html/sweeps/forum_dev/adis.php3 on line 1

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/adis.php3 on line 1

Limpkinw 03-02-2002 04:27 AM

I know it probably here, but I read this 3 times through and cant find. Where do i modify and template and how?

I have installed as per instructions and do not see karma option under CP, nor anywhere on site.

Thank you!

John Lindsey 03-02-2002 05:33 AM

The mistake I did on my first install is that I just clicked on the buttons, thinking the modifcations to the various files were being done automatically. Then, when nothing showed, I did it again, but pasted in the required stuff to the files.

Everything shows now, but I get an error message when I try to post a new message or reply:

Quote:

No forum specified. If you followed a valid link, please notify the webmaster
Any idea what I messed up to get this?

BTW, I am running versions 2.2.1

Overgrow 03-02-2002 07:09 AM

You can use my hack's format and features but please make your own GIF images. That way we can at least tell that it is a different 'karma' hack that the forum is running. A new name wouldn't hurt either to keep confusion down since the feature set is still quite different.

ps. Haven't you got people turbo posting blank replies for karma yet?

Neil 03-02-2002 07:30 AM

Here are some replacement "karma" dot images I just made. I hope they're different enough from Overgrow's. I have the photoshop file I made them from if that would help prove it.

http://neilstuff.homeip.net:180/share/kpos.gif
http://neilstuff.homeip.net:180/share/kneg.gif
http://neilstuff.homeip.net:180/share/kbalance.gif

If you'd like something COMPLETELY different made, just let me know. Just wanting to help out where I can!

Overgrow 03-02-2002 07:34 AM

Thanks Neil ;) Not as different as I'd hoped but certainly enough for me. I did notice that they're not displaying karma with those GIFs on each post so it is easy to tell the hacks apart right now.

Lesane 03-02-2002 10:11 AM

Quote:

Originally posted by John Lindsey
The mistake I did on my first install is that I just clicked on the buttons, thinking the modifcations to the various files were being done automatically. Then, when nothing showed, I did it again, but pasted in the required stuff to the files.

Everything shows now, but I get an error message when I try to post a new message or reply:



Any idea what I messed up to get this?

BTW, I am running versions 2.2.1

John, look at this thread:
http://vbulletin.com/forum/showthrea...threadid=40721

Neil 03-02-2002 10:32 AM

Here's some more that are even MORE different that folks might like to use if they like!

https://vborg.vbsupport.ru/
https://vborg.vbsupport.ru/
https://vborg.vbsupport.ru/

certify 03-02-2002 10:45 AM

I have just upload the fix readme.txt and new instructions for header and footer in adis.php

pgowder 03-02-2002 11:32 AM

Can you add a feature that gives users points for reading x number of threads?? One of my users suggested it, because she doesn't post alot.

cditty 03-02-2002 04:17 PM

Quote:

Originally posted by certify
I have just upload the fix readme.txt and new instructions for header and footer in adis.php

Certify, will this new update fix my mysql connect issues?

Chris

cditty 03-02-2002 04:35 PM

I sort figured out what the problem. Still having issues though. I think it has something to do with persitant connections maybe????

Anyhow, I replaced this:
Quote:

$gettotalpoint=mysql_query
with this:
Quote:

$gettotalpoint=$DB_site->query_first
and the errors that pointed to those lines dissappeared. The existing errors are
Quote:

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 116

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 123

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 130

Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/sweeps/forum_dev/index.php3 on line 133
And these are the lines that those point to.

Quote:

line 116 - $numrows_gettotal = mysql_num_rows($gettotalpoint);
line 123 - $numrows_gettotal1 = mysql_num_rows($gettotalpoint1);
line 130 - $numrows_getagree = mysql_num_rows($getagree);
line 133 - $numrows_getdis = mysql_num_rows($getdis);

Guichi 03-02-2002 05:49 PM

i installed the hack and set the amount of negative karmas for auto ban but it seems that is not working. i have changed the settings on the autoban multiple times and it still doesnt work :(

pgowder 03-02-2002 07:38 PM

How can I add this as a column on the memberlist?

Neil 03-02-2002 10:19 PM

Is anyone able to help me with the problem of Karma only accessible from one of my styles, as I requested in an earlier post please?

AndyTSJ 03-02-2002 10:57 PM

When you installed it, presumable you applied the modifications to the templates in your default style ? Then reapply the template parts of the hack to the same templates, but in your other styles... that's my guess.

Neil 03-03-2002 02:31 AM

As far as I recall, I was careful to apply any template mods to ALL of the templates used on my site. Besides, the functions that display the karma totals and the karma button are defined in the script, rather than the template right?

Also, I can't go back and apply the changes in the template anyway, because the instructions are in the install file, and if I run that again it'll stuff up the database, won't it?

Winky 03-03-2002 07:29 PM

ok maybe I am stupid here but the install text says nothing and the install script says nothing when doing the install does the install do everything for you or is it just telling you what you need to modify? I tried both ways and nothing works for me.

kushtiUK 03-03-2002 08:15 PM

I have VBportals and would like to add a Side Block to show my top five with Karma, can anyone tell me the PHP I would need to call that up.

If this helps, I already have on show the top five posters and the PHP used is;

// Set this to the max number top posters to display
$a=1;
$num = 5;
global $bburl;
$query = "SELECT * FROM user ORDER BY posts DESC LIMIT $num";
$resultlatest = mysql_query($query);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo " <font size = 1>&nbsp;$a: <A HREF='$bburl/member.php?action=getinfo&userid=$latest_array[userid]'>$latest_array[username] </A> $latest_array[posts]</FONT><BR>";
$a++;
}
echo "<font size = 1><A HREF='$bburl/memberlist.php?what=topposters&perpage=20'>more... </A>";

Recon_Boy 03-04-2002 04:10 AM

One 'gotcha' I ran into is trying to see a result on my forums after upgrading from v1 to v1.2 without going to the admin cp and setting the new options first!!!...I know....duh...

HeadStAtE! 03-04-2002 02:32 PM

Thank you for this hack.

Currently I have 3 main concerns.

1) I think a template should be used for the content of the pop-up box rather than holding all this within adis.php.

2) adis.php is checking for the user's title:
Quote:

if ($usertitle == 'Administrator' || $usertitle == 'Moderator')
This is dangerous because the user title can be changed in the user CP, it should be checking for the usergroup being either a moderator, super moderator or admin.

3) By refreshing pages (or using the back button) I have been able to vote more than once.

Niggles:

1) The button alt image in postbits has the spelling "karna" not "karma" :)

2) It waits for you to enter a comment then tells you that you should log in first!

3) You can submit a comment without selecting a positive or negative opinion.

pgowder 03-04-2002 02:43 PM

Can anyone help me display the top 10 or display the karma in memberlist??

My members are loving the hack, but want to be able to see who is the highest!

thanks

HeadStAtE! 03-04-2002 06:41 PM

Quote:

Originally posted by Neil
Here's some more that are even MORE different that folks might like to use if they like!

http://neilstuff.homeip.net:180/share/kpos02.gif
http://neilstuff.homeip.net:180/share/kneg02.gif
http://neilstuff.homeip.net:180/share/kbalance02.gif

Here's some I've chosen to do which are similar but a bit bigger...

http://forums.bradfordnightlife.com/images/kpos.gif positive
http://forums.bradfordnightlife.com/images/kneg.gif negative
http://forums.bradfordnightlife.com/images/kbalance.gif neutral

These are GIF's with transparent backgrounds.

HeadStAtE! 03-04-2002 09:02 PM

Is it possible to have the Karma icons displayed instead of the total on the home page (forumhome_welcometext)? And being able to click the icon for the total instead like you can within a thread?

pgowder 03-04-2002 11:26 PM

I just had a user suggest this!

Would it be possible to have karma added when a user clicked a link??

A user suggested given people points for ads they click on. I run an adserver so I could add something to the ad code.

How could I do that though???

certify 03-05-2002 06:53 AM

I will go thru all the feature suggestions and work on it.

SONOFSAM 03-05-2002 07:03 AM

i followed instructions exactly, but i keep getting errors when i go to run the install_karma.php:

Fatal error: Failed opening required './global.php' (include_path='.:/usr/local/lib/php') in /home/clanrkc/public_html/forums/upload/admin/install_karma.php on line 6

im running vb 2.2.2 with php3 extensions on a red hat linux 7.1 server with php version 4.1.2 installed.

any ideas whats wrong?!?!!?


www.clanrk.com

certify 03-05-2002 07:27 AM

Try this

replace

./global.php

with this
/your/server/path/to/global/php

certify 03-05-2002 07:32 AM

Quote:

Originally posted by HeadStAtE!
Thank you for this hack.

Currently I have 3 main concerns.

1) I think a template should be used for the content of the pop-up box rather than holding all this within adis.php.

2) adis.php is checking for the user's title:
This is dangerous because the user title can be changed in the user CP, it should be checking for the usergroup being either a moderator, super moderator or admin.

3) By refreshing pages (or using the back button) I have been able to vote more than once.

Niggles:

1) The button alt image in postbits has the spelling "karna" not "karma" :)

2) It waits for you to enter a comment then tells you that you should log in first!

3) You can submit a comment without selecting a positive or negative opinion.

I will ask my team to take a look.

Neil 03-05-2002 07:33 AM

Great to hear you're on top oc it certify! Can't wait to see the next version. Got a couple more points.

A user had the brilliant suggestion. Karma can can be reduced with time. The admin can set the rate (egL 1pt per month to 10 per day etc). This would encourage people to keep coming back, keep posting good posts, and give newcomers a chance to get as much karma as the old-time regulars. It would also mean that there may not be the same 5 people with the most karma.

I noticed a problem which I don't know if it is a bug or a limitation of the script. When typing a "?" in the comment field, the database rejects the entry. I'm not sure if this happens with other special characters. At the very least, the popup should have a list of invalid characters.

I still havn't figured out why the hack is only working on one of my styles! It's unfortunate because some of my users are unable to see the hack at all!! Can anyone help? (please read my previous posts for details).

certify 03-05-2002 08:53 AM

I will look into the problem with the styles and the invalid character.

certify 03-05-2002 08:59 AM

Next version
Will be release in April 2002. ;) If you have any features to suggest or recommendation please post a NEW thread in my forum instead of vbulletin.org, so I can keep track of all the suggestions and as this thread is getting too long and I can't keep up with it.


All times are GMT. The time now is 07:33 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.01467 seconds
  • Memory Usage 1,848KB
  • 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
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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