I have the problen, that when I save the changes that the code just disappears.
The bb code for youtube videos works just fine
but the size of the video needs to be a little bit smaller - so how can I change the size of the video?
I posted about this in another thread. As I'm sure you know, posting....
<div style="width:960px; height:760px; margin:0 auto;"><div id='perf1x56d5tjkpxtm1x25ny1thvcro-1oa7vehcrpz791b2crj0dghxnb'>[url=http://www.adobe.com/go/getflashplayer] [img]http://images.eplayer.performgroup.com/namedImage/12637/install_flash.gif[/img][/url]</div></div>
.... works just fine. For some reason, Cutenews 2 won't let you use any script tags in your news. So this....
<script type='text/javascript' src='http://static.eplayer.performgroup.com/flash/js/swfobject.js'></script><script type='text/javascript' src='http://static.eplayer.performgroup.com/flash/js/performgroup.js'></script><script type='text/javascript'>addCustomPlayer('1x56d5tjkpxtm1x25ny1thvcro', 'f81bab18-0699-4d77-9103-fefdac638de9', '1oa7vehcrpz791b2crj0dghxnb', 960, 760, 'perf1x56d5tjkpxtm1x25ny1thvcro-1oa7vehcrpz791b2crj0dghxnb', 'eplayer16');</script>
Gets changed to this....
addCustomPlayer('1x56d5tjkpxtm1x25ny1thvcro', 'f81bab18-0699-4d77-9103-fefdac638de9', '1oa7vehcrpz791b2crj0dghxnb', 960, 760, 'perf1x56d5tjkpxtm1x25ny1thvcro-1oa7vehcrpz791b2crj0dghxnb', 'eplayer16');
I don't know if they know that this is happening or not. I would assume that they're sanitizing inputs so that nothing malicious gets posted, but that doesn't make sense for news. It's your website, it's not like you're going to post something bad in your own news posts. I guess they probably are doing it for the comments (which makes sense), but instead of just being for the comments it's for all kinds of posts, including news.
You could actually post the code in the first code block in my post (the one without any script tags) into your news, and then include the code from the second code block on your page (in the actual HTML, not through your news posts or templates). However, that code is specific for that video; it would work, but it's not optimal because it will be on every page, not just the ones with the video, and if you want to embed another one, you'll have to include another code block for it.
We can use javascript to fix this problem. If you use jQuery, it's a pretty simple fix. Include the following in your news post where you want the video:
<div style="width:960px;height:760px;margin:0 auto;"><div id="perf1x56d5tjkpxtm1x25ny1thvcro-1oa7vehcrpz791b2crj0dghxnb" class="video"><span>1x56d5tjkpxtm1x25ny1thvcro,f81bab18-0699-4d77-9103-fefdac638de9,1oa7vehcrpz791b2crj0dghxnb,960,760,eplayer16</span>[url=http://www.adobe.com/go/getflashplayer][img]http://images.eplayer.performgroup.com/namedImage/12637/install_flash.gif[/img][/url]</div></div>
Then, at the end of your page (again, in the actual HTML, not through anything Cutenews related):
<script type="text/javascript" src="http://static.eplayer.performgroup.com/flash/js/swfobject.js"></script>
<script type="text/javascript" src="http://static.eplayer.performgroup.com/flash/js/performgroup.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".video").each(function(){
var params = $(this).find("span").html().split(",");
addCustomPlayer(params[0], params[1], params[2], params[3], params[4], $(this).attr("id"), params[5]);
$(this).find("span").remove();
});
});
</script>
Like I said in my other post: it fixes the problem, which is nice and all, but we should seriously be able to embed any kind of HTML in our news posts that we want. I'm sure you could mod your Cutenews installation for it to work, but I haven't looked into that yet, and I assume they'll be fixing it sooner or later, so I'd rather not waste my time and just use this temporary fix until then.
As for fixing the youtube thing, see my aforementioned post.
Hope I could be of assistance!
EDIT: I just realized that the person I quoted wasn't the person who posted the thread. Oh well.
EDIT: I also just noticed that if you forget an ending quotation, such as in a link (like <a href="urlhere>), and you're using HTML, everything after it will be lost.