Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow customizing HestiaCP with js/php #2747

Merged
merged 7 commits into from
Aug 30, 2022

Conversation

divinity76
Copy link
Member

@divinity76 divinity76 commented Jul 10, 2022

make a folder where everything that loads init.js will load additional .js/.php files, allowing people to customize their HestiaCP control panels.

I must admit, I have not studied the HestiaCP plugin system, and if it turns out that the plugin system is superior to this folder, please tell me about it :) I couldn't really find documentation on the plugin system

There's also the question about whether or not we actually want to make it easy for HestiaCP users to customize the panel. Personally I would appreciate it.

For example, recently on the Discord support channel, someone asked

User — Today at 7:51 PM
Is there an option to edit this part of the panel so that only Wordpress is left? because I only work on it 100% :)?
It would be clean and transparent 🙂 ❤️

and the answer was basically

Jaap Marcus — Today at 7:53 PM
No …
Raphael Schneeberger — Today at 7:53 PM
nope, currently not.
Krzysiek86 — Today at 7:54 PM
ok thanks, i understand
Jaap Marcus — Today at 7:57 PM
Delete: each one
https://github.com/hestiacp/hestiacp/tree/main/web/src/app/WebApp/Installers
except wordpresss But it will get reverteed each update
Krzysiek86 — Today at 8:09 PM
nice 😄
Jaap Marcus — Today at 8:10 PM
But will reverted at each upgrade

with the keyword being *will reverted at each upgrade*

if some version of this gets merged, the answer could instead be:

There is no official support to do it, but you can make a web/js/custom_scripts/only_wordpress.js

make a folder where everything that loads init.js will load additional .js/.php files, allowing people to customize their HestiaCP control panels.

I must admit, I have not studied the HestiaCP plugin system, and if it turns out that the plugin system is superior to this folder, please tell me about it :) I couldn't really find documentation on the plugin system
@jaapmarcus
Copy link
Member

Removed code tags as they break drone

Last code example

$(document).ready(function(){$("div.card:not(:contains(Wordpress))").remove();});

i think the only thing htmlentities did was to encode "+" characters, which isn't required when using RAWurlencode, and im not even sure it was actually required with normal urlencode.
@jaapmarcus
Copy link
Member

Ideally we should work to a system where we can use plugins and so on

@jaapmarcus jaapmarcus merged commit cfe36df into hestiacp:main Aug 30, 2022
jaapmarcus pushed a commit that referenced this pull request Aug 30, 2022
* allow customizing HestiaCP with js/php

make a folder where everything that loads init.js will load additional .js/.php files, allowing people to customize their HestiaCP control panels.

I must admit, I have not studied the HestiaCP plugin system, and if it turns out that the plugin system is superior to this folder, please tell me about it :) I couldn't really find documentation on the plugin system

* code-breaking typos

* make CI run again (CI is bugging out)

* simplify code

i think the only thing htmlentities did was to encode "+" characters, which isn't required when using RAWurlencode, and im not even sure it was actually required with normal urlencode.

* DirectoryIterator isn't static-callable

ick

* make CI run again (i think it's bugging out?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants