I'm not sure what I'm doing wrong. But for some odd reason, it only shows 1 attachment embedded. As I do have multiple videos in the same threads, I need to get this working quickly.
Here's the code from postbit_legacy:
PHP Code:
<if condition="in_array($thread['forumid'], array(15,16,17,18,22,29,33))">
<if condition="$attachment[attachmentextension] != 'flv,mp4'">
<script type='text/javascript' src='/player/swfobject.js'></script>
<div id="player_$attachment[attachmentid]" align="center">Something went wrong, video can't load. Refresh the page.</div>
<script type='text/javascript'>
var so = new SWFObject('/player/player.swf','jsplayer_$attachment[attachmentid]','720','480','6','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]');
so.addVariable('width','720');
so.addVariable('height','480');
so.addVariable('javascriptid','jsplayer_$attachment[attachmentid]');
so.addVariable('enablejs','true');
so.addVariable('type','video');
so.addParam('allownetworking','all');
so.addVariable('controlbar','bottom');
so.addVariable('showdigits','true');
so.addVariable('showstop','true');
so.addVariable('stretching','uniform');
so.addVariable('smoothing','true');
so.addVariable('autostart','false');
so.addVariable('skin', '/player/bekle/bekle.zip');
so.write('player_$attachment[attachmentid]');
</script>
<br />
</if>
</if>
If we get this working, feel free to use it on your forum. I won't have any problem with that.
What this code does, is it embeds automatically certain attachments.
Demo link can be provided.