Editors xtd #871
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#871
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "editors_xtd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
please ignore this commite: c37dfc0
i wanted to only send this commite : d57f35f
But I made a small mistake in sending commit
Listen I am the worse lead developer ever... (I mean I am difficult to work with... find fault with everything) if you make a PR where I need to workout what your trying to do from a title and a bunch of commit messages then your never going to get my support.
There is just one developer in JCB at this time that can change many files and don't need to explain every change, and unfortunately that is me, since I am the owner and already proven that I can be trusted.
So other developers need to make every change a commit that is explanatory of the expected change.
Yes I can read the code, and it looks okay to me at first glance... but I don't have much time to research it, since then I can just as well done it my self. That means it is better to have more commits documenting every change and making it easy form me to see what your are doing. Then on opening a pull request there is a template:
You must use these to explain in simple terms the overall idea of your changes, so that those who do not have advance knowledge of the core compiler would understand what your trying to do.
So please do us the favor and update the description of this PR with these details so that other developers like @ohrionmartin and @ohrionmartin or @ro-ot can easy understand and test this PR.
@saman222 any feedback on my previous request?
Hi @Llewellynvdm , I hope you are well.
To create a plugin from the editors-xtd group (add a button to the editor), I went to the jcb plugin section and went through the steps of creating this plugin. After compiling, installing and activating that plugin, I went to the Joomla article creation page to see the result. To see if the button I wanted was added to that page's editor or not, I got an error (syntax error, unexpected '-', expecting '{') which is actually a syntax error and may not be a direct JCB bug . After searching, I realized that the name of the main class of Joomla editors-xtd plugins should be "plgButtonPluginName" instead of "plgEditors-xtdPluginName"
Summary of Changes
In the setJoomlaPlugin function in the Get class (/public_html/administrator/components/com_componentbuilder/helpers/compiler/a_Get.php path), almost on line 10152, the name of the plugin class is created. I put the creation of the plugin class name in a function called createPluginClassName in the path (/administrator/components/com_componentbuilder/helpers/componentbuilder.php) which checks if the plugin group was editors-xtd to name the class as "plgButtonPluginName"
Testing Instructions
Making a plugin with the editors-xtd group
Expected result
Build a plugin with the editors-xtd group and the class name "plgButtonPluginName"
Actual result
Build a plugin with the editors-xtd group and the class name "plgEditors-xtdPluginName" and error
Okay so I have been working on moving things to library classes, basically moving to J4 we need namespacing everywhere... so I am starting with the basics first, and just for JCB at this time, it will not yet effect other components build with JCB.
So I will manually add these Plugin naming method to its own utilities class and I should be pushing this up soon. So thanks @saman222 for the code I will use it... keep a lookout to the new way we are going... the place to watch is going to be in libraries folder.
So here is the code I used... check the format of the braces and the order of the function variables.
I just refactored it a little more, this is how it will look like
I will close this PR now... @saman222 see you around in the next PR 👍
Pull request closed