Re: [xwiki-users] Scripting - Saving calculated results for a macro

2012-05-27 Thread Paul Moore
On 27 May 2012 04:11, Sergiu Dumitriu ser...@xwiki.com wrote:

 Some resources that you can use:

 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-cache/xwiki-platform-cache-api/src/main/java/org/xwiki/cache/CacheManager.java
 is the proper way of creating caches. You declare an @Inject dependency on
 that, then use the createNewCache method (if you don't plan on running a
 cluster, or don't think that the cached resources should be shared inside a
 cluster, then it's slightly better for performance to call
 createNewLocalCache). You can then use this cache to store some entries.

 https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-environment/xwiki-commons-environment-api/src/main/java/org/xwiki/environment/Environment.java#L44
 is going to give you the location of the temporary storage directory.
 Combine this with
 https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/TempResourceAction.java
 and you have a nice way of serving image files stored on the disk to the
 HTTP client. Unfortunately, this way you have to implement your own LRU
 functionality and make sure you clean up files, otherwise you'll keep
 filling up the disk with temporary files.

That's brilliant - thanks for those, I'll go and do some reading now.

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


Re: [xwiki-users] help with a query

2012-05-27 Thread Ricardo.Julio.Rodriguez.Fernandez
Hi!

 
 From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of Sergiu 
 Dumitriu [ser...@xwiki.com]
 Sent: 27 May 2012 02:44
 To: XWiki Users
 Subject: Re: [xwiki-users] help with a query

 On 05/26/2012 07:29 PM, ricardo.julio.rodriguez.fernan...@sergas.es wrote:
 Sorry, but I'm not able to get a query getting this:

 All comments added to XWiki users.

 Do you want to get the comments themselves as a whole, just the comment
 body, or just the name of the user documents where comments have been added?

I've found this...

http://extensions.xwiki.org/xwiki/bin/Extension/Get+Last+Comment

Coming from this thread...

http://xwiki.markmail.org/thread/qwnwzoa23ewdt64w

Sorry, I should have found it before!

it requires programming rigths, but this is not a problem rigth now for us. 
What I'm not able to understand here is the role of setLimit(1). Please, check 
this...

http://atriumkm.idisantiago.es/bin/ICT/ListCommentsWithProgrammingRights

We get the same result by using or not using it. Please, what am I missing here?

Also, whatever value I use for setLimit(), I always get the first value in the 
list as ordered in the xwql statement.

I would not be hard to apply this query to all desired documents by looping 
through them. Please, is this the most effective/economic in terms of process 
work way of doing this query?


Thank you so much for your help!!!


 Please, could you help me?

 Thank you very much,

 Ricardo

 --
 Ricardo Rodríguez
 Research Management and Promotion Technician
 Technical Secretariat
 Health Research Institute of Santiago de Compostela (IDIS)
 http://www.idisantiago.es

 Nota: A información contida nesta mensaxe e os seus posibles documentos 
 adxuntos é privada e confidencial e está dirixida únicamente ó seu 
 destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, 
 por favor elimínea. A distribución ou copia desta mensaxe non está autorizada.

 Nota: La información contenida en este mensaje y sus posibles documentos 
 adjuntos es privada y confidencial y está dirigida únicamente a su 
 destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
 por favor elimínelo. La distribución o copia de este mensaje no está 
 autorizada.

 See more languages: http://www.sergas.es/aviso_confidencialidad.htm


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Nota: A información contida nesta mensaxe e os seus posibles documentos 
adxuntos é privada e confidencial e está dirixida únicamente ó seu 
destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, por 
favor elimínea. A distribución ou copia desta mensaxe non está autorizada.

Nota: La información contenida en este mensaje y sus posibles documentos 
adjuntos es privada y confidencial y está dirigida únicamente a su 
destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, 
por favor elimínelo. La distribución o copia de este mensaje no está autorizada.

See more languages: http://www.sergas.es/aviso_confidencialidad.htm
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Rendering mail content in a wiki page

2012-05-27 Thread Jeremie BOUSQUET
Hello,

For the mail archiver app, I need to output mail content in a page. I
used to use it with html content, and display is directly done with
{{html}} macro.

But most messages from mailing-lists are plain-text. My first idea was
to use {{code}}, and this is fine.
But I think display could be greatly improved using specific xwiki
syntax rendering (2.1), but for some elements only.

To do so, I would like to render some text string, not applying all
syntax elements.

Let me explain : what is interesting to render is :
- quotes (lines starting with angle brackets ''),
- urls (replaced by links automatically),
- emoticons

Everything else (wiki macros, ...) should NOT be rendered.

Is this possible ?
Of course I don't want to impact the way xwiki renders pages.

Thanks for help,
Jeremie
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users