Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
wet_commentmagic: Turn web adresses in comments into clickable links
wet_commentmagic is a plugin for Textpattern which transmogrifies people challenged by Textile’s URL syntax into full-scale linkerati.
I just had to use transmogrify once for a software product’s feature list :)
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
ah, great. this is super useful. thank you!
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
Hi Wet
Thank you for this plugin.
I have a question, if it is possible,
to supplement the plugin, so that after a certain number of links they comes in the comment moderation?
(hope you can understand my easy english ;-) …)
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
This is in fact one of the existing features of Jukka’s excellent rah_comment_spam which would work in perfect tandem with wet_commentmagic.
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
Thank You :-)
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
Hi,
I had this plugin silently working for years, but it stopped all of a sudden this week, probably due to a php upgrade (to 7.0.13). Also it made it impossible to see the comment preview.
In debug mode:
wet_commentmagic -> Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead on line 37
textpattern/lib/txplib_misc.php(1782) : eval()'d code:37 preg_replace()
textpattern/lib/txplib_misc.php(1782) : eval()'d code:4 wet_commentmagic()
textpattern/lib/txplib_misc.php:1782 eval()
textpattern/publish.php:169 load_plugins()
index.php:104 include()
For now I have disabled it…
Kees
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
Who has any idea how I can make this pluging work with php 7?
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
kees-b wrote #306842:
Who has any idea how I can make this pluging work with php 7?
You can try (untested) to replace
$rules = Array (
// detect, autolink and truncate URLs (www.*, http://*, https://*, ftp://*)
'/(\s|^)(www\.[\w.\/?#%=\+]+)(\s|$)*?/ieu' => "'$1\"'.wet_cm_truncate('$2', $truncate_urls_at).'\":http://$2$3'",
'/(\s|^)(https?:\/\/|ftp:\/\/)([\w.\/?#%=\+]+)(\s|$)*?/ieu' => "'$1\"'.wet_cm_truncate('$3', $truncate_urls_at).'\":$2$3$4'"
);
with
$rules = Array (
// detect and autolink URLs (www.*, http://*, https://*, ftp://*)
'/(\s|^)(www\.[\w.\/?#%=\+]+)(\s|$)*?/iu' => '$1"$2":http://$2$3',
'/(\s|^)(https?:\/\/|ftp:\/\/)([\w.\/?#%=\+]+)(\s|$)*?/iu' => '$1"$3":$2$3$4'
);
in the plugins code, but this will disable displayed url truncation.
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
You can try (untested) to replace…
Hi Oleg,
This seems to work…
Preview is displayed again, comment posted and links in comments are working. What do you mean by ‘disabled url truncation’?
thanks,
Kees
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
Hi Kees, glad it works. The original version truncates long urls display: https://github.com/textpattern/textpattern/commit/642a2214734ea442f1a5871aba704addc50ce1e6
is transformed into something like https://github.com/textpattern/textpattern/commit/642….
Threat Robert to pay for an update… :-)
Offline
Re: wet_commentmagic: Turn web adresses in comments into clickable links
etc wrote #306849:
Hi Kees, glad it works. The original version truncates long urls display:
https://github.com/textpattern/textpattern/commit/642a2214734ea442f1a5871aba704addc50ce1e6
is transformed into something like https://github.com/textpattern/textpattern/commit/642….Threat Robert to pay for an update… :-)
Ah yes, I see, thanks!
Last edited by kees-b (2017-09-05 15:12:09)
Offline