-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
davydovct
committed
Oct 1, 2018
1 parent
de2d855
commit 3ca5ed8
Showing
19 changed files
with
737 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: php | ||
php: | ||
- 5.6 | ||
- 7.0 | ||
script: phpunit --configuration tests/phpunit.xml --coverage-text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
/** | ||
* CleanTalk SMF mod | ||
* | ||
* @package Cleantalk | ||
* @subpackage SMF | ||
* @author CleanTalk ([email protected]) | ||
* @copyright (C) 2014 Сleantalk team (http://cleantalk.org) | ||
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html | ||
*/ | ||
|
||
if (!defined('SMF')) { | ||
die('Hacking attempt...'); | ||
} | ||
|
||
/** | ||
* Add CleanTalk mod admin area | ||
* @param $admin_areas | ||
*/ | ||
function cleantalk_admin_area(&$admin_areas) | ||
{ | ||
global $txt; | ||
|
||
$admin_areas['config']['areas']['modsettings']['subsections']['cleantalk'] = array($txt['cleantalk_name']); | ||
} | ||
|
||
/** | ||
* Add CleanTalk mod admin action | ||
* @param $subActions | ||
*/ | ||
function cleantalk_admin_action(&$subActions) | ||
{ | ||
$subActions['cleantalk'] = 'cleantalk_general_mod_settings'; | ||
} | ||
|
||
/** | ||
* Add CleanTalk mod settings area | ||
* @param bool $return_config | ||
* @return array | ||
*/ | ||
function cleantalk_general_mod_settings($return_config = false) | ||
{ | ||
global $txt, $scripturl, $context, $boardurl; | ||
|
||
$context['page_title'] = $txt['cleantalk_settings']; | ||
$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=cleantalk'; | ||
|
||
$config_vars = array( | ||
array('title', 'cleantalk_settings'), | ||
array('text', 'cleantalk_api_key'), | ||
array('check', 'cleantalk_first_post_checking', 'subtext' => $txt['cleantalk_first_post_checking_postinput']), | ||
array('check', 'cleantalk_logging', 'subtext' => sprintf($txt['cleantalk_logging_postinput'], $boardurl)), | ||
array('check', 'cleantalk_email_notifications', 'subtext' => $txt['cleantalk_email_notifications']), | ||
array('check', 'cleantalk_ccf_checking', 'subtext' => $txt['cleantalk_ccf_checking_postinput']), | ||
array('check', 'cleantalk_tell_others', 'subtext' => $txt['cleantalk_tell_others_postinput']), | ||
array('check', 'cleantalk_sfw', 'subtext' => $txt['cleantalk_sfw_postinput']), | ||
array('desc', 'cleantalk_api_key_description'), | ||
array('desc', 'cleantalk_check_users'), | ||
); | ||
|
||
if ($return_config) { | ||
return $config_vars; | ||
} | ||
|
||
if (isset($_GET['save'])) { | ||
checkSession(); | ||
saveDBSettings($config_vars); | ||
redirectexit('action=admin;area=modsettings;sa=cleantalk'); | ||
} | ||
|
||
prepareDBSettingContext($config_vars); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.