Ability To Parse Text To Create Links

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ability To Parse Text To Create Links

laurin1
Can someone tell me what it would take (generally) to add code that would parse text for a specific pattern and convert it to a hyperlink? I'm fluent in PHP and C#, and know a little Java, but have done zero custom work with XWiki. I've created this type of parser for other systems.

What I would be parsing is this regex pattern:

\*\*([0-9])*\*\*

To create this link:

http://intranet.pridedallas.com/tickets_edit.php?iTicketID=$1

Keith Davis - (214) 906-5183



This message (including any attachments) may contain confidential or otherwise privileged information and is intended only for the individual(s) to which it is addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message or that arise as a result of e-mail transmission. If verification is required please request a hard-copy version from the sender.

www.pridedallas.com



_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Ability To Parse Text To Create Links

vmassol
Administrator
Hi,

On Oct 4, 2013, at 9:30 PM, Keith Davis <[hidden email]> wrote:

> Can someone tell me what it would take (generally) to add code that would parse text for a specific pattern and convert it to a hyperlink? I'm fluent in PHP and C#, and know a little Java, but have done zero custom work with XWiki. I've created this type of parser for other systems.
>
> What I would be parsing is this regex pattern:
>
> \*\*([0-9])*\*\*
>
> To create this link:
>
> http://intranet.pridedallas.com/tickets_edit.php?iTicketID=$1

This can be achieved with a Rendering Transformation, see http://rendering.xwiki.org/xwiki/bin/view/Main/Transformations
And specifically the WikiWord transformation (http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiWord+Transformation)

If you with to create your own transformation:
http://rendering.xwiki.org/xwiki/bin/view/Main/Extending#HAddinganewTransformation

Hope it helps,
-Vincent

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Ability To Parse Text To Create Links

laurin1
Thanks

Keith Davis - (214) 906-5183

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Vincent Massol
Sent: Saturday, October 05, 2013 3:02 AM
To: XWiki Users
Subject: Re: [xwiki-users] Ability To Parse Text To Create Links

Hi,

On Oct 4, 2013, at 9:30 PM, Keith Davis <[hidden email]> wrote:

> Can someone tell me what it would take (generally) to add code that would parse text for a specific pattern and convert it to a hyperlink? I'm fluent in PHP and C#, and know a little Java, but have done zero custom work with XWiki. I've created this type of parser for other systems.
>
> What I would be parsing is this regex pattern:
>
> \*\*([0-9])*\*\*
>
> To create this link:
>
> http://intranet.pridedallas.com/tickets_edit.php?iTicketID=$1

This can be achieved with a Rendering Transformation, see http://rendering.xwiki.org/xwiki/bin/view/Main/Transformations
And specifically the WikiWord transformation (http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiWord+Transformation)

If you with to create your own transformation:
http://rendering.xwiki.org/xwiki/bin/view/Main/Extending#HAddinganewTransformation

Hope it helps,
-Vincent

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


This message (including any attachments) may contain confidential or otherwise privileged information and is intended only for the individual(s) to which it is addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message or that arise as a result of e-mail transmission. If verification is required please request a hard-copy version from the sender.

www.pridedallas.com



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