Hello Devs,
This is about implementing support for creating rendering macros by editing
wiki pages! The corresponding JIRA issue is
http://jira.xwiki.org/jira/browse/XWIKI-3213.
Introduction
------------
There are two main xwiki classes involved: XWiki.WikiMacro &
XWiki.WikiMacroParameter. Fields of these classes are as below:
XWiki.WikiMacro
|
|-> name (Name of the macro)
|
|-> description (Short description about the macro - for display purposes)
|
|-> content (Macro content, this is what will be executed when the macro is
invoked, can be any xwiki/2.0 content)
XWiki.WikiMacroParameter
|
|-> name (Name of the parameter)
|
|-> macro (Name of the macro to which this parameter applies to)
|
|-> description (Description of this macro parameter - for display purposes)
|
|-> mandatory (boolean value indicating if this parameter is mandatory)
So the basic idea is, when a user saves (or updates) a page containing an
Object of XWiki.WikiMacro type, we will dynamically register (or
re-register) a macro as defined by that object.
Question:
1. What about macro name conflicts? Should we ask macro name to be unique?
(This can be done if we introduce a document sheet and a template for
creating macros)
Implementation steps
--------------------
1. The original idea was to create XWiki.WikiMacro &
XWiki.WikiMacroParameter classes upon XE startup (if those classes are not
present). But I would like to start a little different here, we create
xwiki-application-wikimacro application to host these two documents and
later remove this app and add the initialization code. This will allow me to
focus on other more important tasks upfront and meanwhile i can make any
changes easily to these wiki pages if they are kept inside an application.
2. Document update / save event listening & Macro registration can be
implemented using the ObservationManager and dynamic component registration
mechanisms.
- Currently ObservationManager can only send general document save / update
events. We can either use these events and filter only those we are
interested (ones where an XWiki.WikiMacro object is saved / updated) OR we
can introduce a new event like ObjectChangedEvent (which would be
constructed given a class name) that is fired by xwiki-core appropriately.
- This document event listening & dynamic macro component registration code
will be put inside xwiki-rendering/xwiki-rendering-macro-wikibridge
3. Finally DefaultMacroManager needs to be updated so that it listens to
ComponentManager events and filters out those events corresponding to Macro
component registrations and updates the internal macro cache.
So, above is the approach I have in mind for implementing the wiki-macro
bridge. If you have any comments, please let me know.
Thanks.
- Asiri
All,
I'm new to XWiki so go easy on me! I'm having two issues with my wiki. My first issue is with the Log-In link on the Main page above the Registration link. For some reason, it prompts visitors for the credentials to access my server instead of directing them to the log-in page. Is there any way I can modify the Main page's source so that I can point this link to the log-in page instead?
Also, I'm having difficulty using the calendar application. When I navigate to it the following lines of code appear:
$cparams.put("categories", $rqcategories)
$cview.getHTMLCalendar($cparams, "")
I read somewhere that this happens when the calendar plug-in isn't enabled. I tried enabling it by modifying xwiki.cfg but the calendar still won't appear. Is there something I've overlooked? I didn't find very much documentation on the subject but would be more than happy to contribute it once I get this issue resolved. I'm somewhat of a documentation nut. ^_^
Any help would be greatly appreciated.
Respectfully,
Joe Lawry
Hi devs,
We need to decide something for http://jira.xwiki.org/jira/browse/XWIKI-3413
I propose to take Vincent's proposal and have a parameter "outputType"
in the URL which provide the syntax identifier of the renderer to use.
Also since syntax identifier contains "/" which i never remember the
escaped version when i need it i propose to support short names by
looking at available renderers and take the last version of the asked
syntax (which mean the only renderer of this syntax most of the time
anyway but I prefer having something in case of).
So for example you could ask for the page Space.Page printed as plain
text and without UI with the URL:
http://host/xwiki/bin/view/Space/Page?outputType=plain&xpage=plain
or the full form
http://host/xwiki/bin/view/Space/Page?outputType=plain%2F1.0&xpage=plain
I don't like xpage=plain but it already exists and is doing exactly
this, printing the content of the document without UI. We can decide
latter if we want a new parameter for this.
Feel free to propose another name, I'm not sure of "outputType" but i
could not find a better one and "renderer" seems too technical.
On Mon, May 4, 2009 at 13:15, Vincent Massol<vincent(a)massol.net> wrote:
>
> On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
>
>> On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne
>> <thomas.mortagne(a)xwiki.com> wrote:
>>> Hi devs,
>>>
>>> In 2.0 architecture we have no way currently to print a strongly
>>> formatted text (like JSON) or simply a plain text without XHTML which
>>> we are doing generally using xpage=plain in XWiki 1.0
>>
>> With the 1.0 syntax xpage=plain was mainly used to:
>> 1/ Output data in special format (JSON, xls, etc). In those cases
>> {pre} was used to avoid xhtml transformations.
>> 2/ Output xhtml content without the XWiki UI, I can think of one use
>> case where this content was put in ajax tooltips.
>>
>> Is 2/ covered ? Do we need a xpage=xhtml for it ?
>> Note that xpage=xpart&vm=contentview.vm can be used as a workaround.
>
> If you we want to have something clean for the future it seems to me
> that having a parameter called outputType (or simply output, or type,
> or contentType) which can take all renderer values would be best.
>
> For ex outputType=xhtml, xwiki, text, pdf, rtf, etc
>
> And when not specified it would default to outputType=xhtml.
>
> For removing the UI I'd use another parameter since it's orthogonal.
> Something like showUI=true|false
>
> Thanks
> -Vincent
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
Thanks,
--
Thomas Mortagne
I have a plugin that depends on xwiki-plugin-skinx and xwiki-core-component (for example). When I try to build against 2.0-milestone-1 maven is not able to find jar files for these.
Do I need to specify 1.9 versions for these or have they 'moved' elsewhere? Is there a way to easily determine what is what?
Thanks,
Glenn
Hello guys!
I had a problem with a highlight syntax when I'll execute some search.
Someone knows how can I resolve this question?
Thanks!!
--
View this message in context: http://n2.nabble.com/highlight-Search-tp3184869p3184869.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
On Jun 30, 2009, at 12:11 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2009-06-30 12:11:59 +0200 (Tue, 30 Jun 2009)
> New Revision: 21720
>
> Modified:
> platform/core/trunk/xwiki-shared-tests/pom.xml
> Log:
> XWIKI-4047: Shared test project should provide an implementation of
> slf4j for every unit test with dependencies needing it
>
> Modified: platform/core/trunk/xwiki-shared-tests/pom.xml
> ===================================================================
> --- platform/core/trunk/xwiki-shared-tests/pom.xml 2009-06-30
> 09:05:32 UTC (rev 21719)
> +++ platform/core/trunk/xwiki-shared-tests/pom.xml 2009-06-30
> 10:11:59 UTC (rev 21720)
> @@ -65,5 +65,12 @@
> <artifactId>ant</artifactId>
> <version>1.7.0</version>
> </dependency>
> + <!-- Make sure we provide a default implementation of slf4j for
> any test indirectly use it -->
> + <dependency>
> + <groupId>org.slf4j</groupId>
> + <artifactId>slf4j-log4j12</artifactId>
> + <version>1.5.8</version>
> + <scope>runtime</scope>
> + </dependency>
I don't understand why the tests who need slf4j don't add it in their
poms? Is it required in all tests?
BTW we should probably use a mock logger for the tests instead.
Thanks
-Vincent
Hi,
I'd like to change the signatures DAB.getProperty() methods. Right
now they are:
String getProperty(String documentName, String className, int
objectNumber, String propertyName) throws Exception;
String getProperty(String documentName, String className, String
propertyName) throws Exception;
String getProperty(String documentName, String propertyName)
throws Exception;
I'd like to change them to:
Object getProperty(String documentName, String className, int
objectNumber, String propertyName);
Object getProperty(String documentName, String className, String
propertyName);
Object getProperty(String documentName, String propertyName);
I have no idea why they currently return Strings and not Objects and
why they are declared to throw an exception when they catch all
exceptions and instead return null when an error occurs...
I need this change to be able to implement
http://jira.xwiki.org/jira/browse/XWIKI-4044
(Add support for looking for configuration parameters in
XWikiPreferences, WebPreferences and the User Profile)
Here's my +1
Thanks
-Vincent
Hi,
I'd like to add List<Object> getProperties(String documentName,
String className);
I need this change to be able to implement
http://jira.xwiki.org/jira/browse/XWIKI-4044
(Add support for looking for configuration parameters in
XWikiPreferences, WebPreferences and the User Profile)
Here's my +1
Thanks
-Vincent
Hi Guillaume
Well, I took me a little bit longer to get to it but finally I updated the Blog Application Wiki: http://code.xwiki.org/xwiki/bin/view/Applications/BlogApplication.
Can you have a look at it and see if it did not make any mistakes because it is not that easy to understand what is going on. In addition I also kept the old parts on the page as well.
Cheers
Andreas Schaefer
CEO of Madplanet.com Inc.
EMail: andreas.schaefer(a)madplanet.com
schaefera(a)me.com
Twitter: andy_mpc
AIM: schaefera(a)me.com
On Friday, June 05, 2009, at 09:08PM, "Andreas Schaefer" <schaefera(a)me.com> wrote:
>Hi Guillaume
>
>I will start tomorrow working on that. One thing I noticed is that the
>Blog Categories' RSS Feeds all point to the last category (or at least
>it seems) which in my case is the category Personal. This the RSS Feed
>link:
>
>http://madplanet.com/xwiki/bin/view/Blog/CategoryRss?xpage=plain&category=B…
>
>but the Home Page / Site Location URL is:
>
>http://madplanet.com/xwiki/bin/view/Blog/Personal
>
>Because of the difference with RSS Feed of the entire blog I would
>think that the RSS Feed is broken.
>
>AND
>
>when I am already here the name of the RSS Feed is the title of the
>main page. Is there a way to use the Blog's title ?
>
>Thanks
>
>Andreas Schaefer
>CEO of Madplanet.com Inc.
>Email: andreas.schaefer(a)madplanet.com
> schaefera(a)me.com
>Twitter; andy_mpc
>AIM: schaefera(a)me.com
>
>On Jun 5, 2009, at 6:58 PM, Guillaume Lerouge wrote:
>
>> Hi Andreas,
>>
>> On Fri, Jun 5, 2009 at 6:27 PM, Andreas Schaefer <schaefera(a)me.com>
>> wrote:
>>
>>> Lately it seems I am blind, at least temporary.
>>>
>>> Well, I saw that the RSS fees were available in the Wiki Front Page
>>> but
>>> because I redirect my readers directly to the Blog page I also was
>>> looking
>>> there for the RSS feed. So I took your code (the Blog feed), added
>>> it to the
>>> header and, voila, it worked.
>>>
>>> Thanks a million.
>>>
>>
>> Glad you're using XWiki, keep the feedback coming ;-)
>>
>>
>>> BTW when I am already here shall I update the wiki on:
>>>
>>> http://code.xwiki.org/xwiki/bin/view/Applications/BlogApplication
>>>
>>> change the code snippet there?
>>>
>>
>> The page is completely out of date and I think it talks about XWiki
>> Enterprise 1.0 while the current blog started with XWiki Enterprise
>> 1.8 thus
>> it needs a complete rewrite. I'd be happy to help you once you've
>> started
>> updating the page.
>>
>> Guillaume
>>
>>
>>> Andreas Schaefer
>>> CEO of Madplanet.com Inc.
>>> Email: andreas.schaefer(a)madplanet.com
>>> schaefera(a)me.com
>>> Twitter; andy_mpc
>>> AIM: schaefera(a)me.com
>>>
>>> On Jun 5, 2009, at 4:11 PM, Guillaume Lerouge wrote:
>>>
>>> Re re,
>>>>
>>>> On Fri, Jun 5, 2009 at 4:07 PM, Guillaume Lerouge <guillaume(a)xwiki.com
>>>>> wrote:
>>>>
>>>> Re,
>>>>>
>>>>> On Fri, Jun 5, 2009 at 4:06 PM, Guillaume Lerouge <guillaume(a)xwiki.com
>>>>>> wrote:
>>>>>
>>>>> Hi Andreas,
>>>>>>
>>>>>> On Fri, Jun 5, 2009 at 3:53 PM, Andreas Schaefer <schaefera(a)me.com
>>>>>>> wrote:
>>>>>>
>>>>>> Hi
>>>>>>>
>>>>>>> I have a blog up and running with XWiki (http://madplanet.com/blog
>>>>>>> )
>>>>>>> but I have problems to create an RSS feed for it.
>>>>>>>
>>>>>>> I tried to use the snippet on:
>>>>>>>
>>>>>>> http://code.xwiki.org/xwiki/bin/view/Applications/BlogApplication
>>>>>>>
>>>>>>> but that does not work. The resulting XML is empty (only the XML
>>>>>>> header is there).
>>>>>>>
>>>>>>>
>>>>>> Weird, in a fresh install I have the icon and it redirects to
>>>>>> http://localhost:8080/xwiki/bin/view/Blog/GlobalBlogRss?
>>>>>> xpage=plain
>>>>>> which
>>>>>> gives me an RSS feed of blog articles out of the box...
>>>>>>
>>>>>> Did you modify / import some files along the way when setting
>>>>>> your wiki
>>>>>> up?
>>>>>>
>>>>>> Guillaume
>>>>>>
>>>>>>
>>>>> Actually you do have a RSS feed for your blog already ;-)
>>>>>
>>>>> http://madplanet.com/xwiki/bin/view/Blog/GlobalBlogRss?xpage=plain
>>>>>
>>>>> Guillaume
>>>>>
>>>>>
>>>> To add the RSS icon at the top of the page, go to
>>>>
>>>>
>>>> http://madplanet.com/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globalad…
>>>>
>>>> and replace the following content at the bottom of the textarea
>>>> next to
>>>> HTTP
>>>> Meta Information :
>>>>
>>>> #if($doc.fullName != "XWiki.XWikiLogin")
>>>> <link rel="alternate" type="application/rss+xml" title="Wiki Feed
>>>> RSS"
>>>> href="$xwiki.getURL('Main.WebRss', 'view', 'xpage=rdf')" />
>>>> <link rel="alternate" type="application/rss+xml" title="Blog RSS
>>>> Feed"
>>>> href="$xwiki.getURL('Blog.GlobalBlogRss', 'view', 'xpage=plain')" />
>>>> #end
>>>>
>>>> This should do the trick.
>>>>
>>>> Guillaume
>>>>
>>>>
>>>>
>>>>>
>>>>>>
>>>>>> Using the Blog Category Panel gives me links to the the Category
>>>>>> Feeds
>>>>>>> but these feeds all point to the category 'Personal' no matter
>>>>>>> what
>>>>>>> category I put into.
>>>>>>>
>>>>>>> Could that be an issue with an outdate document (from 1.8 or
>>>>>>> so) ?
>>>>>>>
>>>>>>> How would I create a RSS Feed for the entire blog (all
>>>>>>> categories) and
>>>>>>> more specific is there a way to make the RSS feed symbol come
>>>>>>> up (on
>>>>>>> the Main.Blog site) in the address bar (blue-white RSS symbol
>>>>>>> on the
>>>>>>> right hand side) ?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Andreas Schaefer
>>>>>>> CEO of Madplanet.com Inc.
>>>>>>> Email: andreas.schaefer(a)madplanet.com
>>>>>>> schaefera(a)me.com
>>>>>>> Twitter; andy_mpc
>>>>>>> AIM: schaefera(a)me.com
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> devs mailing list
>>>>>>> devs(a)xwiki.org
>>>>>>> http://lists.xwiki.org/mailman/listinfo/devs
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Guillaume Lerouge
>>>>>> Product Manager - XWiki
>>>>>> Skype ID : wikibc
>>>>>> http://guillaumelerouge.com/
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Guillaume Lerouge
>>>>> Product Manager - XWiki
>>>>> Skype ID : wikibc
>>>>> http://guillaumelerouge.com/
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Guillaume Lerouge
>>>> Product Manager - XWiki
>>>> Skype ID : wikibc
>>>> http://guillaumelerouge.com/
>>>> _______________________________________________
>>>> devs mailing list
>>>> devs(a)xwiki.org
>>>> http://lists.xwiki.org/mailman/listinfo/devs
>>>>
>>>
>>>
>>> _______________________________________________
>>> devs mailing list
>>> devs(a)xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>>
>>
>>
>> --
>> Guillaume Lerouge
>> Product Manager - XWiki
>> Skype ID : wikibc
>> http://guillaumelerouge.com/
>> _______________________________________________
>> devs mailing list
>> devs(a)xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/devs
>
>