Â
On 19 Jan 2015 at 09:15:32, Thanh Hong Dai (hdthanh@tma.com.vn(mailto:hdthanh@tma.com.vn)) wrote:
>
> Hi,
>
>
>
>
>
> Sorry, but I can’t see how it would help in my use case.
>
>
>
>
>
> My code currently generates a list of links and the title of the page:
>
>
>
>
>
> * [[name >> fullname]]
>
>
>
>
>
> Adding the {{{…}}} outside the link syntax [[…]] doesn’t make sense, and placing it inside breaks everything (it doesn’t pass any of my hard test cases).
It will work in the label but not in the reference obviously…
Thanks
-Vincent
PS: Please use the list
> From: Vincent Massol [mailto:vmassol@gmail.com] On Behalf Of vincent(a)massol.net
> Sent: Monday, 19 January, 2015 2:23 PM
> To: Thanh Hong Dai; XWiki Users
> Subject: Re: [xwiki-users] Is there an escape tool to escape text in XWiki syntax?
>
>
>
>
>
>
>
> Hi,
>
>
>
>
>
>
>
> If you want to make sure to output verbatim text (ie not interpreted) you can use the {{{…}}} syntax when using XWiki Syntax 2.0+
>
>
>
>
>
>
>
> See http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HVerbatim
>
>
>
>
>
>
>
> However this may not be enough for your needs. We’re currently lacking an escape tool for wiki syntax AFAIK and I remember seeing a JIRA issue about this (can’t find it right now). I agree that we should push for this since it’s becoming something more and more asked for.
>
>
>
>
>
>
>
> Thanks
>
>
>
> -Vincent
>
>
>
>
>
> On 19 Jan 2015 at 08:15:16, Thanh Hong Dai (hdthanh@tma.com.vn(mailto:hdthanh@tma.com.vn))(mailto:hdthanh@tma.com.vn(mailto:hdthanh@tma.com.vn))) wrote:
>
> > Currently, I'm using something like this to generate a list of pages whose
> > prefix is "Prefix:" and link to them:
> >
> >
> >
> > {velocity}} (((
> >
> > #foreach ($row in $services.query.hql("select doc.name, doc.fullName from
> > XWikiDocument doc where doc.space.hidden = false and doc.space not in
> > ('XWiki', 'Sandbox', 'Main', 'Macros') and doc.name like
> > 'Prefix:%'").execute())
> >
> > * **[[$row[0].replaceFirst("Prefix: *", "").replaceAll("~",
> > "~~~~").replaceAll("[\x20-\x7f&&[^a-zA-Z0-9 ~]]",
> > "~~$0")>>doc:$row[1].replaceAll("~", "~~").replaceAll("[\x5b\x5d|]", "\\$0
> >(file://///$0%0b%3e%20) ")]]**
> >
> > #end
> >
> > ))) {{/velocity}}
> >
> >
> >
> > I have tested with some heavy test cases like
> >
> >
> >
> > Prefix:
> > ~~~!!!```@@@$$$%%%^^^&&&***((()))___----+++==={{{}}}[[[]]]\\\|||:::;;;'''"""
> > ???///...>>>,,,<<<
> >
> >
> >
> > And what I have above works correctly (both showing the title and linking to
> > the document). I only work on a few hard test cases, though, so I'm not sure
> > if I missed anything.
> >
> >
> >
> > Is there a method that does all this automatically? Or is there a better
> > approach to this?
> >
>
>
>
>
>
>
I'd like to be able to generate pure JSON from a wiki page, to use in other pages via AJAX. To that end I created a page with the following content:
{{velocity wiki="false"}}
$response.setContentType('application/json')
{
"greeting" : "Hello",
"location": "World"
}
{{/velocity}}
Calling this via /xwiki/bin/get/Sandbox/JsonTest I get the following code (as reported by FireBug):
<p><br/>{<br/>"greeting" : "Hello",<br/>"location": "World"<br/>}</p>
I get the same via /xwiki/bin/view/AlertDB/JsonTest?xpage=plain (as suggested in http://jira.xwiki.org/browse/XWIKI-3413). Is there a way to produce pure JSON by a velocity script by some variation of my approach?
Hello,
To make it work I add this new property in XWiki.XWikiUsers class:
/bin/edit/XWiki/XWikiUsers?editor=class
Name: doc.creationDate Type: String
PrettyName: Creation date
Custom Display:
{{velocity}}
{{html}}<i>$value</i>{{/html}}
{{/velocity}}
The problem is that "Custom display" is not taking into account and not rendering.
I know HTML is not interpreted but I want to remove time of "Creation date" field but "Custom Display" is apparently not used on a database field.
Here a screenshot on what I want: http://snag.gy/bWnu9.jpg
Do you have an idea how I must do it?
Is it normal than "Custom Display" is not used?
Thxs for any help
Pascal BASTIEN
The XWiki development team is proud to announce the availability of
XWiki 6.4 Release Candidate 1.
This release brings many improvements to the Mail Application and its
API, including support for mail throttling. A new 'Wikis' category is
available in the administration that groups together sections with
wiki-related configuration options. Other smaller improvements (23)
and a few bug fixes (15) complete this release. Would be great if you
can give it a try and report whatever issues you may find so that we
can fix them before the 6.4 final release.
You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download
Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki64RC1
Thanks
-The XWiki dev team
Hi.
I have googled this a bit but have found no clear instructions either way.
I have XWiki 6.2.3 installed from the graphical Windows native installer.
Is the upgrade procedure just to grab the latest version of the EXE and run
it?
--
Regards/Mvh
Daniel Lundh
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.
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
Does it work if you change...
{{context document="wiki1:Main.WebHome"}}#if
($hasEdit){{/context}}[[Wiki1>>wiki1:Main.WebHome]]#end
..to:
{{context document="wiki1:Main.WebHome"}}#if
($hasEdit)[[Wiki1>>wiki1:Main.WebHome]]#end{{/context}}
--
View this message in context: http://xwiki.475771.n2.nabble.com/Context-Macro-Broken-tp7593647p7593648.ht…
Sent from the XWiki- Users mailing list archive at Nabble.com.