this is awsome..
just made it work in blogs..
if someone else is interested (and if I may)
here is the modification I applied..
in the product.xml find:
PHP Code:
if ($vbulletin->options['amp3_enabled']) {
$vbulletin->templatecache['postbit_attachment'] = preg_replace('#<tr#', '<tr style=\"vertical-align: top;\"',$vbulletin->templatecache['postbit_attachment']);
$vbulletin->templatecache['postbit_attachment'] = preg_replace('#\)</td>#', ')" . ( ($attachment[attachmentextension] == "mp3")?("<div style=\'float: left;\'><script src=\'./clientscript/audio/audio-player.js\' language=\'JavaScript\'></script><object style=\'vertical-align: middle;\' id=\'./attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]\' width=\'290\' height=\'24\' data=\'./clientscript/audio/player.swf\' type=\'application/x-shockwave-flash\'><param value=\'./clientscript/audio/player.swf\' name=\'movie\'/><param value=\'playerID=1&soundFile=./attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]\' name=\'FlashVars\'/><param value=\'high\' name=\'quality\'/><param value=\'false\' name=\'menu\'/><param value=\'transparent\' name=\'wmode\'/></object></div>"):("") ) . "</td>',$vbulletin->templatecache['postbit_attachment']);
}
replace with:
PHP Code:
if ($vbulletin->options['amp3_enabled'] AND ($vbulletin->userinfo['userid'] > 0) )
{
if((strlen($vbulletin->templatecache['blog_entry_attachment'])>1) OR (strlen($vbulletin->templatecache['postbit_attachment'])>1))
{
$cachedtemp = (THIS_SCRIPT == 'blog') ? $vbulletin->templatecache['blog_entry_attachment'] : $vbulletin->templatecache['postbit_attachment'];
$attach_file = (THIS_SCRIPT == 'blog') ? 'blog_attachment' : 'attachment';
$cachedtemp = preg_replace('#<tr#', '<tr style=\"vertical-align: top;\"',$cachedtemp);
$cachedtemp = preg_replace('#\)</td>#', ')" . ( ($attachment[attachmentextension] == "mp3")?("<div style=\'float: left;\'><script src=\'./clientscript/audio/audio-player.js\' language=\'JavaScript\'></script><object style=\'vertical-align: middle;\' id=\'./attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]\' width=\'290\' height=\'24\' data=\'./clientscript/audio/player.swf\' type=\'application/x-shockwave-flash\'><param value=\'./clientscript/audio/player.swf\' name=\'movie\'/><param value=\'playerID=1&soundFile=./'.$attach_file.'.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]\' name=\'FlashVars\'/><param value=\'high\' name=\'quality\'/><param value=\'true\' name=\'menu\'/><param value=\'transparent\' name=\'wmode\'/></object></div>"):("") ) . "</td>',$cachedtemp);
if(THIS_SCRIPT == 'blog')
{
$vbulletin->templatecache['blog_entry_attachment'] = $cachedtemp;
}
else
{
$vbulletin->templatecache['postbit_attachment'] = $cachedtemp;
}
unset($cachedtemp);
}
}
Actually the only thing I did was to change the template to parse if we are in blogs.. from $vbulletin->templatecache['postbit_attachment'] to $vbulletin->templatecache['blog_entry_attachment']
if we are not in blogs it works as usual..
It now seems to work fine in vblogs AND showthread

and i'm happy
Felix
[EDIT]: Just corrected one bracket.. and a line that got lost in cut & paste AND added that the player only appears for logged in users.. (if you want all users to see the player.. remove
AND ($vbulletin->userinfo['userid'] > 0) at the beginning..)