News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Karma Description Mod

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

Previous topic - Next topic

Grek.Kamchatka

Now available new version of Karma_Description_Mod_ver.1.1. It compatible with SMF 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1 Beta 3 Public.

SeaOfSin

Great mod, but I was wondering, how hard would it be to make it so that when a user goes into the karma stats all they see are the ones for them and the ones by them, in other words the ones with their id under ID_EXECUTOR and ID_TARGET.

frostwhite

This Mod is really great! Installed it - works fine ;)

But I think the reason field shouldn't be required. No reason -> no entry in the Log.

Thanks :)

!Hachi!

how we can view "Karma Change Description"   because i didn't saw any link to that page?
Happy Ramadan

Grek.Kamchatka

In Admin panel->Features and Options-> check "Enable Karma Description Mod"
Then on main page you will see [Karma Stat] label near the [More Stats]

http://yourdomain/forum/index.php?action=viewkarma

thinkbig

great mod! thanks! it's working fine on my 1.0.5

I'm thinking, is there any way to make it such that only admins or mods can view the log?
is there any way we can take away the link [Karma Stat] from the main page?
What php file should I pull out and edit?

Thank you!


Grek.Kamchatka

If you want to remove [Karma Stat] label from main page, just open BoardIndex.template.php, find this code:
';
//If Karma Description Mod Enable then give me please link on viewkarma action
if (!empty($modSettings['karmadescmod'])){echo'   <a href="'.$scripturl.'?action=viewkarma">' . $txt['statkarma'].'</a>',' ';} echo'
and replace it.

And if you want to disable this option for users, but enable it for admin and moderators, just open Viewkarma.php and add after global $db_prefix, $context, $scripturl, $modSettings, $txt; and before loadTemplate('Viewkarma'); this code:

//You can't view karmalog if you are !mod
if (!allowedTo('moderate_forum'))
fatal_lang_error('smf63', false);

Do U understand my English? =))

L0relei

#28
It does'nt work if there is a waiting time. It works only the first time a user modifies the karma of another one after installation. After that, there's always an error about the waiting time between two votes, even if the time is over. So I have to clear the log...


I think that I 've found the reason but I don't know how to solve that :

The mod deletes this part of the code of Karma.php :
// Delete any older items from the log. (karmaWaitTime is by hour.)
db_query("
DELETE FROM {$db_prefix}log_karma
WHERE " . time() . " - logTime > " . (int) ($modSettings['karmaWaitTime'] * 3600), __FILE__, __LINE__);


That's why this code is never executed because the condition is never true if there is a waiting time :
{ if ( empty($action) || empty($modSettings['karmaWaitTime']))
        { $_POST['Description'] = AddSlashes($_POST['Description']);
                // Put it in the log.
                db_query("
                        INSERT INTO {$db_prefix}log_karma
                                (action, ID_TARGET, Description, ID_EXECUTOR, logTime)
                        VALUES ($dir, $_REQUEST[uid], '$_POST[Description]', $ID_MEMBER, ". time()." )
                        ", __FILE__, __LINE__);
// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+'));
}



Do you have any solution please ?


PS : Sorry for my English, I'm French
Just Lo` It

Kindred

my solution in the karma=log mod (for admins only) was to make a second table in the database to handle the karam logging....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

wickedtaz

This in my opinion, has to be one of the best Mods to date.

I am getting an overwhelming amount of compliments.

I have had a lot of ratings abuse in my forum, and this was
definitely the answer.

I am though getting requests to have sort options. I will
look into coding this, but I just thought I would let you know.

BTW I have a busy board with over 40,000 members, and
runs seamlessly.

THANK YOU!


discojo

Invaluable mod for my board....however, the option to sort is also invaluable. I really hope I see a fix for that soon!

Grek.Kamchatka

I try to fix all bugs, and add a sort function in next version.

Grek.Kamchatka

Do you need a link to the profile on users name?

discojo

I think that would be great! Thank you for working on it - I don't know what I'd do without all the nice people who share mods for us coding-challanged.  :D

anniewayz

doesn't support rc 1 yet eh?

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

PopLife

Are there any plans to make only the Karma descriptions received viewable to the user (and admins and mods)?

Grek.Kamchatka

I made a new version of this mod. It will be compatible with 1.1 RC1. I'm adding a sort option. If you want, you can use a user names as a link to their profile. And i think i can do a choise of who can see a log, only admin and mod's or admin, mod's and users.

PopLife

I was trying to ask (please excuse my not-making-senseness) if you will make users only be able to see their own Karma messages, not every other user's.

anniewayz


Advertisement: