How can I change & edit an addon's macro. for example some addon has a macro to show something or create a page or a template and I want to edit and customize a section or a part of that template or macro?
Thanks
It depends on how the app is built and where it's doing the work you want to change.
A typical app that provides a Confluence macro is a .jar file you add to your server. .jar files in general are really zipped up blocks of files that are suitable for java to use as an executable set of instructions and supporting resources.
For Atlassian apps, the files tend to be a mix of usable classes and resources which feed into displaying and rendering stuff - some javascript, css, jsp, etc, and quite often, velocity templates which are usually about displaying a macro when rendered (my first confluence app was 3 small classes and an over-engineered velocity template, as I found it easier to code for velocity than java at the time). These resources are plain text, but are effectively code (unlike the classes which are the results of compiled code)
So. If what you want to change is being done by templates or resources, you could unzip the app, hack the text files and re-zip the file, then re-deploy it over the top of the old one in your server.
But if the changes you want are done in the compiled code, you are not going to be able to do that (without a pile of reverse engineering)
None of that can be recommended at any point, what you really should do is get the source code for the app and recompile it properly after making your changes in the source. If you hack someone else's app, you could be breaching the terms of usage, you're certainly going to leave yourself unsupported with that app, and if it's one of the core Confluence apps, your entire Confluence system goes out of support (in all cases, keep the original .jar file handy - you can become supported again by deleting your version and putting the original back)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.