extract url from content
emanueleb - December 4, 2007 - 23:23
Hello,
I need to show a preview of a link inserted into content.
So, in node.tpl.php,
i want, before print $content,
point a thumbnail service, but
i need to search the url into $content (ther is an url in my content)
then use this variabile to point a thumbnail service.
This is an example
http://dev.emcelettronica.com/blog/60
I want the preview have as variable the link into content
It's possible to look into the content and extract the url and equal it to a variable?
Thanks
Emanuele

You'll need some code if you
You'll need some code if you want to do it by hand, although I think there are one or two modules that already impliment webshot preview services. Can't recall what they are called.
Most do it client-side via AJAX these days rather than manipulating the source.
Anyway, the links.package has a link extractor you might want to use or copy (in related_links.module) or there are a few output filters (which is what you are asking for), like the one that sticks icons and new windows for offsite links. Can't recall the name there either sorry. Search.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
Hello, I found the
Hello,
I found the module
http://drupal.org/project/urlicon
but it not simple for me (non-expert in php)
extract the url variable from content
Can You help me?
Thank You
Emanuele