Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Embedded media player in post Details »»
Embedded media player in post
Version: 1.00, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-24-2004 Last Update: 05-14-2005 Installs: 149
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 05-29-2005, 02:03 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The bbcode will work for an outside link as well, as long as it's a file it can recognize, it's just a parser. So give it a try and see if it works for .wmv, if not it's a matter of finding the right WMV code which is pretty easy.
Reply With Quote
  #93  
Old 05-29-2005, 02:24 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MauriceReed
as a n00b, im not following that instructiuon m8.
im having the same problem, where i have uploaded the attachment, it shows underneath the player, al is well, except i cant hear the file playing, and the player just seems to stick on "connecting"......

uploaded all ok, all the filepaths are right......scratching my head now....lol
Okay, to make sure you are storing your files in file system and not the database.
Admin CP > Attachments > Attachment Storage Type. If 'Move Items to a Different Directory' is checked it means your files are stored in the database, you need to check 'Move Items from File System into Database' to move them into the file system.

Another common problem for it not playing is an incorrect path in the template, make sure this matches your site structure exactly:
Code:
[MEDIA]http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3[/MEDIA]
So from looking at your site in your profile it would belike this: (note, ++ is there because the language filter on this site doesn't like it, but you get the idea)

Code:
[MEDIA]http://www.gob++++es.co.uk/forum/attachment.php?attachmentid=$attach[attachmentid].mp3[/MEDIA]
Reply With Quote
  #94  
Old 05-29-2005, 04:19 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
The bbcode will work for an outside link as well, as long as it's a file it can recognize, it's just a parser. So give it a try and see if it works for .wmv, if not it's a matter of finding the right WMV code which is pretty easy.
nope.

if we're only doing it this way, do we still need to make the changes in newattachmentbit?
Reply With Quote
  #95  
Old 05-29-2005, 04:21 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yinyang
nope.

if we're only doing it this way, do we still need to make the changes in newattachmentbit?
It's the bbcode that you need, Stitch put some together for us here https://vborg.vbsupport.ru/showpost....50&postcount=6
Reply With Quote
  #96  
Old 05-29-2005, 04:57 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i followed your embed install instructions and substituted your code with stitch's wmv code. it didn't work
Reply With Quote
  #97  
Old 05-29-2005, 05:20 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yinyang
i followed your embed install instructions and substituted your code with stitch's wmv code. it didn't work
Try deleting the existing bbcode and create a new one with all the same parameters and replace the media player code that I provided with stitch's code.
Reply With Quote
  #98  
Old 05-29-2005, 07:51 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
Try deleting the existing bbcode and create a new one with all the same parameters and replace the media player code that I provided with stitch's code.
ok, basically i cut and pasted your code:

PHP Code:
<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="Player" width="400" height="200" 
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">

<
param name="URL" value="{param}">
<
param name="rate" value="1">
<
param name="balance" value="0">
<
param name="currentPosition" value="1">
<
param name="defaultFrame" value>
<
param name="playCount" value="1">
<
param name="autoStart" value="0">
<
param name="loop" value="-1">
<
param name="currentMarker" value="0">
<
param name="invokeURLs" value="-1">
<
param name="baseURL" value>
<
param name="volume" value="100">
<
param name="mute" value="0">
<
param name="uiMode" value="full">
<
param name="stretchToFit" value="0">
<
param name="windowlessVideo" value="0">
<
param name="enabled" value="-1">
<
param name="enableContextMenu" value="0">
<
param name="fullScreen" value="0">
<
param name="SAMIStyle" value>
<
param name="SAMILang" value>
<
param name="SAMIFilename" value>
<
param name="captioningID" value>
<
param name="enableErrorDialogs" value="0">
<
param name="_cx" value="7938">
<
param name="_cy" value="6482">

<
embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{param}" 
rate=1
balance
=0
currentPosition
=1
playCount
=1
autoStart
=0
loop
=-1
currentMarker
=0
invokeURLs
=-1
volume
=100
mute
=0
uiMode
=full
stretchToFit
=0
windowlessVideo
=0
enabled
=-1
enableContextMenu
=0
fullScreen
=0
SAMIStyle
SAMILang
SAMIFilename
captioningID
enableErrorDialogs
=0
_cx
=7938
_cy
=6482
width
=400 
height
=200>
</
embed>
</
object
and then substituted everything between your <embed></embed> with stitch's wmv code:

PHP Code:
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{param}" 
rate=
balance
=
currentPosition
=
playCount
=
autoStart
=
loop
=-
currentMarker
=
invokeURLs
=-

volume
=100 
mute
=
uiMode
=full 
stretchToFit
=
windowlessVideo
=
enabled
=-
enableContextMenu
=
fullScreen
=
SAMIStyle 
SAMILang 
SAMIFilename 
captioningID 

enableErrorDialogs
=
_cx
=7938 
_cy
=6482 

width
=400 
height
=300
</
embed
i don't think i did it correctly since it didn't work.
Reply With Quote
  #99  
Old 05-30-2005, 01:05 AM
MauriceReed MauriceReed is offline
 
Join Date: Dec 2004
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
Okay, to make sure you are storing your files in file system and not the database.
Admin CP > Attachments > Attachment Storage Type. If 'Move Items to a Different Directory' is checked it means your files are stored in the database, you need to check 'Move Items from File System into Database' to move them into the file system.

Another common problem for it not playing is an incorrect path in the template, make sure this matches your site structure exactly:
Code:
[MEDIA]http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].mp3[/MEDIA]
So from looking at your site in your profile it would belike this: (note, ++ is there because the language filter on this site doesn't like it, but you get the idea)

Code:
[MEDIA]http://www.gob++++es.co.uk/forum/attachment.php?attachmentid=$attach[attachmentid].mp3[/MEDIA]

many thanks for the prompt reply mate...working fine now.
i DID have the paths correct, but for some strange reason, the wrong attachment reference was coming up when i cut n pasted the url into the post.

that sounds wrong in itself....lol
anyways, its working fine now..again, many thanks.
Reply With Quote
  #100  
Old 06-10-2005, 08:27 PM
SpaceStar SpaceStar is offline
 
Join Date: Apr 2005
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Eric

Great hack, just installed and after having some trouble uploading songs (because the files were located in database, after moving them to thr filesystem, i was able to uploading the songs) - but there is a new problem now. And I bet you've answered it before but I am still not able to work it out - so I need your help.

I am not able to run the file. I am sure it has to do something with the path -....

<b>[MP3]http://www.forum.pegham.net/attachment.php?attachmentid=$attach[attachmentid].mp3[/MP3]</b>

Looking forward

Regards
Reply With Quote
  #101  
Old 06-10-2005, 08:38 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you get this worked out? I just checked and was able to play it in the embedded player on your site.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05559 seconds
  • Memory Usage 2,350KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete