News:

Wondering if this will always be free?  See why free is better.

Main Menu

Karma Description Mod

Started by Grek.Kamchatka, September 11, 2005, 11:48:26 PM

Previous topic - Next topic

ssoltz

Err...well I, for one would just like to say "thank you!" to Grek!

I love the mod the way it is, I just needed RC3 compatibility...now I can move forward with my upgrade...

thank you again!!!
Steve Soltz
SSK Creatives, Inc.

KD

when I install the latest version of your mode on my 1.1 RC3 forum, it says that it installed correctly, but at the top of the page I got this message:

Error: Database modifications failed!Error: Database modifications failed!

any idea?

SusanTN

Quote from: KD on September 05, 2006, 01:28:19 PM
when I install the latest version of your mode on my 1.1 RC3 forum, it says that it installed correctly, but at the top of the page I got this message:

Error: Database modifications failed!Error: Database modifications failed!

any idea?


3 statements can generate that error. Try running each one in phpmyadmin or whatever you use....
Replace {$db_prefix} with the prefix you use for your SMF database.

ALTER TABLE `{$db_prefix}log_karma`
        ADD `Description` TINYTEXT NOT NULL,
        ADD `link` TEXT NOT NULL


ALTER TABLE `{$db_prefix}log_karma`
        DROP PRIMARY KEY



The last one is a bit harder so if the first two run then it's most certainly the last....


// Turn the array defined above into a string of MySQL data.
$string = '';
foreach ($mod_settings as $k => $v)
        $string .= '
                        (\'' . $k . '\', \'' . $v . '\'),';

// Sorted out the array defined above - now insert the data!
if ($string != '')
        $result = db_query("
                " . ($overwrite_old_settings ? 'REPLACE' : 'INSERT IGNORE') . " INTO {$db_prefix}settings
                        (variable, value)
                VALUES" . substr($string, 0, -1), __FILE__, __LINE__);

// Uh-oh spaghetti-oh!
if ($result === false)
        echo '<b>Error:</b> Database modifications failed!';

Grek.Kamchatka

Quote from: KD on September 05, 2006, 01:28:19 PM
when I install the latest version of your mode on my 1.1 RC3 forum, it says that it installed correctly, but at the top of the page I got this message:

Error: Database modifications failed!Error: Database modifications failed!

any idea?

Everything ok. It is because of your database already contain KDM fields. (Description and logtime)

Loverboy

I couldn't make a dutch language file for this Modification :( Could anyone help me please.

citrusmirakel

I love this mod.

My only problem with it, and something I'm trying to change, is the spotty English listed in the summary. "Who change my karma?" should be "Who changed my karma?" and "Whom I change karma?" should probably be something like "Whose karma have I changed?"

I've been looking through the package files, and I can't find the files these descriptions are in. Could somebody please point me to them?

Grek.Kamchatka

Quote from: citrusmirakel on September 05, 2006, 09:19:28 PM
I love this mod.

My only problem with it, and something I'm trying to change, is the spotty English listed in the summary. "Who change my karma?" should be "Who changed my karma?" and "Whom I change karma?" should probably be something like "Whose karma have I changed?"

I've been looking through the package files, and I can't find the files these descriptions are in. Could somebody please point me to them?
Thank you, citrusmirakel. Sorry for my bad english, i'm from Russia $-)

You'll find this strings in Karma_Description_Mod.xml

KD

ok, well I have a little problem.

the logs are accessible (but empty since I uninstalled the last version to install this one) but when I want to change someone's karma, it gives me this error:

Parse error: parse error, unexpected $ in /home/kddio/public_html/forum/Sources/Karma.php on line 670

and the line 670 in my file is the end of the file, which is simply: 
?>

so I don't know what to do  :(

I tried uninstalling it and reinstalling it, but it doesn't work.

KD

nevermind

I took the karma.php file from another forum that I manage and it works now

Grek.Kamchatka

#409
After uninstalling the mod, i advice to upload vanilla karma.php.

chinclub

This is a great mod. THANKS!!  Will you be adding an update soon with the email or pm function when karma is changed?

citrusmirakel

QuoteThank you, citrusmirakel. Sorry for my bad english, i'm from Russia $-)

Hey, your English is a lot better than my Russian.

Thanks, got it changed. Incidentally, for anyone who might be curious, the file you're looking for is Themes/default/languages/profile.english.php. The strings $txt['who_change_my_karma'] and $txt['whom_i_change_karma'] (they're at the end) are what you'll want to change.

Loverboy

Quote from: bl968 on September 05, 2006, 06:13:40 AM
Yep! Once you have done a language you should think about sending a list of the translations to Grek_Kamchatka  so he can add it to future versions of the mod. 

It worked thanks... I would like to upload the files i have changed.. but i can't attach any files here?

Grek.Kamchatka

#413
KDM 2.0 rc1 now available. Please read the releasenotes on download page. http://mods.simplemachines.org/index.php?mod=192

Release notes:
Karma_Description_Mod_ver.2.0_rc1
*Added notification function (Users can choose how they'll be notified when their karma will be changed. [None][Popup Message][Personal Message]. In PM they can see link to own karma log, reason of a change and link to the message where karma was changed.
*There are some bugs in this version that i know. 1st After installing the mod, until you checked 'Enable karma notify' you will resieve some errors in error log. 2nd If you disable KDM, but karma function still be worked you will resieve an error in error log. Please, if you'll find any other bugs PM me, or post it here. Have a nice day.




Edit

1st bug is fixed.
If you want to fix it manually, open Subs.php find code:
if ($modSettings['karmanotifier'] && !$user_info['is_guest'] && (!isset($options['enable_notify'])))in line 3115 and replace it with this code:if (isset($modSettings['karmanotifier']) && !$user_info['is_guest'] && (!isset($options['enable_notify'])))

Then find code:if ($modSettings['karmanotifier'] && !$user_info['is_guest'] && ($options['enable_notify'])==1) in line 3119 and replace it with this code: if (isset($modSettings['karmanotifier']) && !$user_info['is_guest'] && ($options['enable_notify'])==1)




2nd bug in Profile.template.php is fixed
If you go to 'Look and Layout Preferences' in your profile, you will see this comment '//Karma Description Mod (Notifier)'. It must be invisible. To fix this bug, please open Profile.template.php and find this code:
//Karma Description Mod (Notifier)
                                                        ';
                                                                if ($modSettings['karmanotifier'])

replace it with this code:
';
                                                        //Karma Description Mod (Notifier)
                                                                if ($modSettings['karmanotifier'])




3rd bug is fixed
If you disable KDM, but karma function still be worked you will resieve an error in error log - fixed.
Open Karma.php, find this code:

/* They haven't, not before now, anyhow.
           If the key isn't in the array it will return.
           Or if it does exist and it's length is 0 then it will return.
           If Karma Description Mod disable then easy smite or applaud */
if (!empty($modSettings['karmadescmod'])){
if (!array_key_exists('Description',$_POST) || strlen($_POST["Description"]) == 0){return;}}


{ if ( empty($action) || empty($modSettings['karmaWaitTime']))
        { $_POST['Description'] = AddSlashes($_POST['Description']);

and replace it with this code:

/* They haven't, not before now, anyhow.
           If the key isn't in the array it will return.
           Or if it does exist and it's length is 0 then it will return.
           If Karma Description Mod disable then easy smite or applaud */
if (!empty($modSettings['karmadescmod']))
{
     if (!array_key_exists('Description',$_POST) || strlen($_POST["Description"]) == 0){return;}
}
else
{
        $_POST['Description']='';
}
{ if ( empty($action) || empty($modSettings['karmaWaitTime']))
        { $_POST['Description'] = AddSlashes($_POST['Description']);





This bugs is fixed in Karma_Description_Mod_ver.2.0_rc2

Loverboy

#414
http://rapidshare.de/files/33452133/Karma_desc_Dutch_languagepack.rar.html

I have uploaded the dutch language files for the karma description mod.. Those are my files so there could be other modifications inside them.

Could you adjust them into the new version of Karma Description Mod

Grek.Kamchatka

Quote from: LocoTurk on September 17, 2006, 11:04:46 AM
I have uploaded the dutch language files for the karma description mod.. Those are my files so there could be other modifications inside them.
It's not full. Please, download a new version of my mod and translate new language files

Grek.Kamchatka

Karma Description Mod ver.2.0 Release Candidate 2 now available.

RoarinRow

Quote from: Grek_Kamchatka on September 18, 2006, 01:42:10 AM
Karma Description Mod ver.2.0 Release Candidate 2 now available.

Cool, thanks!  Do you just install right over Karma_Description_Mod_ver.1.9.7-2.zip for RC3 or do you have to uninstall, then re-install new version?

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Grek.Kamchatka

Quote from: RoarinRow on September 18, 2006, 01:58:08 AM
Cool, thanks!  Do you just install right over Karma_Description_Mod_ver.1.9.7-2.zip for RC3 or do you have to uninstall, then re-install new version?
Yup, uninstall previous version (1.9.7-2) and install new version (2.0) on vanilla source files. Don't forget to backup, please.

RoarinRow

Quote from: Grek_Kamchatka on September 18, 2006, 02:03:36 AM
Quote from: RoarinRow on September 18, 2006, 01:58:08 AM
Cool, thanks!  Do you just install right over Karma_Description_Mod_ver.1.9.7-2.zip for RC3 or do you have to uninstall, then re-install new version?
Yup, uninstall previous version (1.9.7-2) and install new version (2.0) on vanilla source files. Don't forget to backup, please.

Thank you!

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Advertisement: