dmacias Posted December 1, 2014 Share Posted December 1, 2014 LOL. The included filetree.js is already modded to allow selection of file extensions, but any good ideas can be merged I modded it so a text input is populated with the path only. So if you just need a path location for something and not a file selection. You can use a '.' filter so you only get directories and then a directory function. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP. You also need an icons directory with a 16x16 image in lowercase matching the Title. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 LOL. The included filetree.js is already modded to allow selection of file extensions, but any good ideas can be merged I added these two lines: if(jQuery) (function($){ $.extend($.fn, { fileTree: function(o, h, directory) { // Defaults if( !o ) var o = {}; if( o.root == undefined ) o.root = '/'; if( o.filter == undefined) o.filter = ''; if( o.script == undefined ) o.script = 'jqueryFileTree.php'; if( o.folderEvent == undefined ) o.folderEvent = 'click'; if( o.expandSpeed == undefined ) o.expandSpeed= 500; if( o.collapseSpeed == undefined ) o.collapseSpeed= 500; if( o.expandEasing == undefined ) o.expandEasing = null; if( o.collapseEasing == undefined ) o.collapseEasing = null; if( o.multiFolder == undefined ) o.multiFolder = true; if( o.loadMessage == undefined ) o.loadMessage = 'Loading...'; $(this).each( function() { function showTree(c, t, f) { $©.addClass('wait'); $(".jqueryFileTree.start").remove(); $.post(o.script, { dir: t, filter: f }, function(data) { $©.find('.start').html(''); $©.removeClass('wait').append(data); if( o.root == t ) $©.find('UL:hidden').show(); else $©.find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing }); bindTree©; }); } function bindTree(t) { $(t).find('LI A').bind(o.folderEvent, function() { if( $(this).parent().hasClass('directory') ) { if( $(this).parent().hasClass('collapsed') ) { directory($(this).attr('rel')); // Expand if( !o.multiFolder ) { $(this).parent().parent().find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing }); $(this).parent().parent().find('LI.directory').removeClass('expanded').addClass('collapsed'); }... And added this to my page $('#storage_tree').fileTree({root:'/mnt/',filter:'.',script:'/plugins/dynamix.kvm.manager/classes/FileTree.php',multiFolder:false}, false, function(directory) {$('#storage_dir').val(directory);}); to get this Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. I know. I'm not sure why my plugin's image didn't show up there. I was just pointing it out that it could go in an images directory and it would. But my main point was if you don't have an 16x16 icon then there is a default icon in settings to the left of the Title instead of the apcupsd.png. It has to be apcups.png in the icons directory to match the Title. Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. I know. I'm not sure why my plugin's image didn't show up there. I was just pointing it out that it could go in an images directory and it would. But my main point was if you don't have an 16x16 icon then there is a default icon in settings to the left of the Title instead of the apcupsd.png. It has to be apcups.png in the icons directory to match the Title. It's actually not the title, but the name of the plugin. In the case of apcupsd, the name is 'apcupsd' so the icon needs to be 'apcupsd.png' for the plugin manager. <!DOCTYPE PLUGIN [ <!ENTITY name "apcupsd"> <---- this one <!ENTITY author "seeDrs/dlandon"> <!ENTITY version "2014.11.30"> <!ENTITY pluginURL "https://github.com/dlandon/unraid-snap/raw/master/Apcupsd-x86_64.plg"> <!ENTITY pkgversion "3.14.12"> ]> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;"> The application icon is specified in the 'apcupsd.page' file. Menu="OtherSettings" Icon="apcupsd.png" <------ application icon Version="2014.11.30" Author="seeDrs/dlandon" Title="APC UPS" --- <?PHP In this case the icons are both the same, but could be different if desired. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. I know. I'm not sure why my plugin's image didn't show up there. I was just pointing it out that it could go in an images directory and it would. But my main point was if you don't have an 16x16 icon then there is a default icon in settings to the left of the Title instead of the apcupsd.png. It has to be apcups.png in the icons directory to match the Title. It's actually not the title, but the name of the plugin. In the case of apcupsd, the name is 'apcupsd' so the icon needs to be 'apcupsd.png' for the plugin manager. <!DOCTYPE PLUGIN [ <!ENTITY name "apcupsd"> <---- this one <!ENTITY author "seeDrs/dlandon"> <!ENTITY version "2014.11.30"> <!ENTITY pluginURL "https://github.com/dlandon/unraid-snap/raw/master/Apcupsd-x86_64.plg"> <!ENTITY pkgversion "3.14.12"> ]> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;"> The application icon is specified in the 'apcupsd.page' file. Menu="OtherSettings" Icon="apcupsd.png" <------ application icon Version="2014.11.30" Author="seeDrs/dlandon" Title="APC UPS" --- <?PHP In this case the icons are both the same, but could be different if desired. No I get that. And maybe it's just if you have tabs enabled under display settings. But until I resized the apcupsd.png to 16x16 and renamed it to apcups.png and put it in an icons directory, the apcupsd settings page had a default image to the left of the title span "APC UPS" Quote Link to comment
bonienl Posted December 1, 2014 Share Posted December 1, 2014 It is a bit confusing, but the "Icon=<name>" refers to a 48x48 logo which resides in the "images" folder. <name> can be anything you like. The small icons in the title headers (tabs) are 16x16 icons, which reside in the "icons" folder. The file names to be used are the title header without spaces and all lowercase. And images/icons are in .png format ... Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 Is this my apcupsd plugin you are talking about? Here: http://lime-technology.com/forum/index.php?topic=34994.0 Quote Link to comment
bonienl Posted December 1, 2014 Share Posted December 1, 2014 Is this my apcupsd plugin you are talking about? Here: http://lime-technology.com/forum/index.php?topic=34994.0 No, I wasn't referring to any plugin specifically, it is meant as general knowledge. I am not using apcupsd myself, but if file locations in the .tgz file are as per v6 design, it should be all fine. Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. Quote Link to comment
peter_sm Posted December 1, 2014 Share Posted December 1, 2014 And images/icons are in .png format ... You can embedded the icon in the plugin , use base64 :-) //Peter Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 And images/icons are in .png format ... You can embedded the icon in the plugin , use base64 :-) //Peter But if you use a tarball method it's not necessary. For me it's easier to tar up your github and dump it in emhttp/plugins. Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. Ok. Now I get it. Not a problem to fix that. Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. How did you convert it to maintain the transparent background? I can't seem to get it. Or if you don't mind, send me the one you are using. Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. How did you convert it to maintain the transparent background? I can't seem to get it. Or if you don't mind, send me the one you are using. I just resized it with gimp in linux. It probably doesn't have a transparent background. I'm just using the black skin. But I'll paste it here if it does. It's hard to tell on my phone but here it is Quote Link to comment
dlandon Posted December 1, 2014 Author Share Posted December 1, 2014 Thanks. I struggle with these image files because Windows paint is so wimpy. I managed to get the 16 x 16 original that has the transparent background and I've updated apcupsd. Thanks for finding that for me. I didn't even catch that was an option. I guess the more I work with plugins, the more I learn. Quote Link to comment
jumperalex Posted December 1, 2014 Share Posted December 1, 2014 You know there is gimp for Windows right? Not try8ng to b3 checky, just letting you know there are free options available for Windows Quote Link to comment
dmacias Posted December 1, 2014 Share Posted December 1, 2014 You know there is gimp for Windows right? Not try8ng to b3 checky, just letting you know there are free options available for Windows That's good to know. I don't use windows much but if do I'll use gimp. That sounded like an interesting man meme. Maybe I'll make one with gimp. Thanks. I struggle with these image files because Windows paint is so wimpy. I managed to get the 16 x 16 original that has the transparent background and I've updated apcupsd. Thanks for finding that for me. I didn't even catch that was an option. I guess the more I work with plugins, the more I learn. Yeah Gimp is like Photoshop but free. I appreciate all your doing and I think this thread has been helpful. My comments before weren't really to point out acpupsd problems but to add to the topic of this thread and things I've notice that have changed. I had to spend a lot of time with css too. I feel for phaze and some who have just started moving to unraid 6 plg format. Quote Link to comment
switchman Posted December 1, 2014 Share Posted December 1, 2014 Paint.net is also a good free utility for windows. http://www.getpaint.net/index.html Quote Link to comment
PeterB Posted December 5, 2014 Share Posted December 5, 2014 The OP references a "Method='remove'" for a bash script file. What other Methods are available? If I want to use a bash script during the install, does it need to specify a Method? Quote Link to comment
dmacias Posted December 5, 2014 Share Posted December 5, 2014 The OP references a "Method='remove'" for a bash script file. What other Methods are available? If I want to use a bash script during the install, does it need to specify a Method? You can use method install but all other bash scripts are run during plg install. Quote Link to comment
dlandon Posted December 5, 2014 Author Share Posted December 5, 2014 Dynamix has a status indicator you can use to show the status of your process. Details are in the OP. I would encourage you to do this to be consistent with the way dynamix shows process status. Quote Link to comment
dmacias Posted December 5, 2014 Share Posted December 5, 2014 Dynamix has a status indicator you can use to show the status of your process. Details are in the OP. I would encourage you to do this to be consistent with the way dynamix shows process status. Thanks that's very useful. Another thing that's useful is the tabs. I've been helping Peter with his openvpn plugins. So instead of having everything on one page it's tabbed with settings and logs. It could be useful for your apcupsd to show full ups status in a separate tab. Or you could have 3 tabs with a main status page, settings page and full status page. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.