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)

cditty 03-05-2002 10:30 AM

Certify, Any idea on my problems? See here - https://vborg.vbsupport.ru/showthrea...776#post224776

Chris

certify 03-05-2002 11:05 AM

Quote:

Originally posted by cditty
Certify, Any idea on my problems? See here - https://vborg.vbsupport.ru/showthrea...776#post224776

Chris

I will look into this now.

SONOFSAM 03-05-2002 11:01 PM

still didnt work, now instead of the error on line six...its line 8!

grrr

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

i appreciate any help you can give

ender 03-06-2002 11:28 PM

I posted this on your forum as well, Certify.

There is a bug in karma1.2 where if you use an apostrophe ['] in the comments section it will return an error:
Code:

Database error in vBulletin 2.2.1:

Invalid SQL: INSERT INTO adis (postid, userid, username, post_userid, adis, comment) VALUES (49416, 1, 'ender', 318, 'a', 'Test with apostrophe's')
mysql error: You have an error in your SQL syntax near 's')' at line 1

mysql error number: 1064

Date: Wednesday 06th of March 2002 08:20:30 PM
Script: http://forums.particlesun.com/adis.p...LAMAR[QSF]
Referer: http://forums.particlesun.com/adis.p...LAMAR[QSF]


certify 03-07-2002 03:46 AM

Karma 1.3 Release - March 7 2002

I highly recommended that you upgrade to 1.3.
  • Minor display changes.
  • Bug Fixes.
  • Security fixes.

Limpkinw 03-07-2002 03:56 AM

1.2 is all I can download...Im I a goof or is it just not posted yet?

certify 03-07-2002 04:00 AM

Just posted. :)

SaintDog 03-07-2002 04:34 AM

Upgrade does not work, I get the following:

Creating tables...

ALTER TABLE point not successful.

mysql_error()

ALTER TABLE point not successful.

mysql_error()

ALTER TABLE point not successful.

mysql_error()

ALTER TABLE point not successful.

mysql_error()

ALTER TABLE point not successful.

mysql_error()
DROP TABLE adis successful.
CREATE TABLE adis successful.


Any ideas?

SaintDog

certify 03-07-2002 05:14 AM

Are you currently using Karma1.2?

SaintDog 03-07-2002 05:35 AM

I had installed Karma 1.2 already (clean install about a week ago, no other hacks are installed on the board), went to use the upgrade in version 1.3, then the above happened.

SaintDog

orca 03-07-2002 03:47 PM

The upgrade from 1.0 to 1.3 went very well. Good work I like the hack. Anyway, if I click on karma and want to add a comment using the link It says You need to be registered.... although I'm registered. I removed the line which say include header/footer. But as that are only HTML files it shouldn't be a problem.

certify 03-08-2002 06:24 AM

Quote:

Originally posted by SaintDog
I had installed Karma 1.2 already (clean install about a week ago, no other hacks are installed on the board), went to use the upgrade in version 1.3, then the above happened.

SaintDog

Don't run run upgrade_karma_1_0.php

This is what you have to do.

For those that are upgrading from version 1.2 to 1.3, upload adis.php and kpoints.php. Change the following lines in your postbit template.

(a)find this line of code:
winAtt = "scrollbars=1, width=900, height=500, left=5";
replace it with:
winAtt = "scrollbars=1, width=500, height=300, left=5";

(b)find this line of code:
<a href="javascript:popout('adis.php?flag=$post[flag]&postid=$post[postid]&userid=$bbuserinfo[userid]&username=$bbuserinfo[username]&usertitle=$bbuserinfo[usertitle]&post_userid=$post[userid]&post_username=$post[username]')"><img src="https://vborg.vbsupport.ru/vbimages/postkarma.gif" border="0" alt="Karna"></a>
replace it with:
<a href="javascript:popout('adis.php?flag=$post[flag]&postid=$post[postid]&userid=$bbuserinfo[userid]&username=$bbuserinfo[username]&usergroup=$bbuserinfo[usergroupid]&post_userid=$post[userid]&post_username=$post[username]')"><img src="https://vborg.vbsupport.ru/vbimages/postkarma.gif" border="0" alt="Karna"></a>

pgowder 03-08-2002 12:06 PM

For those of you who want to list the Top 10, here is the code.

Thanks to www.devshed.com!

PHP Code:

$query "select uid, newthread+reply+view+admin_mod+morereply+totalpenalty as total from storepoint order by total desc limit 0,10";

$my_q mysql_query($query) or die(mysql_error());
$row_count mysql_num_rows($my_q);
for (
$i=0$i<$row_count$i++) {
     list(
$uid$total) = mysql_fetch_row($my_q);
     
$my_q2 mysql_query("select username from user where userid='$uid'") or die(mysql_error());
     list(
$username) = mysql_fetch_row($my_q2);
     print 
"$username has $total points<br>";
     
mysql_free_result($my_q2);
}

mysql_free_result($my_q); 

All the fields have to be not null.

pgowder 03-08-2002 12:50 PM

When I view a record in the storepoint table and add up the fields myself, I get different total that what you are displaying????

kushtiUK 03-08-2002 12:54 PM

Pgowder - thanks for this but it does not seem to work - all I get is a list of ten users, that are not the top ten and it does not display the total points but just says - "kushtiuk has points"

Any idea's - has anyone else got this working?

pgowder 03-08-2002 12:57 PM

All the fields have to be not null and have a default value of 0.

ExcErr 03-08-2002 04:49 PM

hey certify, can you and your team make some features:
1. user can give karma points to the same user only once a week !
2. near username in the comment window should stay + or -............
3. if user don't want to show his name in the comment, he can choose some option and his name won't be able to see.....
for example:
"+"|"excerr": Good post
"-" | "******": F*ck off
4. user can see comments about him in user cp under "Subscribed Threads"
5. admin can delete user comments, if there are for exampe censored words !
thx in advance!
THE BEST HACK! respect

kushtiUK 03-08-2002 05:02 PM

Quote:

Originally posted by pgowder
All the fields have to be not null and have a default value of 0.
I'm sorry I don't fully inderstand! Do I ahve to make a new sql table for this to gather the data and if so what is it called?

I understand about making the default value of 0 and null.

pgowder 03-08-2002 05:08 PM

All the fields in the storepoint table must be not null and default to 0 otherwise a calculation on a null fields wll not work.

kushtiUK 03-08-2002 05:28 PM

alright! I understand now - doh! LOL -= thanks m8

pgowder 03-10-2002 03:32 PM

Certify can you help me with why my query gets different results than what your hack displays?

pgowder 03-10-2002 03:33 PM

I want to also say a special thanks to Certify for this hack. My posts went from 700 for the week before Karma to 1800 for the first week with Karma!

Thanks!

Lesane 03-10-2002 03:57 PM

Quote:

Originally posted by pgowder
I want to also say a special thanks to Certify for this hack. My posts went from 700 for the week before Karma to 1800 for the first week with Karma!

Thanks!

lol :)

MW[MWGN] 03-10-2002 09:59 PM

]How do I make the karma points to NOT increase when users post in forums which do not increase post counts, I need the modification for that quite urgently, I hope someone can help (it may be asked and answered before in this longgg thread, but it's 12am here and I'm tired to read all those pages of text :))

Inferno 03-13-2002 11:47 AM

Great hack but when I click on the 'Add Karma' button, I get this message:

You are required to login/register before you can add karma!

I am logged in and registered and I can add points OK it's just that this function doesn't work.

Can anyone help please? :)

Thanks

GraphicW 03-15-2002 06:40 AM

Inferno,

Here is the help you need. First I will explain the cause of the problem:

The instructions give wrong information on how to place the Karma image link. The result is that the script is not sent sufficient information ($usertitle) causing a null result to be sent. The result is that to adis.php, you appear not to be registered.

Enough talk now, here is the fix:

Inferno 03-15-2002 08:43 AM

Quote:

Originally posted by GraphicW
Inferno,

Here is the help you need. First I will explain the cause of the problem:

The instructions give wrong information on how to place the Karma image link. The result is that the script is not sent sufficient information ($usertitle) causing a null result to be sent. The result is that to adis.php, you appear not to be registered.

Enough talk now, here is the fix:


Thanks GraphicW, that worked brilliantly, you are a hero :)

certify 03-15-2002 10:54 AM

Thanks GraphicW for the pointing out bug fix. :)

Version 1.5 is on the way and should be done next month. :)

kyrnel 03-15-2002 12:07 PM

I just installed last night and everything works great except for one minor issue.
The primary admininstrator can see the Add/Remove Karma section of the popup window (when you click on the Karma button) and so can the moderators but the additional admins cannot see it, they see the same thing as a regular user..
this is very strange..
Do you think it is related to the issue that Inferno posted about?

thx

Webmasta XT 03-15-2002 12:48 PM

I get this error

PHP Code:

WarningFailed opening 'http://www.xtreme-forumz.cc/header.html' for inclusion (include_path='.:/php/includes:/usr/share/php'in /home/virtual/site11/fst/var/www/html/adis.php on line 10 

where the hell is the stupid header file?
or the footer?

Inferno 03-15-2002 12:53 PM

You need to create and upload the header.html and footer.html files yourself and specify the destination correctly in the relevant parts of adis.php.

Sorry if that is not what you meant :)

L8R

Erwin 03-15-2002 02:11 PM

I love this hack! :D

Erwin 03-16-2002 12:40 AM

One thing about this hack - once you have added karma to a post, you can still do it again until you refresh the thread. The $flag variable remains "0" until the thread is refreshed.

pgowder 03-16-2002 12:45 AM

How can I set the Karma to be add to a user for reading posts.

Martyjp 03-16-2002 02:41 PM

Great hack, simple to follow instructions works fine but

What I have I done wrong

Erwin 03-16-2002 08:23 PM

Quote:

Originally posted by kyrnel
I just installed last night and everything works great except for one minor issue.
The primary admininstrator can see the Add/Remove Karma section of the popup window (when you click on the Karma button) and so can the moderators but the additional admins cannot see it, they see the same thing as a regular user..
this is very strange..
Do you think it is related to the issue that Inferno posted about?

thx

The permissions for the extra Admin options are given to usergroup 6 (admins) and the moderator(s) of the forum - if a moderator is not the designated mod for the forum that the post is in, the extra Admin options won't be available. You can change this by changing the relevant Adis.php bits.

Mutt 03-17-2002 11:44 AM

I like the hack but does anybody know what kind of load it adds? it seems like alot of querries.

dgessler 03-17-2002 11:17 PM

Certify: On you site I noticed the karma number on your message board shows up under every post by your members, is this possible to do with the distribution in the zip?

I'd appreciate anyone's input on this :)


Thanks,
Dan

hypedave 03-18-2002 12:18 AM

just installed this hack on 2.2.4 no problems yet
thankyou for sharing this harck with us

JulianD 03-18-2002 01:07 AM

Quote:

Originally posted by dgessler
Certify: On you site I noticed the karma number on your message board shows up under every post by your members, is this possible to do with the distribution in the zip?

I'd appreciate anyone's input on this :)


Thanks,
Dan

There is an option on the admin cp whenever you want to use images, text or nothing.


All times are GMT. The time now is 10:52 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.01445 seconds
  • Memory Usage 1,830KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)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