Skip to content

Commit

Permalink
Merge pull request #26 from WildcardSearch/minor
Browse files Browse the repository at this point in the history
2.1 Release
  • Loading branch information
Mark Vincent authored Jan 21, 2017
2 parents 492930b + 7ea9dd1 commit 2a6e343
Show file tree
Hide file tree
Showing 22 changed files with 1,115 additions and 1,146 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## YourCode 2.0.4
## YourCode 2.1
for MyBB 1.8.x

*Forget MyCode. Take control of YourCode-- a much better way of handling BB Code for MyBB forums*
Expand Down
37 changes: 37 additions & 0 deletions Upload/admin/jscripts/yourcode/yourcode_edit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* ACP edit functions
*
* @category MyBB Plugins
* @package YourCode
* @author Mark Vincent <admin@rantcentralforums.com>
* @copyright 2012-2014 Mark Vincent
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @link https://github.com/WildcardSearch/YourCode
* @since 2.1
*/

!function($) {
"use strict";

/**
* initialize
*
* @return void
*/
function init() {
$("#callback").change(callbackChange);
}

/**
* link the nestable and callback settings
*
* @return void
*/
function callbackChange() {
if (this.checked) {
$("#nestable").prop("checked", "checked");
}
}

$(init);
}(jQuery);
2 changes: 1 addition & 1 deletion Upload/admin/jscripts/yourcode/yourcode_inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ var YourCode = (function(yc) {
updateCheckCount();
}

$(document).ready(init);
$(init);

// the public method
yc.inline = {
Expand Down
6 changes: 3 additions & 3 deletions Upload/admin/jscripts/yourcode/yourcode_sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ var YourCode = (function(yc) {
/**
* constructor
*
* @param string the XMLHTTP url
* @param object the form elements
* @param string XMLHTTP url
* @param object form elements
* @return void
*/
function Sandbox(url, elements) {
Expand Down Expand Up @@ -63,7 +63,7 @@ var YourCode = (function(yc) {
(this.evalInput.prop("checked") ? '&eval=1' : '');

$.jGrowl("updating...");

$.ajax({
type: 'post',
url: this.url,
Expand Down
10 changes: 10 additions & 0 deletions Upload/inc/languages/english/admin/yourcode.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
$l['yourcode_exported'] = 'exported';
$l['yourcode_updated'] = 'updated';
$l['yourcode_created'] = 'created';
$l['yourcode_activated'] = 'activated';
$l['yourcode_deleted'] = 'deleted';
$l['yourcode_deactivated'] = 'deactivated';

// acp
$l['yourcode_admin_permissions_desc'] = 'Can use YourCode?';
Expand Down Expand Up @@ -99,13 +102,17 @@
$l['yourcode_multi_line_desc'] = 'In this mode, the caret (^) and dollar ($) match before and after newlines.';
$l['yourcode_eval'] = "eval()'d?";
$l['yourcode_eval_desc'] = "In this mode the replacement is eval()'d after it has been matched. (Set this option to 'No' unless you know what you are doing.)";
$l['yourcode_callback'] = "Callback?";
$l['yourcode_callback_desc'] = "In this mode the match is sent to the named PHP function";
$l['yourcode_active'] = 'Active';
$l['yourcode_active_desc'] = 'Should this YourCode be effective now?';
$l['yourcode_allowed_user_groups_use'] = 'Who can use this YourCode?';
$l['yourcode_allowed_user_groups_use_desc'] = "When users that aren't allowed attempt to use the YourCode it is blanked from their post before it is inserted.";
$l['yourcode_allowed_user_groups_view'] = 'Who can view this YourCode?';
$l['yourcode_allowed_user_groups_view_desc'] = "When users that aren't allowed view posts in which the YourCode is used an alternate replacement is used.";
$l['yourcode_all_user_groups'] = 'All User Groups';
$l['yourcode_save_and_continue'] = 'Save and Continue Editing';
$l['yourcode_save_and_return'] = 'Save and Return to Listing';

// tabs
$l['yourcode_tab_general'] = 'General';
Expand All @@ -116,7 +123,9 @@
// messages
$l['yourcode_message_success'] = '{1} {2} successfully';
$l['yourcode_message_fail'] = "{1} couldn't be {2} successfully";
$l['yourcode_message_fail_because'] = "{1} couldn't be {2} successfully because it was already {2}";
$l['yourcode_message_active_status'] = 'YourCode is currently {1}, click to {2}';
$l['yourcode_module_message_active_status'] = 'Module is currently {1}, click to {2}';

// import
$l['yourcode_import_select_file_desc'] = 'Use this form to import YourCode that was exported from this plugin.';
Expand All @@ -127,6 +136,7 @@
$l['yourcode_import_file_upload_error'] = 'There was a problem uploading the file.';
$l['yourcode_import_file_empty'] = 'The file you uploaded is empty or currupt.';
$l['yourcode_import_save_success'] = 'Successfully imported {1} YourCode.';
$l['yourcode_xml_count'] = '{1} total YourCode in XML';

$l['yourcode_delete_warning_clear'] = "Proceeding will result in all YourCode being deleted.\\nIt is recommended to backup first to avoid losing your work.\\nProceed?";
$l['yourcode_delete_warning_simple'] = 'Do you want to permanently delete this YourCode?';
Expand Down
12 changes: 5 additions & 7 deletions Upload/inc/plugins/yourcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@
*/

// disallow direct access to this file for security reasons
if(!defined('IN_MYBB'))
{
if (!defined('IN_MYBB')) {
die('Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.');
}

define('YOURCODE_MOD_URL', MYBB_ROOT. 'inc/plugins/yourcode/modules');
define('YOURCODE_VERSION', '2.1');
require_once MYBB_ROOT . 'inc/plugins/yourcode/functions.php';

// load the install/admin routines only if in ACP.
if(defined('IN_ADMINCP'))
{
if (defined('IN_ADMINCP')) {
require_once MYBB_ROOT . 'inc/plugins/yourcode/acp.php';
}
else
{
} else {
require_once MYBB_ROOT . 'inc/plugins/yourcode/forum.php';
}

Expand Down
Loading

0 comments on commit 2a6e343

Please sign in to comment.