Yes, But don't forget that you need to secure access to these methods if they allow accessing non public data. Basically call "checkProgrammingRights()" for those methods Ludovic Julien Bourdon a écrit :
Thank you,
It was the $xwiki.ipresolver that caused me some problems.
So basically, if I create my own plugin called BarFooPlugin and if I put BarFooPluginAPI.class in webapps/xwiki/WEB-INF/classes/com/xpn/xwiki/plugin/barfoo and register it in the xwiki.cfg file, I will be able to access its methods via $xwiki.barfoo.myWonderfulMethod(), right?
On 23/03/06, Robin Fernandes <[email protected]> wrote:
Hi,
Try something like this: ##------------------------------- #set($url="www.soal.org") #set($ip=$xwiki.ipresolver.getIP($url))
IP for $url is $ip.<br/> Resolved to country: $xwiki.ipresolver.resolveIP("myKey", $ip).getCountry() ##-------------------------------
Somehow this seems to work as is, even though "myKey" probably isn't a valid key for this webservice. :) The $xwiki.ipresolver.resolveIP("myKey", $ip) call returns a com.cdyne.ipresolver.IPInformation object for which I can't find the API doc anywhere, but this page gives an idea of what fields to expect: http://ws.cdyne.com/ip2geo/ip2geo.asmx?op=ResolveIP
Hope that's of some help, Robin
On 23/03/06, Julien Bourdon <[email protected]> wrote:
Hi all!
I'm a newbie in XWiki application development and I'm trying to make sense of these plugins. I tried with the IPResolverPlugin which looks quite simple but I don't know how to access it from the Velocity context. Is this possible at least?
Thanks a lot!
-- _ _ Julien Bourdon (o)(o)--. http://purl.org/net/JulienBourdon \../ ( ) self isAddictedTo:(#Squeaklinux) m\/m--m'`--. ^true
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- _ _ Julien Bourdon (o)(o)--. http://purl.org/net/JulienBourdon \../ ( ) self isAddictedTo:(#Squeaklinux) m\/m--m'`--. ^true
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic