Skip to content

Commit

Permalink
Merge pull request #348 from WildcardSearch/maintenance
Browse files Browse the repository at this point in the history
3.1.15 Release
  • Loading branch information
Mark Vincent authored Oct 13, 2018
2 parents 48c97b6 + 93c62b7 commit e94ec9c
Show file tree
Hide file tree
Showing 31 changed files with 1,431 additions and 1,348 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Advanced-Sidebox 3.1.14
## Advanced-Sidebox 3.1.15

<p align="center">
<img title="Advanced Sidebox Logo" alt="Advanced Sidebox Logo" src="http://i.imgur.com/4QWLq5V.png" />
Expand Down
25 changes: 23 additions & 2 deletions Upload/admin/jscripts/asb/asb_scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var ASB = (function(a, $) {
hooks: "hooks",
actions: "actions",
templates: "templates",
error_file_name_empty: "no file name",
error_file_does_not_exist: "file does not exist",
error_file_empty: "file empty or corrupted",
};

/**
Expand Down Expand Up @@ -120,12 +123,30 @@ var ASB = (function(a, $) {
* @return void
*/
function showResults(info) {
var $fileInfo = $("#file_info"),
errorMessage;

// hide all the spinners
$("div.ajax_spinners").hide();

// any response at all means something to show
if (!info) {
// check for errors
if (typeof info.error !== "undefined") {
switch (info.error) {
case 1:
errorMessage = lang.error_file_name_empty;
break;
case 3:
errorMessage = lang.error_file_empty;
break;
default:
errorMessage = lang.error_file_does_not_exist;
break;
}

$fileInfo.html(errorMessage);
return;
} else {
$fileInfo.html("")
}

/*
Expand Down
2 changes: 1 addition & 1 deletion Upload/admin/jscripts/asb/asb_scripts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Upload/admin/styles/default/asb/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,10 @@ td.off {
.asb_label a:active {
color: #333;
text-decoration: none;
}

#file_info {
color: red;
font-weight: bold;
margin-bottom: 5px;
}
3 changes: 3 additions & 0 deletions Upload/inc/languages/english/admin/asb.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,5 +365,8 @@
$l['asb_ajax_actions'] = 'actions';
$l['asb_ajax_hooks'] = 'hooks';
$l['asb_ajax_templates'] = 'templates';
$l['asb_ajax_file_name_empty'] = 'no file name';
$l['asb_ajax_file_does_not_exist'] = 'file does not exist';
$l['asb_ajax_file_empty'] = 'file empty or corrupted';

?>
1 change: 0 additions & 1 deletion Upload/inc/languages/english/admin/asb_addon.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
$l['asb_latest_threads_replies'] = 'Replies:';
$l['asb_latest_threads_views'] = 'Views:';
$l['asb_latest_threads_no_threads'] = 'There are no threads to display.';
$l['asb_latest_threads'] = 'Latest Threads';
$l['asb_gotounread'] = 'Go to first unread post';

// * settings
Expand Down
1 change: 0 additions & 1 deletion Upload/inc/languages/english/asb_addon.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
$l['asb_latest_threads_replies'] = 'Replies:';
$l['asb_latest_threads_views'] = 'Views:';
$l['asb_latest_threads_no_threads'] = 'There are no threads to display.';
$l['asb_latest_threads'] = 'Latest Threads';
$l['asb_gotounread'] = 'Go to first unread post';

// * settings
Expand Down
25 changes: 13 additions & 12 deletions Upload/inc/plugins/asb.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,32 @@

// for modules
define('IN_ASB', true);
define('ASB_MODULES_DIR', MYBB_ROOT . 'inc/plugins/asb/modules');
define('ASB_VERSION', '3.1.14');
define('ASB_MODULES_DIR', MYBB_ROOT.'inc/plugins/asb/modules');
define('ASB_VERSION', '3.1.15');
define('ASB_CUSTOM_VERSION', '2.0');
define('ASB_SCRIPT_VERSION', '2.0');

// register custom class autoloader
spl_autoload_register('asbClassAutoload');

// some basic functions used everywhere
require_once MYBB_ROOT . 'inc/plugins/asb/functions.php';
require_once MYBB_ROOT.'inc/plugins/asb/functions.php';

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

/**
* class autoloader
*
* @param string the name of the class to load
*/
function asbClassAutoload($className) {
$path = MYBB_ROOT . "inc/plugins/asb/classes/{$className}.php";
/**
* class autoloader
*
* @param string the name of the class to load
*/
function asbClassAutoload($className)
{
$path = MYBB_ROOT."inc/plugins/asb/classes/{$className}.php";

if (file_exists($path)) {
require_once $path;
Expand Down
Loading

0 comments on commit e94ec9c

Please sign in to comment.