On Mon, May 26, 2014 at 1:38 PM, walid yaich <[email protected]> wrote: > Hi, > > When i finish this work i want to make an extension "*Installable with the > Extension Manager*". > > Main modifications i have made : > > - Changes on *historyinline.vm* to add a button Approve in order to > approve a revision and make it public. > - Modification on *contentview.vm* to get the revision value passed in > parameter from historyinline.vm and set the approved revision in the object > attached to the document. > - I added a *groovy > listener*<http://extensions.xwiki.org/xwiki/bin/view/Extension/Create+an+XObject+By+default+for+new+pages>to > add an object to new pages > - Adding a new > *class*<http://www.rendering.xwiki.org/xwiki/bin/viewrev/FAQ/How+to+implement+%22Approved+Revisions%22>to > contains the value of the approved revision > > > It's not finished yet, i have to make a clean and tested version of this > extension and make some documentations, but i want to know if i'm on the > right way to build an extension. > > An extension can override files like historyinline.vm ?
Not really. The problem is that in many cases XWiki itself does not have the right to touch theses files so we did not really bothered providing a system to do it. > if yes it won't work for futur version if XWIKI, right ? If it was possible yes there would also be the upgrade issue (without talking about the complexity of writing an extension that does the right modification on any version of this file). > otherwise what's the best way to > do so ? If you really need the behavior or this file to change one way that work with EM is to provide a wiki skin as part of your extension (a page with a XWiki.XWikiSkins object which override historyinline.vm and contentview.vm templates). But you have the same upgrade issue since you completely override those files with your own content. The best here would be to propose UI extensions point where you need to insert your customizations but it would only end up in next releases of XWiki. > > I can't find documentation about creating an installable Extension Manager. A valid extension has: * type JAR or XAR * an id (object editor) * an existing file associated to each version object (object editor) The easiest generally is to publish it in a Maven repository like the contrib one (see http://contrib.xwiki.org) and just import it from http://extensions.xwiki.org. > > What about licenses? i asked my boss and he told me that we can make this > public for free but i should mention the name of our company, and make > copyright (the name of our company) in new source files, is it possible ? http://extensions.xwiki.org does not support custom licenses yet. It should not be hard to add (since Extension Manager itself support it), just need someone to do it... > > > Thanks in advance :) > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

