Description:
I ran across a request for the ability to play someones audio straight from the attachment bit, i had a few minutes to spare so i created it.
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)?
hmm.. sorry but i'm a bit a newbie to plugins.. this is only php code modified in the product.xml
what is the plugin format?? backslashes?? sorry if the question is stupid..
all i did is cut and paste in the product.xml ... reinstall with overwrite..
if you meen rewrite the xml an post as attachment.. i dont know if its allowed because i'm not the author...
Felix
hmm.. sorry but i'm a bit a newbie to plugins.. this is only php code modified in the product.xml
what is the plugin format?? backslashes?? sorry if the question is stupid..
all i did is cut and paste in the product.xml ... reinstall with overwrite..
if you meen rewrite the xml an post as attachment.. i dont know if its allowed because i'm not the author...
Felix
you have the permission to attach the XML as long as its only in this thread.
you have the permission to attach the XML as long as its only in this thread.
Thx.. so here is the product.xml as I use it..
import attached product --> overwrite yes
What I changed.. Made it work for blogif vblog is installed (I didnt test it without blog installed but it should work as before as its a IF THIS_SCRIPT check) Added an ACP setting: Registered users only.. if set to yes, only registered users will see the player.
TODO...
1. (hint @Coders Shack ) implement SWFObject as for all modern flash embeds .. this would allow gracefull degrading, upgrading flash and less markup code, better SEO and 100% validation (which is irrelevant though if set to registered users only). Even Youtube uses SWFObject embedding on their page! check out SWFObject
(I will implement it for my installation.. but as my forums are very custom.. my implementation will not work for other installations and I do not have time to make it work for all)
2. debug Sometimes in IE7 i get an error (even with the original product installed) a javascript alert .. something like :"could not load object" (its a german message.. as I use german IE7).. has something todo with the actionscript in the player.. not communicating correctly with the javascript on the page.. it does not interfere with functionality but should be turned off.. I think it should, if there is more than one player.. turn off the others, but it doesnt.. more than one player can be played at the same time)
yes but its pretty small and used only once.. and you save the markup for<object.... etc...
if you have many instances of player.. its overall shorter...
F.
Any easy way to make this work for inline attachments also?
I started poking around the code for attachments, and all the different hooks, but I'm at a loss.
Inline attachments insert code directly into the post like so:
[attach]XXXX[/attach] where XXXX is the attachmentid.
*snip*
-----
Well, I've done it but I think it will require a file edit no matter what. *sigh*
I had to edit class_bbcode.php and add a case for "mp3" and give the proper code. No other way around that, I guess. I don't think any of the bbcode hook locations can handle this through plugins.