vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Embedded media player in post (https://vborg.vbsupport.ru/showthread.php?t=72162)

ericgtr 11-24-2004 10:00 PM

Embedded media player in post
 
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.

HiDeo 11-25-2004 03:34 AM

Nice job, thanks !

I 'll test it.

/me clicks install

BamaStangGuy 11-25-2004 04:08 AM

Very very nice. Once its final I will install!

tnguy3n 11-25-2004 05:12 AM

looks nice, but ain't it template mod rather than code hack?

Hades-1 11-25-2004 10:44 AM

this is AWSOE just what i needed, damn you rock

1 thig, how can i make it so it does not show the video window? its only mp3 no video allowed, but on my site it shows the video window and controls

shoud just be controls, posibally song length and stuff

Thanks

lanc3lot 11-25-2004 11:13 AM

Great hack...Wait to install it when u will have it secure on specific usergroups only

:)

ericgtr 11-25-2004 12:23 PM

Quote:

Originally Posted by tnguy3n
looks nice, but ain't it template mod rather than code hack?

Yes, that and added bbcode. Wasn't sure where to put this but it does add a new function.

Bad Bunny 11-25-2004 12:38 PM

Quote:

Originally Posted by ericgtr
Yes, that and added bbcode. Wasn't sure where to put this but it does add a new function.

Has anyone tested how this works on different platforms? Specifically Mac for instance? Will it still work if a system does not have wmp?

Hades-1 11-25-2004 12:50 PM

Quote:

Originally Posted by Bad Bunny
Has anyone tested how this works on different platforms? Specifically Mac for instance? Will it still work if a system does not have wmp?

i am not making any garuntees but usually if you have quicktie installed and you come across a code like this it will just use quicktime.

In fact my PC always used quicktime but i changed the settings to use WMP

ericgtr 11-25-2004 12:51 PM

Quote:

Originally Posted by Hades-1
this is AWSOE just what i needed, damn you rock

1 thig, how can i make it so it does not show the video window? its only mp3 no video allowed, but on my site it shows the video window and controls

The only way I have been able to make it so the video window doesn't show is to use a lesser version of WMP.

Hades-1 11-25-2004 12:51 PM

but anyway since i was ignored let me ask again, how can i make this only show the controls and song length, right now it shows a video window too, i dont allow video so thats pontless and looks weird

Thanks!

ericgtr 11-25-2004 12:54 PM

Quote:

Originally Posted by Bad Bunny
Has anyone tested how this works on different platforms? Specifically Mac for instance? Will it still work if a system does not have wmp?

I have a mac guy on my site that says it works great. Obviously WMP must be installed on it though, not sure how that works with a mac. Also, the the attachment will still be posted as it normally is, this is an added option to be sure the original format is still preserved.

ericgtr 11-25-2004 12:58 PM

Quote:

Originally Posted by Hades-1
but anyway since i was ignored let me ask again, how can i make this only show the controls and song length, right now it shows a video window too, i dont allow video so thats pontless and looks weird

Thanks!

Sorry, I was mucking with it but this will require different bbcode, have a look at this post https://vborg.vbsupport.ru/showthread.php?t=72060 stitch has posted a variety of them for us. Like I said though, the only other one i've found that doesn't display the window is an older version. If someone can work out a way with the new one that would be great :)

Hades-1 11-25-2004 01:39 PM

ok one more problem when i put the code into the template it does not word wrap so its wider then the pop-up window

so i wanted to put it in newpost_attachmentbit

but then after you upload it does not refresh the page like it should

any solution?

Hades-1 11-25-2004 02:14 PM

i think its the template your using it works for you in your screenshot, when you make a hack you really should do so with the default template.

anyway i notice that ont he default template you should remove the </table> at the bottom in order for the file size and close window buttons to NOT break out of the template.

hence the beta release i guess

ericgtr 11-25-2004 02:44 PM

Quote:

Originally Posted by Hades-1
i think its the template your using it works for you in your screenshot, when you make a hack you really should do so with the default template.

anyway i notice that ont he default template you should remove the </table> at the bottom in order for the file size and close window buttons to NOT break out of the template.

hence the beta release i guess

Good point Hades-1, thanks for pointing that out. I also played with it some in the attachment template, with a little work it could be setup using a new fieldset as well.

Hades-1 11-25-2004 03:18 PM

did u read what i said about wordwrap though?

i still have a problem with the width f the popup and the width of the URL

if the url wrapped it would fit fine

NuclioN 11-25-2004 06:45 PM

It works ok :) Is it a surprise that it plays avi movies to with the mp3 tags?

ericgtr 11-25-2004 08:01 PM

Quote:

Originally Posted by Hades-1
did u read what i said about wordwrap though?

i still have a problem with the width f the popup and the width of the URL

if the url wrapped it would fit fine

I don't know why it's doing that for you, I also tested this with my default template and it wraps the same as it does in my modified template it's contained withing the table so it should. What version of vbulletin are you using?

ericgtr 11-25-2004 08:02 PM

Quote:

Originally Posted by NuclioN
It works ok :) Is it a surprise that it plays avi movies to with the mp3 tags?

That doesn't surprise me in the least actually, considering it's a Windows Media Player ;)

Hades-1 11-25-2004 09:30 PM

3.0.3

and i just copied and pasted the code i just changed my url so its not like i changed anything.

I like it, i just need to fix that

ericgtr 11-25-2004 10:19 PM

Quote:

Originally Posted by Hades-1
3.0.3

and i just copied and pasted the code i just changed my url so its not like i changed anything.

I like it, i just need to fix that

Okay, you pasted it to the bottom and didn't overwrite anything else? Just making sure :)

dniMTheory 11-25-2004 11:11 PM

i use this for videos..so far im WM9 it works with everything i tried. .ava, .asf, .wmv, .asx.

Thamks for the hack ericgtr. Someone finally made a usefull hack.

ericgtr 11-26-2004 12:13 AM

Quote:

Originally Posted by dniMTheory
i use this for videos..so far im WM9 it works with everything i tried. .ava, .asf, .wmv, .asx.

Thamks for the hack ericgtr. Someone finally made a usefull hack.

Sure, glad to see it's getting some use. My users are starting to finally use it with their MP3's it's just a matter of explaining it right. When I get some time I am going to work on a javascript so it can be clicked and added directly to the post.

turkeyslapper 11-26-2004 02:44 AM

Is their anyway to set this up so people can use it as a signature?

ericgtr 11-26-2004 01:02 PM

Quote:

Originally Posted by turkeyslapper
Is their anyway to set this up so people can use it as a signature?

I just tested it by adding the mp3 url with the tags in my signature and it works, not sure about the default settings of bbcode for regular users though. I am still new to this board and am still figuring out all the defaults lol.

Hades-1 11-27-2004 01:58 PM

Quote:

Originally Posted by ericgtr
Okay, you pasted it to the bottom and didn't overwrite anything else? Just making sure :)

no for now i made the width of the pop-up 580 instead of 480 and that worked

:(

Hades-1 11-28-2004 06:31 PM

Quote:

Originally Posted by ericgtr
Sure, glad to see it's getting some use. My users are starting to finally use it with their MP3's it's just a matter of explaining it right. When I get some time I am going to work on a javascript so it can be clicked and added directly to the post.


if you wanted to you could edit the bb code to be [media] [/media] if you wanted it to be for various formats.

Moya 11-29-2004 06:48 PM

ericgtr,

nice mod!! :)

fatalsex 11-29-2004 06:50 PM

Great hack... JUST GREAT..
Perfect support.
man you are good!!!!
Thank you for this usefull hack.

ericgtr 11-29-2004 07:05 PM

Quote:

Originally Posted by fatalsex
Great hack... JUST GREAT..
Perfect support.
man you are good!!!!
Thank you for this usefull hack.

Glad you are up and running now fatalsex. Stitch, thanks for for steering me into the right direction with this. :)

Moya 11-29-2004 07:29 PM

Quote:

Originally Posted by ericgtr
Glad you are up and running now fatalsex. Stitch, thanks for for steering me into the right direction with this. :)

huh I didn't do anything :nervous: :nervous:

MrNase 11-30-2004 01:44 PM

<param name="baseURL" value>

Should be

<param name="baseURL" value="http://YOURDOMAIN.com/YOURFORUMS> or something :)

ericgtr 11-30-2004 09:25 PM

Quote:

Originally Posted by MrNase
<param name="baseURL" value>

Should be

<param name="baseURL" value="http://YOURDOMAIN.com/YOURFORUMS> or something :)

That may be an option but it's not needed for this :)

KW802 12-01-2004 05:12 PM

[high]* KW802 clicks install for future usage/reference. :D[/high]

docvader 12-14-2004 05:02 AM

Works great. Very imaginative and creative. But, you have to make more changes if you want to upload video, yes?

Quote:

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.
This does not change the default ".mp3" that pops up within the new media tags, as a file extension. Or, have I done something wrong?

rich

ericgtr 12-14-2004 12:31 PM

Quote:

Originally Posted by docvader
Works great. Very imaginative and creative. But, you have to make more changes if you want to upload video, yes?



This does not change the default ".mp3" that pops up within the new media tags, as a file extension. Or, have I done something wrong?

rich

Right, changing it to [MEDIA] (or anything else you want) is just a label, it will work the same either way. As for it playing video files etc. I think it really depends on your personal version of the player I have heard reports that it works for some and not others.


Also, if you want to use .avi (or another extension) for example you would need to specifiy it here in the newattachmentbit, the user may also simply change it after pasting it into the post:

Code:

<b>[MP3]http://www.yoursite.com/vb/attachment.php?attachmentid=$attach[attachmentid].avi[/MP3]</b>

docvader 12-14-2004 07:47 PM

Yes, understand. Awesome thing you've done here. But, it shouldn't be too difficult for you guys to expand on this, and list options (mpg, mpeg, avi, mpeg4, etc) that users can click on, in a radio box, and have the copy and paste code change automatically. Or, take it one more step, have it insert into the post automatically after the file type changes. Just a thought.

As I'm far from a coding genius, this would be beyond me. But, I don't think it would be something too difficult for you guys to accomplish. And it would make for a great improvement to a wonderful hack.

Oh, and I tried changing it to "media" for the hell of it, and I screwed it up. Not sure what I did, but it didn't work too well. (Works great, as per your specific directions, and very easy to install. Congrats!)

rich
russbo.com

ericgtr 12-14-2004 07:56 PM

Quote:

Originally Posted by docvader
Yes, understand. Awesome thing you've done here. But, it shouldn't be too difficult for you guys to expand on this, and list options (mpg, mpeg, avi, mpeg4, etc) that users can click on, in a radio box, and have the copy and paste code change automatically. Or, take it one more step, have it insert into the post automatically after the file type changes. Just a thought.

As I'm far from a coding genius, this would be beyond me. But, I don't think it would be something too difficult for you guys to accomplish. And it would make for a great improvement to a wonderful hack.

Oh, and I tried changing it to "media" for the hell of it, and I screwed it up. Not sure what I did, but it didn't work too well. (Works great, as per your specific directions, and very easy to install. Congrats!)

rich
russbo.com

Thanks, great suggestions. My knowledge of this stuff is still pretty limited but I am learning more every day :) As for making the change, I have found that I needed to delete my bbcode and re-add it again when making that change, give it a shot and it should work for you.

docvader 12-14-2004 08:36 PM

Ericgtr, here, check this out, re adding buttons to automatically insert code???

https://vborg.vbsupport.ru/showthread.php?t=69855

Looking forward to your next iteration. You're doing a great job with this.

rich
russbo.com


All times are GMT. The time now is 04:32 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.01484 seconds
  • Memory Usage 1,838KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete