Hoşgeldin Misafir

[MOD] Admin panelinden CrackerTracker Debug modu aç kapa

MiRaT

13 Kas 2017
2,077 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Kod:
##############################################################
## MOD Title: Activete CrackerTracker Debug Mode on Admin Panel
## MOD Author: butterflyT ~ http://www.**********.net
## MOD Description: Adds a button CrackerTracker confing page to make active or passive debug mode
## MOD Version: 0.1 Beta
## Installation Level: Easy
## Installation Time: 5
## Files to Edit: (5)
##                ctracker/engines/ct_security.php,
##                ctracker/admin/acp_module_settings.php,
##                language/lang_turkish/lang_cback_ctracker.php,
##                templates/subSilver/ctracker/acp/acp_settings.tpl
##                common.php
##                
## Included Files: N/A
##
########################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.**********.net for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.**********.net
##############################################################
## Author Notes:
## N/A
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#

INSERT INTO `phpbb_ctracker_config` VALUES ('debug_mode', '0');

#
#-----[ OPEN ]------------------------------------------
#
ctracker/engines/ct_security.php

#
#-----[ FIND ]------------------------------------------
#
define('CT_DEBUG_MODE', false);

#
#-----[ REPLACE WITH ]------------------------------------------
#
//define('CT_DEBUG_MODE', false);
//
$sql = "SELECT *
FROM " . CTRACKER_CONFIG . "
WHERE ct_config_name = 'debug_mode'" ;

if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}else{
      $row = $db->sql_fetchrow($result);
      $mode = $row['ct_config_value'];

      if ($mode)
      {
         define('CT_DEBUG_MODE', true);
         //echo "debug mode acik";
      }else{
         define('CT_DEBUG_MODE', false);
         //echo "debug mode kapali";
          }
     }
$db->sql_freeresult($result);
//

#
#-----[ OPEN ]------------------------------------------
#
ctracker/admin/acp_module_settings.php

#
#-----[ FIND ]------------------------------------------
#
/*
* Set correct configuration values
* We do this for each config value seperate - more code but safer handling
*/


#
#-----[ AFTER, ADD ]------------------------------------------
#

// 
$configuration['debug_mode']             = $adminclass->ct_generate_on_off($ctracker_config->settings['debug_mode']);
//

#
#-----[ FIND ]------------------------------------------
#

'L_CATNAME_8'  => $lang['ctracker_set_catname8'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Debug mode
      'L_CATNAME_9'  => $lang['ctracker_set_catname9'],
      //

#
#-----[ FIND ]------------------------------------------
#

'L_EXP_36'      => $lang['ctracker_settings_e36'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Debug mode
      'L_MOD_37'     => $lang['ctracker_settings_m37'],
      'L_EXP_37'      => $lang['ctracker_settings_e37'],
      //

#
#-----[ FIND ]------------------------------------------
#

'S_OUTPUT_36'  => $configuration['spam_keyword_det'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Debug mode
      'S_OUTPUT_37'  => $configuration['debug_mode'],
      //

#
#-----[ OPEN ]------------------------------------------
#

language/lang_turkish/lang_cback_ctracker.php

#
#-----[ FIND ]------------------------------------------
#

$lang['ctracker_settings_e36']

#
#-----[ AFTER, ADD ]------------------------------------------
#

//Debug mode
$lang['ctracker_set_catname9']            = 'Hata Ayıklama';
$lang['ctracker_settings_m37']            = 'Hata ayıklamayı - Debug mode - Aktifleştir ';
$lang['ctracker_settings_e37']            = 'Hata ayıklamayı aktif hale getirir. İşleminizi tamamladıktan sonra hata ayıklamayı pasifleştirmeyi unutmayınız.';
//

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/ctracker/acp/acp_settings.tpl

#
#-----[ FIND ]------------------------------------------
#

<h1>{L_CT_HEAD}</h1>
<p>{L_CT_EXPL}</p>

<br />

<form action="{S_FORM_ACTION}" method="post">

#
#-----[ AFTER, ADD ]------------------------------------------
#

<table width="100%" cellspacing="1" cellpadding="3" border="0" class="forumline">
   <tr> 
      <th colspan="3">{L_CATNAME_9}</th>
   </tr>
   <tr> 
      <td class="row3" width="20%" align="center">&nbsp;</td>
      <td class="row1" width="50%"><b>{L_MOD_37}</b><br />{L_EXP_37}</td>
      <td class="row1" width="30%"><select name="debug_mode">{S_OUTPUT_37}</select></td>
   </tr>
   </table>

<br />

#
#-----[ OPEN ]------------------------------------------
#

common.php

#
#-----[ FIND ]------------------------------------------
#

include($phpbb_root_path . 'ctracker/engines/ct_security.' . $phpEx);

#
#-----[ REPLACE WITH ]------------------------------------------
#

//include($phpbb_root_path . 'ctracker/engines/ct_security.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#
# In line 180-200

include($phpbb_root_path . '../config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
   header('********: ' . $phpbb_root_path . 'install/install.' . $phpEx);
   exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#
#

include($phpbb_root_path . 'ctracker/engines/ct_security.' . $phpEx);

#
#-----[ DELETE ]------------------------------------------
#

Delete all the lines that you found.

#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM