The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Embedded media player in post Details »» | |||||||||||||||||||||||||
This is my first mod for VB, I personally need it on my site because it's focus is MP3's, it may be able to be customized for other uses I would think. What it does is embeds Windows Media Player into the body of the post (as well as the regular attachment) using bbcode and plays the attached MP3 file. What this does upon completing the upload is allows the user to copy and paste the URL to the attached file if they choose.
Also, since this bbcode is the Windows Media Player it may also be able to play .avi, .wmv, .mpg etc. So to broaden this you can change the [MP3] [/MP3] tag to something else like [MEDIA] [/MEDIA] for example. There is no option to secure this to specific groups, however you can use Princeton's Allow Group to Read Titles / Not Content modification as an alternative. Better template formatting, also maybe add a javascript function so that a user can click to add the line of code to the post. If you find this useful please Click Install Update: Added an option to allow only certain groups to add the option to view/paste the URL in their post. Show Your Support
|
Comments |
#42
|
||||
|
||||
I don't need this mod but I figured I'd contribute...
The player code [BBCODE] you have would "bloat" any web page with unneccesary code (slows download of page). Use this instead: NOTE: This code is not for video. If you want to display video you will need to add/edit new params to the javascript. INSERT IN vbulletin_global.js (or some javascript file that is fetched from showthread.php) Code:
function embedwma (wma,w) { var str=''; str='\n<object id="MediaPlayer1" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="'+w+'" height="20">\n' +'<param name="fileName" value="'+wma+'">\n' +'<param name="animationatStart" value="false">\n' +'<param name="autoStart" value="false">\n' +'<param name="showControls" value="true">\n' +'<param name="Volume" value="100">\n' +'<embed name="MediaPlayer1" src="'+wma+'" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="'+w+'" height="25" autostart="0" showcontrols="1" volume="100">\n' +'<\/embed><\/object>\n' +'<noembed>Don\'t have Windows Media Player? <a href="http://www.windowsmedia.com/MediaGuide/Home" tile="download windows media player">Download it free!<\/a><\/noembed>\n'; document.write(str); } Tag: MUSIC USE THIS FOR BBCODE REPLACEMENT: Code:
<script type="text/javascript">embedwma('{param}','{option}');</script> Description: Embed Music within posts. Example: [MUSIC="enter width of controls here"]enter url to file[/MUSIC] Use {option}: YES hope you like ... |
#43
|
||||
|
||||
Quote:
|
#44
|
||||
|
||||
it's the same as your code ... it just doesn't repeat the player code over and over again (everything is done on the client side)
FYI you have a previous example with attachment id (.avi) you do not need to add an extension ... the file is fetched by attachment.php (a function) with the proper extension Also, you may have to create another function to hide BBCODE if viewer does not have permission to download attachment file; otherwise, user will get an error message. |
#45
|
||||
|
||||
Okay, thanks for this.
|
#46
|
||||
|
||||
ok i installed it but the manage atachment window gets kind of messy when you have mor then one plue it showes up with every atachment is ther a way to make them only show up for media and not pics?
|
#47
|
|||
|
|||
General question.
I'm posting file video.avi ALL the guests can see the file . ( mean to WATCH) How can i DENY them to watch ? Meaning only for Registered Members. And on the place of Video file custom text like To Watch the Movie plz Register . etc Thanks |
#48
|
||||
|
||||
Quote:
|
#49
|
||||
|
||||
Quote:
|
#50
|
||||
|
||||
Quote:
|
#51
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|