-
Notifications
You must be signed in to change notification settings - Fork 12
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
Idea for Joomla: Allow custom php scripts to be called in place of articles or modules #38
Comments
What would be the use case for such functionality? Joomla it self can be extended by php code all over the place as long as you are a "super user". |
Thanks for your reply. Here's a couple of common example use cases:
This isn't possible today in Joomla! without adding extensions. And those extensions are just designed to work from the HTML page in custom brackets {mycode}<php include_once("custom/script.inc.php")?>{/mycode} which could be accidentally accessed and messed up by editors. In the case of Jumi, messing up the code wasn't possible by someone editing an article. I hope I explained this enough, if not please let me know. |
Ok, so the easiest solution for you is to create a module or use the "custom module" already provided by joomla core and make a template layout for it. This allows you exactly what you like to do. Adding php directly in the text area is a no go for joomla and not needed since Joomla is already highly extendable. I'm closing this because there is no reason for this in Joomla. |
This is not the way, ideas are handled in the RFC area. Please stick to the bylaws. |
What about custom code to replace an article? |
How would it be more secure? Providing a way for any php found somewhere on the internet to run as a standalone script is by its very nature insecure. By its very nature allowing this will make your site insecure. |
It doesn't run as a standalone script. All scripts should include: |
No worries, I have commissioned someone to write a new version of Jumi for Joomla!4. Should be launched in JED soon. |
I still think that this is a missing core feature for Joomla! 4, but at least there's a free option that works well. https://extensions.joomla.org/extension/core-enhancements/outer-scripts/ |
I hope this is the right place to make proposals for new features? Hope so :)
IDEA: Allow custom php scripts to be run in place of an article or module.
There are several ways to add php scripts to an article or module using extensions, but they can present a potential security issue or create problems when site editors/managers accidentally edit the page and disrupt the embedded scripts.
Rather than having the scripts within HTML content, having the menu point directly at a script so that the custom script displays in place of the normal article or module content make this more secure and takes it out of the hands of editors.
Years ago there was an excellent and very simple extension called Jumi (https://code.google.com/archive/p/jumi) that allows the admin to point a menu straight at the php script or have a module that just points to the script. Building this into the core of Joomla! would strengthen the platform and allow developers to extend the use of Joomla! even further without having to add in any third party extensions.
The text was updated successfully, but these errors were encountered: