[xwiki-users] Logging configuration

2015-01-14 Thread kelly resche
Hi,

I use XWiki 6.3 on ubuntu 14.04 LTS using Tomcat 7 and MySQL (XWiki .deb 
version).
I want to know how to log some specific stuff like user creation or 
registration, pages modification, login/logout, forbidden acces to a page...

I understand that i can do it with the administration interface of the wiki or 
by editing the logback.xml file. But i can't find any information on which 
Logger i have to configure to log specific events.

For example, i found that if i set the 
com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator to INFO level, i can see 
failed and successful login in the catalina.out file. But for other specific 
action i don't know!

I tried some logger but with no result for what i want to log.

Thanks for help.


  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Add date of account creation (without time) in User Index problem

2015-01-14 Thread Clemens Klein-Robbenhaar
Ah, ok, now I understand (I hope) :)

Indeed the livetable macro is in that place, but this is because the flamingo 
skin overrides some of the macros;
the original is actually here: 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/macros.vm

I guess both macros should be updated, as other skins will use the version in 
xwiki-platform-web by default.

(Btw, as the variant in the flamingo skin seems to be there to stay, I wonder 
if one wants to split that file
into two parts, one containing the macros overwritten in the flamingo-skin, and 
the other one containing the common ones.
Or is this considered an API breakage ?)

Anyway, when adding a dateformat to one of the $columnsProperties it might be 
still some way to go to get this working ...
I just tried to track this down, and ended up with the following (any better 
idea how to do it?)

 - the livetable macro does not really render much stuff by itself, but 
delegates most to the AJAX call
   You can see that in the script part, where a JavaScript at the end of the 
macro, where
   the  function startup()  creates a JavaScript object : 
XWiki.widgets.LiveTable  that does the actual loading

 - just in case you wonder how this triggers the Ajax call, this JavaScript 
class in turn is in the file
  
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/js/xwiki/table/livetable.js
   but I guess that does not need to be touched. (at least)

 - instead you can see how the AJAX-request parameters are put together in the 
#livetable macro in

#set ($parameters = {
  'outputSyntax': 'plain',
  'transprefix': $transprefix,
  'classname': $classname,
  'collist': $stringtool.join($dataColumns, ','),
  'queryFilters': $queryFilters
})

  You can see these parameters are send via Ajax if you check your browsers 
network tab.

  So this would be the place to add more parameters.
  However as you might see there are no column-specific parameters, only 
global ones. So you need to invent a schema to pass these parameters for 
columns in, too.
  Maybe it might be easier to try to send a global dateformat, at least for a 
first try? (I.e. globally used for all entries in the current livetable)

  Anyway, these parameters are then send to the XWiki.LiveTableResults : 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-livetable/xwiki-platform-livetable-ui/src/main/resources/XWiki/LiveTableResults.xml
which in turn delegate most of the work into the  XWiki.LiveTableResultsMarco   
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-livetable/xwiki-platform-livetable-ui/src/main/resources/XWiki/LiveTableResultsMacros.xml
there the call chain in the velocity macros is:

  gridresultwithfilter - calls gridresultwithfilter_buildJSON  - 
gridresult_buildRowsJSON - gridresult_buildRowJSON

In the latter one you find the code which creates the (already formatted) 
doc.creationDate (already formatted, because Date is no JSON data type that 
can be passed around, and also formatting Dates in JavaScript + Timezone issues 
= Desperation IMO)
It is somewhere:
  #set($discard = $row.put('doc_date', $xwiki.formatDate($translatedDoc.date)))
  
   #set($discard = $row.put('doc_creationDate', 
$xwiki.formatDate($translatedDoc.creationDate)))

Then this macro, for custom class property date columns, delegates to 
gridresult_buildColumnJSON, which just called the display for that class 
property and I guess that will ignore any attempts to change date formatting.


It looks like after putting the date format into the request you would have to 
read the format from the request in XWiki.LiveTableResults and pass it around 
through all the macros ...



 Yes I know that format_date parameter doesn't exist for the moment :-), I 
 wanted to improve livetable macro (with pull request at the end I hope). I 
 think I find where this macro 
 is:https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/src/main/resources/flamingo/macros.vmLine
  1261
 #macro(livetable $divid $collist $colprops $options)
 I saw the Modify the JSON data ... solution but afraid about ...since it 
 would slow down your wiki a lot as it loads DocThxs

That slow down your wiki comment is only about the action happening in that 
specific example, because it loads a document for every element in the result 
set into memory.
If you do something with the data already loaded I think it should not be too 
inefficient.
Personally I still think this is the way to go ...

 
   De : Clemens Klein-Robbenhaar c.robbenh...@espresto.com
  À : users@xwiki.org 
  Envoyé le : Mardi 13 janvier 2015 16h10
  Objet : Re: [xwiki-users] Add date of account creation (without time) in 
 User Index problem

 
 On 01/13/2015 03:05 PM, 

[xwiki-users] wiki syntax for linking to own user profile page?

2015-01-14 Thread Pascal BASTIEN
Hello,
I want to know if there are a wiki syntax  to add an hyperlink to your own user 
profile in wiki syntax (without velocity/grovy tags).With velocity it 
is:{{velocity}}
Here your own profile :  [[$context.user]]
{{/velocity}}
Thxs.
Pascal B

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] wiki syntax for linking to own user profile page?

2015-01-14 Thread vinc...@massol.net
Hi Pascal,


On 14 Jan 2015 at 10:08:51, Pascal BASTIEN 
(pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote:

 Hello,
 I want to know if there are a wiki syntax to add an hyperlink to your own 
 user profile in wiki syntax (without velocity/grovy tags).With velocity it 
 is:{{velocity}}
 Here your own profile : [[$context.user]]
 {{/velocity}}

No it’s not possible ATM, see http://jira.xwiki.org/browse/XRENDERING-290

Thanks
-Vincent

 Thxs.
 Pascal B

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] List all registered macros

2015-01-14 Thread Ecaterina Moraru (Valica)
Hi,

XWiki/WikiMacros will list all the existing wiki macro on a wiki, but not
sure it this covers all your need.

Thanks,
Caty

On Tue, Jan 13, 2015 at 1:10 PM, ICLED c.lederm...@interact-consulting.com
wrote:

 How can I get a list of all *registered* macros?I know how to get a list of
 the XWiki.WikiMacroClass with the * Query Generator
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Generator  *
 extension, but it will not show if the macro is properly registered or
 not.I
 also want to get the attributes of a registered macros such as source
 document or built in, language...



 --
 View this message in context:
 http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] List all registered macros

2015-01-14 Thread vinc...@massol.net
Hi ICLED,

See http://extensions.xwiki.org/xwiki/bin/view/Extension/List+All+Macros

Thanks
-Vincent


On 14 Jan 2015 at 10:35:30, Ecaterina Moraru (Valica) 
(vali...@gmail.com(mailto:vali...@gmail.com)) wrote:

 Hi,
  
 XWiki/WikiMacros will list all the existing wiki macro on a wiki, but not
 sure it this covers all your need.
  
 Thanks,
 Caty
  
 On Tue, Jan 13, 2015 at 1:10 PM, ICLED  
 wrote:
  
  How can I get a list of all *registered* macros?I know how to get a list of
  the XWiki.WikiMacroClass with the * Query Generator
  *
  extension, but it will not show if the macro is properly registered or
  not.I
  also want to get the attributes of a registered macros such as source
  document or built in, language...
 
 
 
  --
  View this message in context:
  http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652.html
  Sent from the XWiki- Users mailing list archive at Nabble.com.
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users