Pure JS Block

Permalink
Hi everyone!

Just started out with concrete5 for a new website and still trying to find my way to do everything properly :-)

I need to add a <script language="JavaScript"> referencing another site that will render a movie. Is there an existing block that I can use for that? Couldn't really find something that did the trick.

It just needs to output this:
<script language="JavaScript" src="http://www.bezoom.tv/PlayerBezoom/PlayerBezoom.asp?CustomerId=xxxxxx&CustomerVideo=All&PlayerSkin=Grey&PlayerWidth=470&PlayerPlays=no&PlayerTitles=yes&PlayerLoop=no"></script>


Otherwise, I think my best bet will be to create a very simple custom block with 1 field (url for filling in the src). Anyone has a better idea?

Thanks!

 
ramonleenders replied on at Permalink Reply
ramonleenders
You could use the HTML block or indeed just create a new block with just a text input field. In this text input field you enter the URL for example. Or create other values as well for the widht, height, and other things that are true/false in your URL? Best way to go is new block of course, as you can copy paste it elsewhere and easily change all blocks at once, if the URL may change in any way in the future (you can think of it the same as with youtube, best would be to enter just the value after ?v=, without the need to doing some regular expressions).
mhawke replied on at Permalink Reply 1 Attachment
mhawke
I tossed together a block that might work. You might have to alter the 'Customer Video' field to alter how that works. I don't have a Bezoom account so I don't really know what some of the options are.

Download the attached zip file. Expand it to your local computer. Upload the resulting 'bezoom' folder to your [root]/blocks/ folder and visit Dashboard->Block Types to install it.

All this being said, it's pretty easy just to add the required JavaScript code to an HTML block.