Release 2017.09.03 (read the plg for notes)
parent
8a4350baf3
commit
fca1c08758
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,8 +2,8 @@
|
|||
<!DOCTYPE PLUGIN [
|
||||
<!ENTITY name "community.applications">
|
||||
<!ENTITY author "Andrew Zawadzki">
|
||||
<!ENTITY version "2017.08.24">
|
||||
<!ENTITY md5 "8f853aebf7c5f690699bd1e710a66e13">
|
||||
<!ENTITY version "2017.09.03">
|
||||
<!ENTITY md5 "4243c60f9819aaf33955ee4b7e37291b">
|
||||
<!ENTITY launch "Settings/PluginSettings">
|
||||
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
|
||||
<!ENTITY github "Squidly271/community.applications">
|
||||
|
@ -13,6 +13,13 @@
|
|||
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;">
|
||||
|
||||
<CHANGES>
|
||||
###2017.09.03
|
||||
- Limit display width to 1920 pixels in accordance with 6.4RC8Q
|
||||
- Only display legacy mode option for developers or in case of appfeed download errors
|
||||
- Changed: In case of appfeed download failure, only display errors for CA developers
|
||||
- Under certain circumstances app of the day could display blacklisted or incompatible applications
|
||||
- Minor CSS styling changes
|
||||
|
||||
###2017.08.24
|
||||
- Improvements to dockerHub conversions
|
||||
|
||||
|
|
|
@ -150,13 +150,8 @@ $(function(){
|
|||
return false;
|
||||
});
|
||||
|
||||
<?if ($tabbed):?>
|
||||
$('.tabs').append("<span id='searchFilter' class='status vhshift' style='display:none'><input type='text' id='searchBox' class='narrow' placeholder='Search' style='margin-left:10px;margin-right:0' autofocus><button class='searchSubmit' style='margin-right:10px' onclick='doSearch(true)'><i id='searchButton' class='fa fa-search fa-lg'></i></button><input class='ca_staticTips' type='button' id='updateButton' value='Legacy Mode' title='Switches CA to Legacy Mode (until the next appfeed update) - Not generally recommended' onclick='forceUpdateButton()' disabled><?if ( $toolTipsterAllowed == "false"):?><input type='button' value='CA Modules' onclick='caModules();'></span><?endif;?>");
|
||||
for (var x=1; x<last; x++) $('#tab'+x).bind({click:function(){$('#searchFilter').hide();}});
|
||||
$('#tab'+last).bind({click:function(){$('#searchFilter').show();readMore();}});
|
||||
<?else:?>
|
||||
$('div[id=title]').last().append("<span id='searchFilter' class='status vhshift'><input type='text' id='searchBox' class='narrow' placeholder='Search' style='margin-left:10px;margin-right:0' autofocus><button class='searchSubmit' style='margin-right:10px' onclick='doSearch(true)'><i id='searchButton' class='fa fa-search fa-lg'></i></button><input class='ca_staticTips' type='button' id='updateButton' value='Legacy Mode' title='Switches CA to Legacy Mode (until the next appfeed update) - Not generally recommended' onclick='forceUpdateButton()' disabled><?if ( $toolTipsterAllowed == "false"):?><input type='button' value='CA Modules' onclick='caModules();'><?endif;?>");
|
||||
<?endif;?>
|
||||
$('div[id=title]').last().append("<span id='searchFilter' class='status' style='margin-top:-10px;'><input type='text' id='searchBox' class='narrow' placeholder='Search' style='margin-left:10px;margin-right:0' autofocus><button class='searchSubmit' style='margin-right:10px' onclick='doSearch(true)'><i id='searchButton' class='fa fa-search fa-lg'></i></button>");
|
||||
|
||||
if ( "<?=$firstRun?>" == "true" ) { $("#appWarning").show(); }
|
||||
$("#maxPerPage").val("<?=$cfg['maxPerPage']?>");
|
||||
|
||||
|
@ -534,7 +529,7 @@ function changePage(pageNumber) {
|
|||
}
|
||||
|
||||
function getWindowWidth() {
|
||||
return $(window).width();
|
||||
return $('.tabs').width();
|
||||
}
|
||||
|
||||
function myAlert(description,textdescription,textimage,imagesize, outsideClick, showCancel, showConfirm, alertType) {
|
||||
|
@ -647,7 +642,7 @@ function forceUpdate() {
|
|||
}
|
||||
|
||||
function forceUpdateButton() {
|
||||
var mode = $('#updateButton').val();
|
||||
var mode = $('#updateButton').html();
|
||||
if ( mode == 'appFeed Mode' ) {
|
||||
$.post(URL,{action:'force_update_button'},function(data) {
|
||||
if (data) {
|
||||
|
@ -1340,7 +1335,7 @@ function resizeDisplay() {
|
|||
<div id='appWarning' style='display:none'><center><img src='https://raw.githubusercontent.com/Squidly271/community.applications/master/webImages/Warning2.png' height='50px' width='50px'><br>
|
||||
<font size='2' color='red'>Note: All Applications listed here are 3rd party additions to unRaid.<br>Neither the authors of Community Applications nor Limetech make any warranty as to the suitability of any applications listed herein</font>
|
||||
<br><input type='button' value='Dismiss Warning' onclick='dismissWarning();'></input></center></div>
|
||||
<span style='float:right;'><a class='ca_staticTips' title='Display The CA Manual' href="Settings/caHelp" target='_blank'>CA Manual</a> <a class='ca_stats' title='Gathering Statistics' style='cursor:pointer;'>Statistics</a> <a class='ca_credits' style='cursor:pointer'>Credits</a></span>
|
||||
<span style='float:right;'><a class='ca_staticTips' title='Display The CA Manual' href="Settings/caHelp" target='_blank'>CA Manual</a> <a class='ca_stats' title='Gathering Statistics' style='cursor:pointer;'>Statistics</a> <a class='ca_credits' style='cursor:pointer'>Credits</a> <a id='updateButton' onclick='forceUpdateButton();' style='cursor:pointer;display:none;'>Legacy Mode</a></span>
|
||||
<br>
|
||||
> For help with this plugin, click here (a new tab will open with the help file) <strong><font size="2"><a href="Settings/caHelp" target="_blank">HELP</a></font></strong><br>
|
||||
> <img src='/plugins/community.applications/images/SectionIcon.png' height='50px'> - This chooses which "section" to display (Available Apps, Installed Apps, Previously Installed Apps, Pinned Apps, additional CA Modules<br>
|
||||
|
|
|
@ -117,6 +117,13 @@ Enable additional search results from dockerHub?
|
|||
|
||||
> This setting enables CA to retrieve additional search results from dockerHub. Note that docker must be enabled for this to be operational
|
||||
|
||||
<strong>Advanced</strong>
|
||||
|
||||
Enable Template Developer Mode?
|
||||
: <select name='maintainer' size='1'>
|
||||
<?=mk_option($cfg['maintainer'],"no","No (Default)")?>
|
||||
<?=mk_option($cfg['maintainer'],"yes","Yes")?>
|
||||
</select>
|
||||
|
||||
|
||||
: <input type="submit" name="#apply" value="Apply" id='Apply'><input type="button" id="DONE" value="Done" onclick="done()">
|
||||
|
|
|
@ -76,7 +76,7 @@ if ( !is_dir($communityPaths['templates-community']) ) {
|
|||
function DownloadCommunityTemplates() {
|
||||
global $communityPaths, $infoFile, $plugin, $communitySettings, $statistics;
|
||||
|
||||
$betaComment = "<font color='purple'>The author of this template has designated it to be a beta. You may experience issues with this application</font>";
|
||||
$betaComment = "The author of this template has designated it to be a beta. You may experience issues with this application";
|
||||
$moderation = readJsonFile($communityPaths['moderation']);
|
||||
if ( ! is_array($moderation) ) { $moderation = array(); }
|
||||
|
||||
|
@ -223,7 +223,7 @@ function DownloadCommunityTemplates() {
|
|||
function DownloadApplicationFeed() {
|
||||
global $communityPaths, $infoFile, $plugin, $communitySettings, $statistics;
|
||||
|
||||
$betaComment = "<font color='purple'>The author of this template has designated it to be a beta. You may experience issues with this application</font>";
|
||||
$betaComment = "The author of this template has designated it to be a beta. You may experience issues with this application";
|
||||
$moderation = readJsonFile($communityPaths['moderation']);
|
||||
if ( ! is_array($moderation) ) {
|
||||
$moderation = array();
|
||||
|
@ -575,7 +575,7 @@ function my_display_apps($viewMode,$file,$pageNumber=1,$officialFlag=false,$sele
|
|||
if ( $template['Deprecated'] ) {
|
||||
$template['ModeratorComment'] .= "<br>This application has been deprecated.";
|
||||
}
|
||||
$template['display_ModeratorComment'] .= $template['ModeratorComment'] ? "</b></strong><font color='red'><b>Moderator Comments:</b></font> ".$template['ModeratorComment'] : "";
|
||||
$template['display_ModeratorComment'] .= $template['ModeratorComment'] ? "</b></strong><font color='red'><b>Moderator Comments:</b></font> <font color='purple'>".$template['ModeratorComment']."</font>" : "";
|
||||
$tempLogo = $template['Logo'] ? "<img src='".$template['Logo']."' height=20px>" : "";
|
||||
$template['display_Announcement'] = $template['Forum'] ? "<a class='ca_tooltip' href='".$template['Forum']."' target='_blank' title='Click to go to the repository Announcement thread' >$RepoName $tempLogo</a>" : "$RepoName $tempLogo";
|
||||
$template['display_Stars'] = $template['stars'] ? "<img src='/plugins/$plugin/images/red-star.png' style='height:15px;width:15px'> <strong>".$template['stars']."</strong>" : "";
|
||||
|
@ -781,6 +781,18 @@ function appOfDay($file) {
|
|||
$currentDay = intval(time() / 86400);
|
||||
if ( $oldAppDay == $currentDay ) {
|
||||
$app = readJsonFile($communityPaths['appOfTheDay']);
|
||||
if ( is_array($app) ) { # test to see if existing apps of day have been moderated / blacklisted, etc.
|
||||
$flag = false;
|
||||
foreach ($app as $testApp) {
|
||||
if ( ! checkRandomApp($testApp,$file) ) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( $flag ) {
|
||||
unset($app);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( count($app) < 9 ) { unset($app); } # For update from old version where only 2 possible apps of day
|
||||
if ( ! $app ) {
|
||||
|
@ -1012,15 +1024,24 @@ case 'get_content':
|
|||
if ( $communitySettings['appFeed'] == "true" ) {
|
||||
DownloadApplicationFeed();
|
||||
if (!file_exists($infoFile)) {
|
||||
@unlink($communityPaths['LegacyMode']);
|
||||
# $communitySettings['appFeed'] = "false"; # Do Not automatically revert. Toss up a message instead
|
||||
echo "<center><font size='3'><strong>Download of appfeed failed.</strong></font><br><br>Community Applications <em><b>requires</b></em> your server to have internet access. The most common cause of this failure is a failure to resolve DNS addresses. You can try and reset your modem and router to fix this issue, or set static DNS addresses (Settings - Network Settings) of <b>8.8.8.8 and 8.8.4.4</b> and try again.<br><br>Alternatively, there is also a chance that the server handling the application feed is temporarily down. Switching CA to operate in <em>Legacy Mode</em> might temporarily allow you to still utilize CA.<br>";
|
||||
exec("curl --compressed --max-time 60 --insecure --location -o ".$communityPaths['tempFiles']."/failedOutput ".$communityPaths['application-feed'],$out);
|
||||
foreach ($out as $line) {
|
||||
echo "<tt>$line<br>";
|
||||
echo caGetMode();
|
||||
echo "<script>$('#updateButton').show();</script>";
|
||||
if ( is_file($communityPaths['CAdeveloper']) ) {
|
||||
exec("curl --compressed --max-time 60 --insecure --location -o ".$communityPaths['tempFiles']."/failedOutput ".$communityPaths['application-feed'],$out);
|
||||
echo "<br><br>Developer Mode Enabled:<br>";
|
||||
foreach ($out as $line) {
|
||||
echo "<tt>$line<br>";
|
||||
}
|
||||
echo "<br><br>Appfeed Contents:<br>";
|
||||
$out = @file_get_contents($communityPaths['tempFiles']."/failedOutput");
|
||||
$out = str_replace("\n","<br>",$out);
|
||||
echo "<tt>$out</tt>";
|
||||
} else {
|
||||
echo "<br><br>Note: Developer Mode Not Enabled<br><br>";
|
||||
}
|
||||
$out = @file_get_contents($communityPaths['tempFiles']."/failedOutput");
|
||||
$out = str_replace("\n","<br>",$out);
|
||||
echo "<tt>$out</tt>";
|
||||
@unlink($infoFile);
|
||||
}
|
||||
}
|
||||
|
@ -1196,6 +1217,7 @@ case 'force_update':
|
|||
$latestUpdate = readJsonFile($communityPaths['lastUpdated']);
|
||||
if ( ! $latestUpdate['last_updated_timestamp'] ) {
|
||||
$latestUpdate['last_updated_timestamp'] = INF;
|
||||
$badDownload = true;
|
||||
@unlink($communityPaths['lastUpdated']);
|
||||
}
|
||||
|
||||
|
@ -1203,7 +1225,9 @@ case 'force_update':
|
|||
if ( $latestUpdate['last_updated_timestamp'] != INF ) {
|
||||
copy($communityPaths['lastUpdated'],$communityPaths['lastUpdated-old']);
|
||||
}
|
||||
unlink($infoFile);
|
||||
if ( ! $badDownload ) {
|
||||
unlink($infoFile);
|
||||
}
|
||||
} else {
|
||||
moderateTemplates();
|
||||
}
|
||||
|
|
|
@ -545,10 +545,19 @@ function getSortOrder($sortArray) {
|
|||
# #
|
||||
#################################################
|
||||
function caGetMode() {
|
||||
global $communityPaths;
|
||||
global $communityPaths, $communitySettings;
|
||||
|
||||
$caMode = ( is_file($communityPaths['LegacyMode']) ) ? "appFeed Mode" : "Legacy Mode";
|
||||
return "<script>$('#updateButton').val('$caMode');</script>";
|
||||
if ( is_file($communityPaths['LegacyMode']) ) {
|
||||
$script = "$('#updateButton').html('appFeed Mode');";
|
||||
} else {
|
||||
$script = "$('#updateButton').html('Legacy Mode');";
|
||||
}
|
||||
if ( is_file($communityPaths['LegacyMode']) || ($communitySettings['maintainer'] == "yes") ) {
|
||||
$script .= "$('#updateButton').show();";
|
||||
} else {
|
||||
$script .= "$('#updateButton').hide();";
|
||||
}
|
||||
return "<script>$script</script>";
|
||||
}
|
||||
|
||||
################################################
|
||||
|
|
|
@ -58,6 +58,7 @@ $communityPaths['invalidXML_txt'] = $communityPaths['tempFiles'].
|
|||
$communityPaths['noSupport_txt'] = $communityPaths['tempFiles']."/nosupport.txt";
|
||||
$communityPaths['PluginInstallPending'] = $communityPaths['tempFiles']."/plugininstallpending.txt";
|
||||
$communityPaths['warningAccepted'] = "/boot/config/plugins/community.applications/accepted";
|
||||
$communityPaths['CAdeveloper'] = "/boot/config/plugins/community.applications/developer";
|
||||
|
||||
$communityPaths['newFlag'] = $communityPaths['tempFiles']."/newFlag"; # flag file to indicate that the "New" Category is being displayed
|
||||
|
||||
|
|
Loading…
Reference in New Issue