
11-07-2007, 07:25 PM
|
 |
|
|
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by derfelix
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 productxml 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']) { $cachedtemp = THIS_SCRIPT == 'blog' ? $vbulletin->templatecache['blog_entry_attachment'] : $vbulletin->templatecache['postbit_attachment'];
if(strlen($cachedtemp)>1) { $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=./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>',$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
|
very cool - can you please post it with the proper plugin formatting? (with the back slashes)?
|