Thanks for this plugin! It is great.
I'd like to know -if possible- if there is a way to use it by linking a thumbnail to a larger image as opposed to just creating a text hyperlink. Right now I can modify the text/url and make it an anchor text via the wiki plugin as autolink does not offer this text add-on. I would also like to know if there is a way to automagically embed FLVs files into a comment. I know auotlink supports specific video sites like youtube and similar but want to know if in the future dropping an FLV url will get converted into a flash movie inside a comment.
@usor: I don't think I can make AutoLinks automatically embed flash, like it does with images, because, unlike images, the width and height of the flash object would need to be specified when embedding it. (Someone please correct me if I'm wrong!). What you could do though, if you have the HTML Formatter addon, is embed the flash object manually with HTML. As for thumbnails - I like the idea. I'll have to give some thought as to how you'd specify that you wanted a thumbnail rather than a text link or an embedded image. If you've got any ideas, feel free to post them!
@rayk: I'll look in to this when I've got a moment.
I don't know. V2 works very differently to V1, so it'll take a small amount of work (though it's not a complicated addon). I was going to take a look at it sometime and port it.
anyway you could implement FAIRTILIZER embeds? Right now it really doesnt work because it takes me to the fairtilizer site sans the side panel that has the music player in it, so I cant even link to the fairtilizer site to hear the music.
@jasonrocks7: I couldn't see you using any mailto: links, but you literally have to type, "mailto:someone@example.com" for it to work. And yes, you are correct, links that begin "http://" (or "https://", etc) are automatically made in to links. If this weren't the case, the extension might make some things that aren't links in to links.
added support for fairtilizer.com (requires iframes to be permitted)
bugfix: also detect images to embed from URL params
@banjanqrum: there you go. Don't forget to allow the 'iframe' HTML tag through if you use the HtmlFormatter with the above modifications. You do this by removing it from the $Html_DisallowedTags list, in the same way as you do the 'embed' tag (see the end of the instructions on modifying HTML Formatter manually).
@mkadi, @swisswebmiss: Ok, sorry for the delay. I've figured out what's causing the problem you're having. Try disabling and re-enabling the AutoLinks extension and that should fix it.
It's because Vanilla runs the extensions in the order they were enabled and AutoLinks adds it's self as a child formatter of any formatters that exist at the time it runs. If the HTML or Markdown formatter extensions haven't been run at that point, they won't exist. So AutoLinks has to be enabled last. I'll look at converting AutoLinks in to a global formatter instead, which should fix it properly.
@edam, This extension is exactly what we've been looking for.
Is it possible to limit the length of displayed URL links? If someone enters a really long URL it would be cool if only 50 characters or so were displayed and end with "..." like:
I just solved my own problem... If anyone is interested in doing what I posted above, I modified this extension as follows:
I replaced line 132: return '<a href="'.$link[0].'" rel="nofollow" class="auto-embedded" >'.$link[0].'</a>';
With the following:
$linkDisplay = $link[0];
if (strlen($linkDisplay) > 50) {
$linkDisplay = substr($linkDisplay,0,50) ;
$linkDisplay = $linkDisplay."...";
}
return '<a href="'.$link[0].'" rel="nofollow" class="auto-embedded" target="_blank">'.$linkDisplay.'</a>';
The code does two things. First, it limits the display length of URL's to 50 characters (or whatever you set it to). Second, I added target="_blank" to the anchor tag so the link will open a new tab (my preference when viewing a forum).
Comments
- made compatible with BlogThis extension
- added fullscreen buttons to google videos and youtube
- added support for LiveLeaks.com
@jefgodesky, @Raize: there you go! )Ultra-cool - works perfectly with YouTube! (on a plain Vanilla forum editor)
@rayk: I'll look in to this when I've got a moment.
anyway you could implement FAIRTILIZER embeds? Right now it really doesnt work because it takes me to the fairtilizer site sans the side panel that has the music player in it, so I cant even link to the fairtilizer site to hear the music.
many thanks!
- added support for fairtilizer.com (requires iframes to be permitted)
- bugfix: also detect images to embed from URL params
@banjanqrum: there you go. Don't forget to allow the 'iframe' HTML tag through if you use the HtmlFormatter with the above modifications. You do this by removing it from the $Html_DisallowedTags list, in the same way as you do the 'embed' tag (see the end of the instructions on modifying HTML Formatter manually).When I activate Markdown and switch my comment from text mode to markdown mode, all videos disapear.
It's because Vanilla runs the extensions in the order they were enabled and AutoLinks adds it's self as a child formatter of any formatters that exist at the time it runs. If the HTML or Markdown formatter extensions haven't been run at that point, they won't exist. So AutoLinks has to be enabled last. I'll look at converting AutoLinks in to a global formatter instead, which should fix it properly.
This extension is exactly what we've been looking for.
Is it possible to limit the length of displayed URL links? If someone enters a really long URL it would be cool if only 50 characters or so were displayed and end with "..." like:
http://cgi.ebay.com/ebaymotors/ws/eBayISAPI.dll?Vi...
Thanks!
I replaced line 132:
return '<a href="'.$link[0].'" rel="nofollow" class="auto-embedded" >'.$link[0].'</a>';
With the following:
$linkDisplay = $link[0]; if (strlen($linkDisplay) > 50) { $linkDisplay = substr($linkDisplay,0,50) ; $linkDisplay = $linkDisplay."..."; } return '<a href="'.$link[0].'" rel="nofollow" class="auto-embedded" target="_blank">'.$linkDisplay.'</a>';
The code does two things. First, it limits the display length of URL's to 50 characters (or whatever you set it to). Second, I added target="_blank" to the anchor tag so the link will open a new tab (my preference when viewing a forum).
Hope this helps someone else!
anyone here can make Autolink replace .FLV link to embed obj code?