On Apr 2, 2010, at 9:07 AM, coldserenity wrote:

> 
> Thanks for the info, updated version of the script looks like this
> {{velocity}}
> #macro(displayFullNameByLogin $login)
>    #set($userDocName = "XWiki."+$login)
>    {{html}}$xwiki.getUserName($userDocName, true){{/html}}
> #end
> {{/velocity}}
> 
> usage is the same (works as it meant to work: displays Full Name with URL to
> user's profile if user exists and login otherwise).

Cool, much better indeed :)

Now the next step is to transform this into a wiki macro so that you can write:

{{username name="myname"/}}

The tutorial for doing this is here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial

Once you've done this users will also be able to use your macro within the 
WYSIWYG editor as a normal, standard macro.

-Vincent
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to