Karma Description Mod

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

Previous topic - Next topic

TrueSatan

If you switch to the SMF Default theme does the mod work properly? If it does then please review the edits you have made to make it work in your custom theme.

Dem0n

Quote from: TrueSatan on September 04, 2007, 04:23:24 AM
If you switch to the SMF Default theme does the mod work properly? If it does then please review the edits you have made to make it work in your custom theme.

I have made the edits on all themes, but this theme is giving me that specific error.

TrueSatan

Please query the theme developer on the topic for that theme.

Dem0n

Quote from: TrueSatan on September 04, 2007, 03:24:05 PM
Please query the theme developer on the topic for that theme.

Well if it is the MOD that is causing these issues with the boardindex file, shouldn't I query the mod author/mod topic for support? I would think so. :)

TrueSatan

You have chosen to use a theme that is causing problems that don't exist with other themes...the mod is only required to work with the SMF default theme in any case (this is true for all mods) and therefore if you want help in sorting out why that particular theme won't work when others will you'd best ask the theme developer...

Jade Elizabeth

#785
i accidentally installed the russian version...then uninstalled it...and now i get this message when trying to applaud and smite "Unable to load the 'main' template."
i installed the right one and it still says it

this mightent have happened if i knew which file i was supposed to download

how do i fix it please?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

TrueSatan

 Firstly did you pay any attention to the text shown on installation where it says "Don't forget to BACKUP, please."...it's there for a reason!

You appear to have so mangled your karma.php file in your source directory that you may be best uninstalling the mod, renaming your current karma.php to karma.phpold, copying the karma.php from the karma_bak directory to the source directory and seeing if that cures the problem...it may not.

If that doesn't work you may need to get a fresh copy of the karma.php file from the SMF installation package (download it if you don't already have it) and copy that to your source directory...if things then work properly do the backup this time, backup both your files and your database and install the mod again.

You should always backup files and database before installing or uninstalling any mods or themes.

If you use other mods that edited the karma.php file and you have to replace it with a fresh copy then the edits these mods made will have been lost and so you'll need to do them again manually.

Jade Elizabeth

Quote from: TrueSatan on September 09, 2007, 05:01:34 AM
Firstly did you pay any attention to the text shown on installation where it says "Don't forget to BACKUP, please."...it's there for a reason!
i did back it up. theres been alot of posts since then though, so im not too hot on restoring.
ill see what happens
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

okay....how do i view the log?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

TrueSatan

 Please note in my previous reply I advised that you not only back up your database but your files as well...your reply suggests that you ignored that advice.

Please look at the settings in your ACP...such matters as viewing the log will be obvious enough if you set it in such a way as to generate a log and then experiment with the mod....you would be best to test new, to you, mods in a test forum before deploying them to a live/production forum.


Jade Elizabeth

i did, i backed everything up.
and ran maintenance checks etc

im good now ;)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

bassbass

#792
It installed okay, i am using default theme in 1.1.3 version.  i tried to uninstall and got this error,

     "Execute Modification ./Sources/Karma.php Test failed"

I have the following Mods installed,

Mod Name Version 
1. SMF Staff Page 1.5.1   [ Uninstall ] [ List Files ] [ Delete ] 
2. Ad Managment 2.3   [ Uninstall ] [ List Files ] [ Delete ] 
3. Bookmarks 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
4. SMF Gallery Lite 1.8   [ Uninstall ] [ List Files ] [ Delete ] 
5. SMF Links 1.6.5   [ Uninstall ] [ List Files ] [ Delete ] 
6. Enhanced Quick Reply Box 2.0 2.0   [ Uninstall ] [ List Files ] [ Delete ] 
7. Karma Applaud Only 1.0.1   [ Uninstall ] [ List Files ] [ Delete ] 
8. Invite 1.14   [ Uninstall ] [ List Files ] [ Delete ] 
9. EmailFlash 2.0   [ Uninstall ] [ List Files ] [ Delete ] 
10. Advanced Visual Verification 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
11. Enhanced Calendar 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
12. Order News 1.0.1   [ Uninstall ] [ List Files ] [ Delete ] 
13. Popup PM Message - Uses The Same Window 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
14. Karma Description Mod 2.3   [ Uninstall ] [ List Files ] [ Delete ] 


what can i do to fix this?  thank in advance.

TrueSatan

Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531

http://www.simplemachines.org/community/index.php?topic=34526.0

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html

bassbass

#794
Thanks TrueSatan. now that i have been playing with for awhile i kinda like it, the only reason i thought of uninstalling it is because i couldn't automatically uninstall it, i thought maybe it will conflict with other mods.   I looked at the infoamation you suggested, and to uninstall it manullay look like byond my ability.   the only file that the tast faild was,

"Execute Modification ./Sources/Karma.php Test failed"

is there something i can change in the code of Karma.php to make it pass the test? here is current code,

<?php
/**********************************************************************************
* Karma.php                                                                       *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel ([email protected])                    *
* =============================================================================== *
* Software Version:           SMF 1.1                                             *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');

/* This file contains one humble function, which applauds or smites a user.

void ModifyKarma()
- gives or takes karma from a user.
- redirects back to the referrer afterward, whether by javascript or
  the passed parameters.
- requires the karma_edit permission, and that the user isn't a guest.
- depends on the karmaMode, karmaWaitTime, and karmaTimeRestrictAdmins
  settings.
- is accessed via ?action=modifykarma.
*/

function ModKarm()
{
        global 
$modSettings$db_prefix$txt$ID_MEMBER$user_info$topic$options$scripturl;

        
// If the mod is disabled, show an error.
        
if (empty($modSettings['karmaMode']))
                
fatal_lang_error('smf63');

        
// If you're a guest or can't do this, blow you off...
        
is_not_guest();
        
isAllowedTo('karma_edit');

        
checkSession('get');

        
// If you don't have enough posts, tough luck.
        // !!! Should this be dropped in favor of post group permissions?  Should this apply to the member you are smiting/applauding?
        
if ($user_info['posts'] < $modSettings['karmaMinPosts'])
                
fatal_error($txt['smf60'] . $modSettings['karmaMinPosts'] . '.');

        
// And you can't modify your own, punk! (use the profile if you need to.)
        
if (empty($_REQUEST['uid']) || (int) $_REQUEST['uid'] == $ID_MEMBER)
                
fatal_lang_error('smf61'false);

        
// The user ID _must_ be a number, no matter what.
        
$_REQUEST['uid'] = (int) $_REQUEST['uid'];

        
// Applauding or smiting?
        
$dir $_REQUEST['sa'] != 'applaud' ? -1;

        
// Users can change karma to only topic starter if you check this function
        
if (!empty($modSettings['karmatopicstarter']))
        {
        
$request db_query("
                        SELECT ID_MEMBER_STARTED
                        FROM 
{$db_prefix}topics
                        WHERE ID_TOPIC = 
$_REQUEST[topic]
                        LIMIT 1"
__FILE____LINE__);
        
$row mysql_fetch_row($request);
                
mysql_free_result($request);
        if (
$_REQUEST['uid'] != $row[0] && $user_info['is_admin']!=1)
              
fatal_lang_error('karma_not_topic_starter'false);
        }

        
//This users karma can't be changed
        
if (empty($modSettings['karmacantmodify'])) $modSettings['karmacantmodify']='';

             
$array_value explode (','$modSettings['karmacantmodify']);
             if (
in_array(($_REQUEST['uid']), $array_value))
                
fatal_lang_error('karma_cant_modify'false);

        
//This users can't changed karma to other users
        
if (empty($modSettings['karmacantmodify2'])) $modSettings['karmacantmodify2']='';

             
$array_value2 explode (','$modSettings['karmacantmodify2']);
             if (
in_array($ID_MEMBER$array_value2))
                
fatal_lang_error('karma_cant_modify2'false);

  // Start off with no change in karma.
        
$action 0;

        (!isset(
$modSettings['karmawhatwrite'])) ? $Description='' $Description=$modSettings['karmawhatwrite'];


          
// Not an administrator... or one who is restricted as well.
        
if (!empty($modSettings['karmaTimeRestrictAdmins']) || !allowedTo('moderate_forum'))
        {
                
// Find out if this user has done this recently...
                
$request db_query("
                        SELECT action
                        FROM 
{$db_prefix}log_karma
                        WHERE ID_TARGET = 
$_REQUEST[uid]
                                AND ID_EXECUTOR = 
$ID_MEMBER
                        LIMIT 1"
__FILE____LINE__);
                if (
mysql_num_rows($request) > 0)
                        list (
$action) = mysql_fetch_row($request);
                
mysql_free_result($request);
        }

        
// They haven't, not before now, anyhow.
        
if (empty($action) || empty($modSettings['karmaWaitTime']))
        {
                
//Prepare link
                    
if (isset ($_REQUEST['topic'])) {
                         
$link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);
                         
$link AddSlashes($link);
                         }
                elseif (isset(
$_REQUEST['f'])) {
                         
$link 'PM';
                         }

                
// Put it in the log.
                
db_query("
                        INSERT INTO 
{$db_prefix}log_karma
                                (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime)
                        VALUES (
$dir$_REQUEST[uid], '$Description', '$link', $ID_MEMBER, "time()." )
                        "
__FILE____LINE__);

                
// Change by one.
                
updateMemberData($_REQUEST['uid'], array($dir == 'karmaGood' 'karmaBad' => '+'));
        }
        else
        {       
$request db_query("
                                        SELECT logTime
                                        FROM 
{$db_prefix}log_karma
                                        WHERE ID_TARGET=
$_REQUEST[uid]
                                        AND ID_EXECUTOR=
$ID_MEMBER
                                        ORDER BY logTime DESC
                                        LIMIT 1
                                        "
__FILE____LINE__);
                
$row mysql_fetch_assoc($request);
                
mysql_free_result($request);

                
$restricttime time() - $row['logTime'];
                
$timelog = (int) ($modSettings['karmaWaitTime'] * 3600);

                
// If you are gonna try to repeat.... don't allow it.
                
if ($restricttime $timelog)
                        
fatal_error($txt['smf62'] . ' ' $modSettings['karmaWaitTime'] . ' ' $txt[578] . '.'false);

                
//Prepare link
                    
if (isset ($_REQUEST['topic'])) {
                         
$link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);
                         
$link AddSlashes($link);
                         }
                elseif (isset(
$_REQUEST['f'])) {
                         
$link 'PM';
                         }

                
// You decided to go back on your previous choice?
                
db_query("
                        INSERT INTO 
{$db_prefix}log_karma
                                (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime)
                        VALUES (
$dir$_REQUEST[uid], '$Description', '$link', $ID_MEMBER, "time()." )
                        "
__FILE____LINE__);

                
// It was recently changed the OTHER way... so... reverse it!
                
if ($dir == 1)
                        
updateMemberData($_REQUEST['uid'], array('karmaGood' => '+'));
                else
                        
updateMemberData($_REQUEST['uid'], array('karmaBad' => '+'));
        }

$request db_query("
SELECT value
FROM 
{$db_prefix}themes
WHERE variable='enable_notify'
AND ID_MEMBER=
$_REQUEST[uid]
"
__FILE____LINE__);
$row mysql_fetch_row($request);
mysql_free_result($request);

if (isset($modSettings['karmanotifier']) && !$user_info['is_guest'] && ($row['0'])==2)
        
{
        
$link=='PM' $url=$scripturl.'?action=pm' $url=$scripturl.'?topic='.$link;
     
if ($modSettings['karma_pm_send_link'])
if ($modSettings['karma_pm_send_changelink'])
{
$karma_pm_body $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'].$txt['karma_pm_send_changelink'].$url;
}
else
{
$karma_pm_body $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'];
}
else
$karma_pm_body $txt['karma_pm_body'];

db_query("
INSERT INTO 
{$db_prefix}personal_messages
(ID_MEMBER_FROM, deletedBySender, fromName, subject, body, msgtime)
VALUES (SUBSTRING('
$modSettings[karmaidmember]',1,255), '1', 'Admin', SUBSTRING('$txt[karma_pm_subject]', 1, 255), SUBSTRING('$karma_pm_body', 1, 65534), " time() . ")
"
__FILE____LINE__);

$ID_PM db_insert_id();
$ID_PM2 $_REQUEST['uid'];

db_query("
INSERT INTO 
{$db_prefix}pm_recipients
(ID_PM, ID_MEMBER)
VALUES (
$ID_PM$ID_PM2)"__FILE____LINE__);

db_query("
UPDATE 
{$db_prefix}log_karma
SET is_read=1
WHERE is_read=0
AND ID_TARGET=
$_REQUEST[uid]
"
__FILE____LINE__);

updateMemberData($_REQUEST['uid'], array('instantMessages' => '+''unreadMessages' => '+'));

}

        
// Figure out where to go back to.... the topic?
        
if (isset($topic))
                
redirectexit('topic=' $topic '.' $_REQUEST['start'] . '#msg' $_REQUEST['m']);
        
// Hrm... maybe a personal message?
        
elseif (isset($_REQUEST['f']))
                
redirectexit('action=pm;f=' $_REQUEST['f'] . ';start=' $_REQUEST['start'] . (isset($_REQUEST['l']) ? ';l=' $_REQUEST['l'] : '') . (isset($_REQUEST['pm']) ? '#' $_REQUEST['pm'] : ''));

          else
        {
                echo 
'
<html>
        <head>
                <title>...</title>
                <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                        history.go(-1);
                // ]'
,']></script>
        </head>
        <body>&laquo;</body>
</html>'
;

                
obExit(false);
        }
}


// Modify a user's karma.
function ModifyKarma()
{
global $modSettings$db_prefix$txt$ID_MEMBER$user_info$topic$scripturl;

// If the mod is disabled, show an error.
if (empty($modSettings['karmaMode']))
fatal_lang_error('smf63');

        if (!empty($modSettings['karmasurv']))
                
ModKarm();
// If you're a guest or can't do this, blow you off...
is_not_guest();
isAllowedTo('karma_edit');

checkSession('get');

// If you don't have enough posts, tough luck.
// !!! Should this be dropped in favor of post group permissions?  Should this apply to the member you are smiting/applauding?
if ($user_info['posts'] < $modSettings['karmaMinPosts'])
fatal_error($txt['smf60'] . $modSettings['karmaMinPosts'] . '.');

// And you can't modify your own, punk! (use the profile if you need to.)
if (empty($_REQUEST['uid']) || (int) $_REQUEST['uid'] == $ID_MEMBER)
fatal_lang_error('smf61'false);

// The user ID _must_ be a number, no matter what.

if($_REQUEST['sa'] == 'smite')
fatal_error('Sorry, that is an invalid operation!'false);
$_REQUEST['uid'] = (int) $_REQUEST['uid'];

// Applauding or smiting?
$dir $_REQUEST['sa'] != 'applaud' ? -1;
        
// Users can change karma to only topic starter if you check this function
        
if (!empty($modSettings['karmatopicstarter']))
        {
        
$request db_query("
                        SELECT ID_MEMBER_STARTED
                        FROM 
{$db_prefix}topics
                        WHERE ID_TOPIC = 
$_REQUEST[topic]
                        LIMIT 1"
__FILE____LINE__);
        
$row mysql_fetch_row($request);
                
mysql_free_result($request);
        if (
$_REQUEST['uid'] != $row[0] && $user_info['is_admin']!=1)
              
fatal_lang_error('karma_not_topic_starter'false);
        }


//Loading Template of Description
if (!empty($modSettings['karmadescmod'])){
        
loadTemplate('DescriptionKarma');}

        
//Prepare some variables
        
$context['page_title'] = $txt['viewkarma_title'];
        
$context['linktree'][] = array(
            
'url' => $scripturl '?action=modifykarma',
            
'name' => $txt['viewkarma_title'] );

        
//This users karma can't be changed
        
if (empty($modSettings['karmacantmodify'])) $modSettings['karmacantmodify']='';

             
$array_value explode (','$modSettings['karmacantmodify']);
             if (
in_array(($_REQUEST['uid']), $array_value))
                
fatal_lang_error('karma_cant_modify'false);

        
//This users can't changed karma to other users
        
if (empty($modSettings['karmacantmodify2'])) $modSettings['karmacantmodify2']='';

             
$array_value2 explode (','$modSettings['karmacantmodify2']);
             if (
in_array($ID_MEMBER$array_value2))
                
fatal_lang_error('karma_cant_modify2'false);

// Start off with no change in karma.
$action 0;

// Not an administrator... or one who is restricted as well.
if (!empty($modSettings['karmaTimeRestrictAdmins']) || !allowedTo('moderate_forum'))
{
// Find out if this user has done this recently...
$request db_query("
SELECT action
FROM 
{$db_prefix}log_karma
WHERE ID_TARGET = 
$_REQUEST[uid]
AND ID_EXECUTOR = 
$ID_MEMBER
LIMIT 1"
__FILE____LINE__);
if (mysql_num_rows($request) > 0)
list ($action) = mysql_fetch_row($request);
mysql_free_result($request);
}

// They haven't, not before now, anyhow.

/*
if (empty($action) || empty($modSettings['karmaWaitTime']))
{
// Put it in the log.
db_query("
REPLACE INTO {$db_prefix}log_karma
(action, ID_TARGET, ID_EXECUTOR, logTime)
VALUES ($dir, $_REQUEST[uid], $ID_MEMBER, " . time() . ')', __FILE__, __LINE__);

// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+'));
}
else
{
// If you are gonna try to repeat.... don't allow it.
if ($action == $dir)
fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false);

// You decided to go back on your previous choice?
db_query("
UPDATE {$db_prefix}log_karma
SET action = $dir, logTime = " . time() . "
WHERE ID_TARGET = $_REQUEST[uid]
AND ID_EXECUTOR = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);


*/
/* 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']);
          if (!empty(
$modSettings['karmacensor']))
          
censorText($_POST['Description']);
      
//Prepare link
    if (isset ($_REQUEST['topic'])) {
                         
$link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);
                         
$link AddSlashes($link);
                         }
                elseif (isset(
$_REQUEST['f'])) {
                         
$link 'PM';
                         }

// Put it in the log.
                
db_query("
                        INSERT INTO 
{$db_prefix}log_karma
                                (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime)
                        VALUES (
$dir$_REQUEST[uid], '$_POST[Description]', '$link', $ID_MEMBER, "time()." )
                        "
__FILE____LINE__);
// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 'karmaGood' 'karmaBad' => '+'));
}
else
{
$request db_query("
SELECT logTime
FROM 
{$db_prefix}log_karma
WHERE ID_TARGET=
$_REQUEST[uid]
AND ID_EXECUTOR=
$ID_MEMBER
ORDER BY logTime DESC
LIMIT 1
"
__FILE____LINE__);
$row mysql_fetch_assoc($request);
mysql_free_result($request);

$restricttime time() - $row['logTime'];
$timelog = (int) ($modSettings['karmaWaitTime'] * 3600);

// If you are gonna try to repeat.... don't allow it.
if ($restricttime $timelog)
fatal_error($txt['smf62'] . ' ' $modSettings['karmaWaitTime'] . ' ' $txt[578] . '.'false);

//Prepare link
    if (isset ($_REQUEST['topic'])) {
                         
$link = ($_REQUEST['topic']).'.msg'.($_REQUEST['m']).'#'.'msg'.($_REQUEST['m']);
                         
$link AddSlashes($link);
                         }
                elseif (isset(
$_REQUEST['f'])) {
                         
$link 'PM';
                         }

// You decided to go back on your previous choice?
db_query("
INSERT INTO 
{$db_prefix}log_karma
                                (action, ID_TARGET, Description, link, ID_EXECUTOR, logTime)
                        VALUES (
$dir$_REQUEST[uid], '$_POST[Description]', '$link', $ID_MEMBER, "time()." )
                        "
__FILE____LINE__);

// It was recently changed the OTHER way... so... reverse it!
if ($dir == 1)
updateMemberData($_REQUEST['uid'], array('karmaGood' => '+'));
else
updateMemberData($_REQUEST['uid'], array('karmaBad' => '+'));
}
}

$request db_query("
SELECT value
FROM 
{$db_prefix}themes
WHERE variable='enable_notify'
AND ID_MEMBER=
$_REQUEST[uid]
"
__FILE____LINE__);
$row mysql_fetch_row($request);
mysql_free_result($request);

if (isset($modSettings['karmanotifier']) && !$user_info['is_guest'] && ($row['0'])==2)
        
{
$link=='PM' $url=$scripturl.'?action=pm' $url=$scripturl.'?topic='.$link;


if ($modSettings['karma_pm_send_link'])
if ($modSettings['karma_pm_send_desc'])
{
$karma_pm_body_with $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'].$txt['karma_pm_send_desc2'].$_POST['Description'].$txt['karma_pm_send_changelink'].$url;
}
else
{
$karma_pm_body_with $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'].$txt['karma_pm_send_changelink'].$url;
}
else
if ($modSettings['karma_pm_send_desc'])
{
$karma_pm_body_with $txt['karma_pm_body'].$txt['karma_pm_send_desc2'].$_POST['Description'].$txt['karma_pm_send_changelink'].$url;
}
else
{
$karma_pm_body_with $txt['karma_pm_body'].$txt['karma_pm_send_changelink'].$url;
}

if ($modSettings['karma_pm_send_link'])
if ($modSettings['karma_pm_send_desc'])
{
$karma_pm_body_without $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'].$txt['karma_pm_send_desc2'].$_POST['Description'];
}
else
{
$karma_pm_body_without $txt['karma_pm_body'].$txt['karma_pm_body2'].$_REQUEST['uid'];
}
else
if ($modSettings['karma_pm_send_desc'])
{
$karma_pm_body_without $txt['karma_pm_body'].$txt['karma_pm_send_desc2'].$_POST['Description'];
}
else
{
$karma_pm_body_without $txt['karma_pm_body'];
}

$modSettings['karma_pm_send_changelink'] ? $karma_pm_body $karma_pm_body_with $karma_pm_body_without;
if (!$modSettings['karma_pm_send_changelink']) $karma_pm_body $karma_pm_body_without;

db_query("
INSERT INTO 
{$db_prefix}personal_messages
(ID_MEMBER_FROM, deletedBySender, fromName, subject, body, msgtime)
VALUES (SUBSTRING('
$modSettings[karmaidmember]',1,255), '1', 'Admin', SUBSTRING('$txt[karma_pm_subject]', 1, 255), SUBSTRING('$karma_pm_body', 1, 65534), " time() . ")
"
__FILE____LINE__);

$ID_PM db_insert_id();
$ID_PM2 $_REQUEST['uid'];

db_query("
INSERT INTO 
{$db_prefix}pm_recipients
(ID_PM, ID_MEMBER)
VALUES (
$ID_PM$ID_PM2)"__FILE____LINE__);

db_query("
UPDATE 
{$db_prefix}log_karma
SET is_read=1
WHERE is_read=0
AND ID_TARGET=
$_REQUEST[uid]
"
__FILE____LINE__);

updateMemberData($_REQUEST['uid'], array('instantMessages' => '+''unreadMessages' => '+'));

}
// Figure out where to go back to.... the topic?
if (isset($topic))
redirectexit('topic=' $topic '.' $_REQUEST['start'] . '#msg' $_REQUEST['m']);
// Hrm... maybe a personal message?
elseif (isset($_REQUEST['f']))
redirectexit('action=pm;f=' $_REQUEST['f'] . ';start=' $_REQUEST['start'] . (isset($_REQUEST['l']) ? ';l=' $_REQUEST['l'] : '') . (isset($_REQUEST['pm']) ? '#' $_REQUEST['pm'] : ''));
// JavaScript as a last resort.
/*

else
{
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>...</title>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
history.go(-1);
// ]]></script>
</head>
<body>&laquo;</body>
</html>';

obExit(false);
}
}

*/
// What's this?  I dunno, what are you talking about?  Never seen this before, nope.  No siree.
function BookOfUnknown()
{
global $context;

if (strpos($_GET['action'], 'mozilla') !== false && !$context['browser']['is_gecko'])
redirectexit('http://www.getfirefox.com/');
elseif (strpos($_GET['action'], 'mozilla') !== false)
redirectexit('about:mozilla');

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>The Book of Unknown, '
, @$_GET['verse'] == '2:18' '2:18' '4:16''</title>
<style type="text/css">
em
{
font-size: 1.3em;
line-height: 0;
}
</style>
</head>
<body style="background-color: #444455; color: white; font-style: italic; font-family: serif;">
<div style="margin-top: 12%; font-size: 1.1em; line-height: 1.4; text-align: center;">'
;
if (@$_GET['verse'] == '2:18')
echo '
Woe, it was that his name wasn\'t <em>known</em>, that he came in mystery, and was recognized by none.&nbsp;And it became to be in those days <em>something</em>.&nbsp; Something not yet <em id="unknown" name="[Unknown]">unknown</em> to mankind.&nbsp; And thus what was to be known the <em>secret project</em> began into its existence.&nbsp; Henceforth the opposition was only <em>weary</em> and <em>fearful</em>, for now their match was at arms against them.'
;
else
echo '
And it came to pass that the <em>unbelievers</em> dwindled in number and saw rise of many <em>proselytizers</em>, and the opposition found fear in the face of the <em>x</em> and the <em>j</em> while those who stood with the <em>something</em> grew stronger and came together.&nbsp; Still, this was only the <em>beginning</em>, and what lay in the future was <em id="unknown" name="[Unknown]">unknown</em> to all, even those on the right side.'
;
echo '
</div>
<div style="margin-top: 2ex; font-size: 2em; text-align: right;">'
;
if (@$_GET['verse'] == '2:18')
echo '
from <span style="font-family: Georgia, serif;"><strong><a href="http://www.unknownbrackets.com/about:unknown" style="color: white; text-decoration: none; cursor: text;">The Book of Unknown</a></strong>, 2:18</span>'
;
else
echo '
from <span style="font-family: Georgia, serif;"><strong><a href="http://www.unknownbrackets.com/about:unknown" style="color: white; text-decoration: none; cursor: text;">The Book of Unknown</a></strong>, 4:16</span>'
;
echo '
</div>
</body>
</html>'
;

obExit(false);
}

}

?>

TrueSatan

You really do need to learn how to do manual installations so I can't urge you strongly enough to study the links I gave you and to get your skills up to a level where you can do that.

This mod does its best to help you by making a backup file of the Karma.php that, if all went well, you should be able to use to overwrite the altered one so as to do a manual uninstall...those links I gave would have shown you that it was created and thus that reversing the process would have you overwrite the current file with the backup...ideally you would rename the current file to, say, Karma.phpold prior to copying in the backup file to replace it. The links would have shown you that the backup file is stored in Source directory in a directory called kdm_bak.

It really isn't that difficult but you do have to read through the process and pick up on what is happening.

bassbass


tambay_lang

How do I back up the Karma.php? where do I go? and what do I click?

Sorry.. Im really new to this.

anyone please. I'd like to try this mod.

TrueSatan

Karma.php is backed up automatically by the mod when you install it but the standard SMF advice applies too...always back up all your forum files and your database prior to installing or uninstalling any mod or theme.

You backup your forum files by using ftp and copying them to your local machine.

tambay_lang

thnks TS, anyone tried this mod with SoftDark theme by turklord? That's the theme we're using.

Advertisement: