Recent Topics

1 Jun 04, 2007 22:16    

My b2evolution Version:

Testing with 1.10.1

Every once in a while I would like to include a link to a pop-up video player in my posts. The code I'm told to use requires some javascript included in the < head > (easy enough to accomplish), and a link url that looks like this


<img border="0" hspace="2" class="video" src="http://WTNH.images.worldnow.com/images/static/video/gfx/icon_video.gif" /><a href="javascript:playVideo('1284733', 'Dogs rescued from ice - Chopper 8 video as it happened', 'v', 'News', '177333', 'News', 'fvCatNo=&backgroundImageURL=', 'www.wtnh.com');"><b>Dogs rescued from ice - Chopper 8 video as it happened</b></a>

However, b2 gives me the "Found invalid URL: Invalid URL" error when I try to save a message with this code. Is there anything I can change in the backend to make this acceptable?

2 Jun 05, 2007 12:19

You can't use javascript in urls unless you disable the html & security checkers ( not recomended ). What you could do is add a "tag" to the bbcode plugin instead.

Hit the bbcodes settings and put this at the end of the search list ( for posts )
#\[vid([^\]]+?)\](.+?)\[/vid]#

and then put this at the end of the replace list ( for posts )
<a$1>$2</a>

and then use the following in your posts :-
[vid href="javascript: playVideo('1284733', 'Dogs rescued from ice - Chopper 8 video as it happened', 'v', 'News', '177333', 'News', 'fvCatNo=&backgroundImageURL=', 'www.wtnh.com');"]<b>Dogs rescued from ice - Chopper 8 video as it happened</b>[/vid]

Note : You'll also want a space between the : and the playVideo otherwise the smiley plugin will kick in and you'll end up with something like "javascript :p layVideo" ;)

¥

3 Jun 12, 2007 14:28

In a word... YUK. Well, since the company is switching to a Flash format for video, I'll wait and see what kind of code they cough up for that. Thanks!


Form is loading...