TinkerMan Posted September 16, 2021 Share Posted September 16, 2021 How would I go about removing icons and sections from the VistaPanel? For example, the Softaculous installer is in two spots, and webmail and the website builder is not longer supported. Check out the screenshot linked to see what I mean. Thanks! Screenshot: postimg.cc/hzYR05M6 Quote Link to comment Share on other sites More sharing options...
Mahtab Hassan Posted September 17, 2021 Share Posted September 17, 2021 7 hours ago, TinkerMan said: about you can't remove them but you can hide them using js Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted September 17, 2021 Author Share Posted September 17, 2021 (edited) How would I go abut doing that? (Sorry, but I am more HTML, CSS, PHP. I don't really know JS) Edited September 17, 2021 by TinkerMan Quote Link to comment Share on other sites More sharing options...
Wnew Posted April 29, 2022 Share Posted April 29, 2022 (edited) On 9/17/2021 at 3:10 PM, TinkerMan said: How would I go abut doing that? (Sorry, but I am more HTML, CSS, PHP. I don't really know JS) Hi @TinkerMan, i created a script for you: i can remove softacolous and email section but the sitebuilder i can't remove it. Just add in advert control this advert: <script> function changeStyle(){ var element = document.getElementById("soft_div-group"); element.style.display = "none"; } function changeStyle1(){ var element = document.getElementById("email-group"); element.style.display = "none"; } changeStyle1() changeStyle() </script> Edited May 3, 2022 by Wnew Quote Link to comment Share on other sites More sharing options...
PlanetCloud Posted April 29, 2022 Share Posted April 29, 2022 22 minutes ago, Wnew said: Hi @TinkerMan, i created a script for you: i can remove softacolous and email section but the sitebuilder i can't remove it. Just add in advert control this advert: <script> function changeStyle(){ var element = document.getElementById("soft_div-group"); element.style.display = "none"; } function changeStyle(){ var element = document.getElementById("email-group"); element.style.display = "none"; } </script> Hi, can't help but wonder won't the second function overrides the first and is this automatically called? Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted April 29, 2022 Author Share Posted April 29, 2022 Wow! I don’t even remember I made this topic Thanks for the code, but has it been tested? I don’t think it will work. Also, it is possible to remove the softaculous link from the panel. Quote Link to comment Share on other sites More sharing options...
PlanetCloud Posted April 30, 2022 Share Posted April 30, 2022 4 hours ago, TinkerMan said: Also, it is possible to remove the softaculous link from the panel. It is but why would you? Quote Link to comment Share on other sites More sharing options...
Bleep Bloop Posted April 30, 2022 Share Posted April 30, 2022 Wont CSS do the job? #email-group, #soft_div-group{ display:none; } Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted April 30, 2022 Author Share Posted April 30, 2022 Or… you can learn JavaScript. Hans is (rightfully so) strict on copyright. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted April 30, 2022 Author Share Posted April 30, 2022 2 hours ago, BastelPichi said: if youz change a few variables and remove one of the features, he cant do anything Technically correct, but still, not exactly ethical. Quote Link to comment Share on other sites More sharing options...
Wizacr Posted May 1, 2022 Share Posted May 1, 2022 (edited) <script> const r = [ 'item_sitereptile', 'icon-sitereptile', 'email-group', 'soft_div-group', 'email-drop-area' ]; window.addEventListener("load", function() { r.forEach(remove); }); function remove(item) { document.getElementById(item).style.display = "none"; } </script> This should take care of webmail and the website builder, you can add any further elements to the array that you'd like to remove. EDIT: Added an event listener to wait until page is complete before running. Edited May 1, 2022 by Wizacr Quote Link to comment Share on other sites More sharing options...
Bleep Bloop Posted May 1, 2022 Share Posted May 1, 2022 Awesome, is this tested? I would love to, but for gods sake, the advert section of mofh panel takes yrs to update on vPanel. Quote Link to comment Share on other sites More sharing options...
Wizacr Posted May 1, 2022 Share Posted May 1, 2022 1 minute ago, Bleep Bloop said: Awesome, is this tested? I would love to, but for gods sake, the advert section of mofh panel takes yrs to update on vPanel. It works, I recommend using the "bottom advert" box for these things. Quote Link to comment Share on other sites More sharing options...
Bleep Bloop Posted May 1, 2022 Share Posted May 1, 2022 Alright, thanks so much. Quote Link to comment Share on other sites More sharing options...
Wizacr Posted May 2, 2022 Share Posted May 2, 2022 10 hours ago, BastelPichi said: This is just css. No need for an event listener or js at all. https://www.w3schools.com/jsref/prop_style_display.asp CSS would be the preferred method, not sure why a JS solution was being sought after. I'll leave a CSS solution here for whomever wants it. <style> #item_sitereptile, #icon-sitereptile, #email-group, #soft_div-group, #email-drop-area { display: none; } </style> Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted May 2, 2022 Author Share Posted May 2, 2022 For removing the entire section, yes, I would think that would work. But if you just was to rewrite or remove parts of a section, you need JS. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted May 2, 2022 Author Share Posted May 2, 2022 Oh yeah, I forgot about that. CSS would almost be better then JS, as it is faster and cannot be blocked (As easily) by the browser, right? Quote Link to comment Share on other sites More sharing options...
Wizacr Posted May 3, 2022 Share Posted May 3, 2022 <script> remove = ["sitereptile"]; function find(k, a) { for (var i=0; i < a.length; i++) { for (var x=0; x < a[i].items.length; x++) { if (a[i].items[x].feature === k) { a[i].items[x] = undefined; if (a[i].items[x] === undefined) { a[i].items.splice(x, 1); } } } } } function remail(l) { for (var e=0; e < l.length; e++) { if (l[e].desc === 'Email') { l[e] = undefined; if (l[e] === undefined) { l.splice(e, 1); } } } } remove.forEach(item => find(item, PAGE.appGroups)); remail(PAGE.appGroups); </script> I think I understand what's needed here, this code should provide the desired functions. You can add the feature name in the "remove" array to remove any other individual icons. The second function "remail()" removes the entire email portion. This is tested to work. Quote Link to comment Share on other sites More sharing options...
Anyx Posted September 23, 2022 Share Posted September 23, 2022 (edited) Removing elements can also be covered by Element Changer now. A slight modification in @Wizacr's code to remove groups: <script> remove = ["Email"]; function find(k, a) { for (var i=0; i < a.length; i++) { if (a[i].desc === k) { a[i] = undefined; if (a[i] === undefined) { a.splice(i, 1); } } } } remove.forEach(item => find(item, PAGE.appGroups)); </script> Edited September 23, 2022 by Anyx Add remove groups code, and fix formatting. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted September 23, 2022 Author Share Posted September 23, 2022 Your about 4 months to late 😂 Hopefully that will help other though. Quote Link to comment Share on other sites More sharing options...
Anyx Posted September 23, 2022 Share Posted September 23, 2022 (edited) 9 minutes ago, TinkerMan said: Your about 4 months to late 😂 Hopefully that will help other though. I'm aware, xD. I wanted to edit the post with another addition, but posted it early. EDIT: It's there now. Edited September 23, 2022 by Anyx Quote Link to comment Share on other sites More sharing options...
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.