@sunchez
Without altering Jot’s core code, there is no way to insert clickable link directly into a comment. Jot behaves the following way: it takes the text of a comment, strips out any possible MODx tags, and for the remainder applies htmlspecialchars() function, so whatever we input into a comment field will be interpreted literally.
@all
The reason why Jot’s author implemented things in this way is obvious: inserting links by the site visitors (especially links to external images) is a straight way for ruining carefully designed layout. If you still want to do this, then you need to do this on your own thus taking full responsibility for a possible collapse of your layout.
Suggestion by AHHP is neither old nor new, but it is a good solution -- one (if not only one) of the possible way how to activate static part of a comment within the very late phase of Jot’s processing. PHx (placeholders extended) is an opportunity to make alterations in a comment just in the moment when Jot finished doing its stuff, but the comment itself was not yet sent to the output. Maybe the way it should be used is unclear, so here are some explanations.
PHx is a small snippet that you can use in a template and modify the value of a specific placeholder that PHx is applied to. As an example I am taking the template provided here by cms user:
<div class="jot-message">
[+comment.content:wordwrap:esc:nl2br+]
</div>
The above part of a template is responsible for displaying the body text of a comment. Placeholder [+comment.content+] already has three PHx applied: "wordwrap", "esc", and "nl2br". We want to activate links within this static body text and therefore we will apply fourth (custom) PHx:
<div class="jot-message">
[+comment.content:wordwrap:esc:nl2br:activatelinks+]
</div>
Now we need to define our custom PHx modifier "activatelinks". As it was mentioned before, PHx is an ordinary snippet, so we should define new snippet named (this is very important) "phx:activatelinks". As a snippet’s code I took -- adjusted to MODx environment -- functionality offered by "php:bbcode" and responsible for links:
<?php
/* phx:activatelinks */
return preg_replace('#\(link=(.+?)\)(.+?)\(/link\)#is', '<a href="$1" target="_blank">$2</a>', $output);
?>
Done. Now if someone inputs into the comment’s body a text like
(link=http://setpro.pl/)Visit my site(/link)
it will link to my homepage. Enjoy!