Hi,

I would like to change the urlfilter module so that it

- changes plain text links like "http://www.foo.org" and "www.bla.org" and so on to "www.foo.org
- *also* changes HTML links that already have an anchor this way.

Can you elaborate on what the three regexps in the "process" part of the filter do? I know regular expressions a bit but I can't parse yours. ;)

Thanks!
Jens

CommentFileSizeAuthor
#3 urlfilter.diff1.65 KBJens-1
#1 urlfilter.module1.61 KBJens-1

Comments

Jens-1’s picture

StatusFileSize
new1.61 KB

I did this myself now, by hacking the regular expressions in the module.

It would be nice to make this a configurable option (setting a custom prefix for every URL), however I don't know how to do this. Maybe you have an idea.

Thanks,

Jens

Bèr Kessels’s picture

1 I see Java script: boo :)
2 What does your module do what the old one does not?
3 Can you please send in patches instead of a copy of the module?

Jens-1’s picture

StatusFileSize
new1.65 KB

Hi,

1. Javascript does not hurt if it's not required. I just put it in to hide the redirection in the browser status bar. If JS is not enabled, it'll show the redir URL. No harm done.

2. My patch does not only change URLs into an "a" anchor link, but also adds an "/exit.php?go=" before the actual link.

3. I didn't use "patch" because the script changes just about every line anyway (except the ones that only close or open brackets or just output text). But no problem - here you go:

Bèr Kessels’s picture

Status: Active » Needs review

we do not have an exit.php.

you can look at weblinks, and use weblink/goto/XXXX

Jens-1’s picture

Hi,

yes. exit.php must be written by the user - to do anything he wants, eg. populate a database.

I looked at http://drupal.org/project/weblink (that's what you meant, right?) and it seems I would have to rewrite all my stories to use [weblink:URL] style URLs to enable its functionality.
What I didn't really understand was, do you have to enter the URLs in a database *before* being able to use them in stories, or is this done automatically with the weblink module?

Thanks!

beginner’s picture

Version: 4.6.x-1.x-dev » master
Component: Documentation » Code
Status: Needs review » Closed (won't fix)

see weblink documentation.

This is a won't fix, right?