Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-02 15:13:02

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

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.

Details and download.

I just had to use transmogrify once for a software product’s feature list :)

Offline

#2 2007-07-02 16:11:10

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: wet_commentmagic: Turn web adresses in comments into clickable links

ah, great. this is super useful. thank you!

Offline

#3 2009-08-18 12:32:10

SuMu
Member
From: Germany - Wuppertal
Registered: 2008-03-06
Posts: 242
Website

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 ;-) …)


viele Grüße
SuMu

Psychomuell + blogZicke

Offline

#4 2009-08-18 14:51:28

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

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

#5 2009-08-19 03:56:15

SuMu
Member
From: Germany - Wuppertal
Registered: 2008-03-06
Posts: 242
Website

Re: wet_commentmagic: Turn web adresses in comments into clickable links

Thank You :-)


viele Grüße
SuMu

Psychomuell + blogZicke

Offline

#6 2017-09-01 10:33:54

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

#7 2017-09-04 18:33:58

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

#8 2017-09-05 08:10:06

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#9 2017-09-05 09:36:00

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

#10 2017-09-05 12:03:44

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#11 2017-09-05 15:11:21

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

Board footer

Powered by FluxBB