vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   AnyMedia BBCode for 3.5.x (https://vborg.vbsupport.ru/showthread.php?t=106239)

akanevsky 02-05-2006 04:24 PM

Great, will install later.

docvader 02-05-2006 04:31 PM

Understand.

Since I'm technologically impaired here, can you please tell me what code to alter to force the browsers to use WMP for all the video files (mpeg and mpg).

And what part of China are you in? I've traveled the country extensively.

Thanks!
rich

9tn.tip. 02-05-2006 05:27 PM

very nice thanks!! installed!

tomraider 02-06-2006 06:01 AM

work well , thanks

Crist 02-06-2006 09:38 AM

Quote:

Originally Posted by docvader
Understand.

Since I'm technologically impaired here, can you please tell me what code to alter to force the browsers to use WMP for all the video files (mpeg and mpg).

And what part of China are you in? I've traveled the country extensively.

Thanks!
rich

Edit the Code in class_bbcode.php

Search:

PHP Code:

                    case 'mpeg':
                    case 
'mpg':
                    case 
'm1s':
                    case 
'm1v':
                    case 
'm1a':
                    case 
'm75':
                    case 
'm15':
                    case 
'mp2':
                    case 
'mpm':
                    case 
'mpv':
                    case 
'mpa':
                        
$media['mime']='video/x-mpeg';
                        
$media['type']='quick_time';
                        break; 

Replace with

PHP Code:

                    case 'mpeg':
                    case 
'mpg':
                    case 
'm1s':
                    case 
'm1v':
                    case 
'm1a':
                    case 
'm75':
                    case 
'm15':
                    case 
'mp2':
                    case 
'mpm':
                    case 
'mpv':
                    case 
'mpa':
                        
$media['mime']='video/x-mpeg';
                        
$media['type']='windows_media';
                        break; 

Done.


I Live in Wuhan,
do you know it?
:)

docvader 02-06-2006 04:16 PM

OK, got it. Still doesn't work, but it's calling to windows media player in my source
Quote:

case 'mpeg':
case 'mpg':
case 'm1s':
case 'm1v':
case 'm1a':
case 'm75':
case 'm15':
case 'mp2':
case 'mpm':
case 'mpv':
case 'mpa':
$media['mime']='video/mpeg';
$media['type']='windows_media';
Used mime type 'video/x-mpeg' also, to no avail. (I use 'video/mpeg', and other hacks work with this no problem)

Is there somewhere else (forum permissios) that I need to look at? I have overlooked something, somewhere, and I just know that it has to be something really simple... Usergroup permissions are set.

Never been to Wuhan. I train in gong fu in Henan, and have traveled western, northern, and a bit of eastern China quite a bit. Wonderful country. Just some absolutely incredible places to see and experience, especially Yunnan.

Thanks!
rich

sinoeu 02-06-2006 04:28 PM

Quote:

Originally Posted by docvader
Never been to Wuhan. I train in gong fu in Henan, and have traveled western, northern, and a bit of eastern China quite a bit. Wonderful country. Just some absolutely incredible places to see and experience, especially Yunnan.
rich

With 8 million people and lots of universities and a French consulate, Wuhan is a big industrial city in the central China, like Chicago in US. ;)

As to gong fu, you have made the right choice: Henan :rolleyes:

docvader 02-06-2006 04:53 PM

It's a Mozilla thing. I've done some investigating here, hope this helps:

When using Mozilla based Netscape Navigator

Pagesource when I use [MEDIA=0,0,0,wmv]: This works well, though it autoplays when it was told not to:

Quote:

<!-- Windows Media -->
<object data="http://www.russbo.org/files/video/military/wmpruss.mpeg" type="application/x-mplayer2" width="640" height="480" class="player_mozilla">
<param name="autoplay" value="false" />
</object>

<!--[if IE]>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640" height="480">
<param name="autoplay" value="false" />
<param name="filename" value="http://www.russbo.org/files/video/military/wmpruss.mpeg" />
</object>
<![endif]-->
Pagesource when I use latest bbcode edited php file (to make it use WMP), your standard hack:This shows NO player and does not work:

Quote:

<!-- Windows Media -->
<object data="http://www.russbo.org/files/video/military/wmpruss.mpeg" type="video/mpeg" width="640" height="480" class="player_mozilla">
<param name="autoplay" value="false" />
</object>

<!--[if IE]>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640" height="480">
<param name="autoplay" value="false" />
<param name="filename" value="http://www.russbo.org/files/video/military/wmpruss.mpeg" />
</object>
<![endif]-->




When using Internet Explorer, your hack works perfectly, as written.

This is the page source:

Quote:

<!-- Windows Media -->
<object data="http://www.russbo.org/files/video/military/wmpruss.mpeg" type="video/mpeg" width="640" height="480" class="player_mozilla">
<param name="autoplay" value="false" />
</object>
<!--[if IE]>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640" height="480">
<param name="autoplay" value="false" />
<param name="filename" value="http://www.russbo.org/files/video/military/wmpruss.mpeg" />
</object>
<![endif]-->

It's a Mozilla thing. I don't know how to fix it, but, that's the problem.

Never been to Wuhan. Have a monk teacher/friend who teaches at their Wushu University there. I hear that it's an excellent sports university. My travels have taken me to Xinjiang, Yunnan, Tibet, Harbin, Xian, Huangshan/Guilin areas, among others. Definitelly have to return to Chengdu/Tibet/Yunnan part of your country. It is phenomenal!

Crist 02-06-2006 05:04 PM

I think you may add me to your msn list or etc.
I'll tell you how to handle the prob.

My contact method is in the zip file,
on the install guide page.

PS. I'm so glad to know that you like our country. :)

Crist 02-06-2006 05:09 PM

Quote:

Originally Posted by sinoeu
With 8 million people and lots of universities and a French consulate, Wuhan is a big industrial city in the central China, like Chicago in US. ;)

As to gong fu, you have made the right choice: Henan :rolleyes:

If I answered "Ichang" and how do you introduce it?
LOL

chrisciardi 02-06-2006 08:32 PM

this looks like a super complete hack, however, i cannot seem to get it to even show up on my board. everything installed per instructions but no media player. the only other hacks i use are vbportal and templates hack

can anyone help me, as i really need video to take my forum live

thanks a million
chris

www.thinktalk.com/forum

Guest210212002 02-06-2006 10:30 PM

Is it possible to have this not buffer the clip before loading the page? I'm noticing some long load times on pages that have good sized attachments.

docvader 02-06-2006 11:13 PM

chriciardi, look at my posts immediately above. You might have better luck changing the bbcode.php edit to use windows media instead of quicktime.

It is a fantastic hack, but I'm having mozilla issues with it. Nothing that can't be fixed, I'm sure.

Andreas 02-07-2006 01:24 AM

Suggestion to turn this into a Plugin
  1. Put functions handle_bbcode_media() and format_size() into its own PHP file, place it in includes
    Btw.: format_size() is redundant; vb_number_format() has a parameter to format the ouput as filesize.
  2. Change the signature to
    PHP Code:

    handle_bbcode_media(&$parser$text$options=''

  3. Change all $this in function handle_bbcode_media() into $parser
  4. Change the Plugin on bbcode_fetch_tags to have
    PHP Code:

    'callback' => 'handle_external',
    'external_callback' => 'handle_bbcode_media' 

    Also make sure you require the file with your functions here.

=> No more file edits.

sinoeu 02-07-2006 09:45 AM

Quote:

Originally Posted by Crist
If I answered "Ichang" and how do you introduce it?
LOL

The city with the biggest dam of the world. OVER :rolleyes:

Crist 02-07-2006 08:05 PM

Quote:

Originally Posted by Andreas
Suggestion to turn this into a Plugin
  1. Put functions handle_bbcode_media() and format_size() into its own PHP file, place it in includes
    Btw.: format_size() is redundant; vb_number_format() has a parameter to format the ouput as filesize.
  2. Change the signature to
    PHP Code:

    handle_bbcode_media(&$parser$text$options=''

  3. Change all $this in function handle_bbcode_media() into $parser
  4. Change the Plugin on bbcode_fetch_tags to have
    PHP Code:

    'callback' => 'handle_external',
    'external_callback' => 'handle_bbcode_media' 

    Also make sure you require the file with your functions here.

=> No more file edits.

Thanks very much for your suggestion, buddy. :)
I'm working on it now,and will release a new version later.

zagman76 02-07-2006 08:18 PM

I know it's on it's way - but the ability to restrict to particular forums would be terriffic!

Crist 02-07-2006 08:25 PM

Quote:

Originally Posted by Chris-777
Is it possible to have this not buffer the clip before loading the page? I'm noticing some long load times on pages that have good sized attachments.

Yes, there's a way.

W3C recommend us to use type="MIME" to call a media object.
It works well on Mozilla, Firefox, Opera and etc.

However, there's bug when we use IE to view it: It will download the whole file then play it. So you must wait for long before you could see the rest of the page.(You can even find that it sometimes display a blank object, it's another bug I think.)

So, to IE,
I use the traditional way to display it: just use the clsid.

Therefore,
It could be display perfectly on IE and other explorers.

So, if u don't care the bug,
just do as this:

edit the anymedia template

take adobe flash as example:

replace these codes
HTML Code:

                <object data="$media[url]" type="$media[mime]" width="$media[width]" height="$media[height]" class="player_mozilla">
                  <param name="play" value="$media[autoplay]" />
                  <param name="wmode" value="opaque" />
                  <param name="quality" value="high" />
                </object>
                <!--[if IE]>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$media[width]" height="$media[height]">
                  <param name="movie" value="$media[url]" />
                  <param name="play" value="$media[autoplay]" />
                  <param name="wmode" value="opaque" />
                  <param name="quality" value="high" />
                </object>
                <![endif]-->

To

HTML Code:

                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$media[width]" height="$media[height]">
                  <param name="movie" value="$media[url]" />
                  <param name="play" value="$media[autoplay]" />
                  <param name="wmode" value="opaque" />
                  <param name="quality" value="high" />
                </object>

and replace these codes

HTML Code:

<style type="text/css">
.player_mozilla{display:block;}
</style>
<!--[if IE]>
<style type="text/css">
.player_mozilla{display:none;}
</style>
<![endif]-->

To

HTML Code:

<style type="text/css">
.player_mozilla{display:block;}
</style>


Crist 02-07-2006 10:48 PM

[1.2.0]
[DEL] Codes Modifications (Thanks to Andreas's suggestion)
[CHG] Allow every group to use anymedia by default
[NEW] Templates Cache

[How to upgrade]
1.Re-import the XML file (Must).
2.Remove the codes we added to the class_bbcode.php.(Note:You could also skip the step, it'll work well too.)



Could anybody Move the thread to [vB3.5 Extensions] Forum?
It became an Extension just now. :)

sinoeu 02-07-2006 11:38 PM

Quote:

Originally Posted by Crist
It became an Extension just now. :)

Bravo!

Just another noob requst: can you include a sript to delete those old media BBcode buttons(MP3, WMV, RM...) that are no longer useful? :nervous:

camp nou 02-08-2006 03:28 PM

This is probably what I have been looking for.

But as a total noob I need som help to get it right.

I have followed the "How to install" guide as far as I can:

1.Extract and upload the files of the uploads folder;
Done!
2.Import the product-anymedia.xml in admincp;
Done!
3.Follow Templates Modifications, be careful and remember to save;
Done!
4.Follow Codes Modifications, be careful and remember to overwrite the old one;
Here is where I stop. What code is to be modified?
5.Log into the admincp and setup AnyMedia BBCode Options;
Can anybody tell me how to set up this?
6.Change the AnyMedia BBCode Permissions if it's necessary;
Ok. I'll do that later
7.Please read How to Use first;
Done. I think i will figure this one out.
8.All Done!

Thanks :nervous:

IrPr 02-08-2006 04:38 PM

Quote:

Originally Posted by camp nou
4.Follow Codes Modifications, be careful and remember to overwrite the old one;
5.Log into the admincp and setup AnyMedia BBCode Options;

4.Download New Version ( 1.2.0 ) ;) No Code Modifications Needed
5.vBOptions -> AnyMedia

All Done! ;)

Special Thanks to Andreas and Crist !

3dsoft 02-08-2006 05:45 PM

swf media files work without a problem but when I try to play a wmv file nothing happens. The media player loads but the movie doesn't show. Is there something which I have to consider when playing wmv files?

thanks for your help

Edit:
Okay, it seems that this problem only occurs when using the Opera browser. That means no .wmv files in Opera!

Internet Explorer and Firefox works without any problems.

Mr.D 02-09-2006 08:33 AM

Quote:

Originally Posted by 3dsoft
swf media files work without a problem but when I try to play a wmv file nothing happens. The media player loads but the movie doesn't show. Is there something which I have to consider when playing wmv files?

thanks for your help

Edit:
Okay, it seems that this problem only occurs when using the Opera browser. That means no .wmv files in Opera!

Internet Explorer and Firefox works without any problems.

Yes this happens to me to wmv files dont work in Opera when will this be fixed? By the way great HACK :banana: :banana: :banana: :banana: :rambo:

Crist 02-09-2006 11:07 AM

Quote:

Originally Posted by camp nou
This is probably what I have been looking for.

But as a total noob I need som help to get it right.

I have followed the "How to install" guide as far as I can:

1.Extract and upload the files of the uploads folder;
Done!
2.Import the product-anymedia.xml in admincp;
Done!
3.Follow Templates Modifications, be careful and remember to save;
Done!
4.Follow Codes Modifications, be careful and remember to overwrite the old one;
Here is where I stop. What code is to be modified?
5.Log into the admincp and setup AnyMedia BBCode Options;
Can anybody tell me how to set up this?
6.Change the AnyMedia BBCode Permissions if it's necessary;
Ok. I'll do that later
7.Please read How to Use first;
Done. I think i will figure this one out.
8.All Done!

Thanks :nervous:

Sorry, Step 4 is useless now.
I update the install guide just now.

docvader 02-09-2006 03:11 PM

Crist

Latest version: I have the same issue with the mpegs not playing (it wants QuickTime, instead of Windows Media Player). Now, I hate Microsoft as much as anyone else, and I am an Apple afficionado, but, let's face it, WMP has beaten QT when it comes to widespread availability.

Can you make a product that forces videos, other than the usual Mac file formats, to use WMP?

Thanks! Hope all is well over there in Wuhan. I'll be there this summer.

rich

chairman miaow 02-09-2006 03:16 PM

I'll second that ! I've done the code change from the earlier post , but it still tries to play mpegs and wmv using quick time :ermm:

Crist 02-09-2006 05:05 PM

Quote:

Originally Posted by docvader
Crist

Latest version: I have the same issue with the mpegs not playing (it wants QuickTime, instead of Windows Media Player). Now, I hate Microsoft as much as anyone else, and I am an Apple afficionado, but, let's face it, WMP has beaten QT when it comes to widespread availability.

Can you make a product that forces videos, other than the usual Mac file formats, to use WMP?

Thanks! Hope all is well over there in Wuhan. I'll be there this summer.

rich

Just the same way.

You could edit the product xml file.

Find
PHP Code:

                                case 'mpeg':
                                case 
'mpg':
                                case 
'm1s':
                                case 
'm1v':
                                case 
'm1a':
                                case 
'm75':
                                case 
'm15':
                                case 
'mp2':
                                case 
'mpm':
                                case 
'mpv':
                                case 
'mpa':
                                    
$media['mime']='video/x-mpeg';
                                    
$media['type']='quick_time'

Replace with

PHP Code:

                                case 'mpeg':
                                case 
'mpg':
                                case 
'm1s':
                                case 
'm1v':
                                case 
'm1a':
                                case 
'm75':
                                case 
'm15':
                                case 
'mp2':
                                case 
'mpm':
                                case 
'mpv':
                                case 
'mpa':
                                    
$media['mime']='video/x-mpeg';
                                    
$media['type']='windows_media'


docvader 02-09-2006 11:19 PM

Thought so. But still doesn't work in Netscape. Page source as follows:
Quote:

<!-- Windows Media -->
<object data="http://www.russbo.org/files/video/apache.mpeg" type="video/x-mpeg" width="640" height="480" class="player_mozilla">
<param name="autoplay" value="false" />
</object>

<!--[if IE]>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640" height="480">
<param name="autoplay" value="false" />
<param name="filename" value="http://www.russbo.org/files/video/apache.mpeg" />
</object>
<![endif]-->
Not getting a player.

And for some reason, when I type in a URL in IE advanced reply box, it automatically puts [url] tags on it, which annoys the player....

Tulsa 02-10-2006 12:54 AM

My question is on the autostart feature. I tossed up a wmv file to test with and that showed just fine but it seems to always autostart regardless of how I have the setting in the ACP.

Thoughts?

lonelime 02-10-2006 06:35 AM

same question above....

I dont want it autostart, how do i disable the autostart???

if possible, can this one setup like whole album song, instead of single, I can setup like 10 songs together, then i just click next song, and next song, thisone I have to setup single song on every page......

but anyway... this is really kool one i ever seen

thanks

icare 02-11-2006 03:50 AM

this is what i get in my post
[MEDIA]http://funcop.net/Army.swf[/MEDIA]

it doesnt show any media. Please advise what I am doing wrong?

Tulsa 02-11-2006 09:17 AM

If this is a link on your sites server, try using just /army.swf

Crist 02-11-2006 11:44 AM

Quote:

Originally Posted by icare
this is what i get in my post
[MEDIA]http://funcop.net/Army.swf[/MEDIA]

it doesnt show any media. Please advise what I am doing wrong?

Have you change the permissions ?

heeeh 02-11-2006 01:16 PM

太棒了!
tai bang le!

icare 02-11-2006 04:36 PM

Quote:

Originally Posted by Crist
Have you change the permissions ?


Which permissions do I need to change?
I dont think I have changed any permissions.
Please advise which permissions do I need to change and how?

lonelime 02-12-2006 05:39 AM

Quote:

Originally Posted by icare
Which permissions do I need to change?
I dont think I have changed any permissions.
Please advise which permissions do I need to change and how?


go to usergroups manager.... then you will see what Chris was taking about.....

btw..... this version is great

thanks again

docvader 02-12-2006 07:16 AM

Anyone figure out why Netscape Navigator is not pulling up WMP for mpegs? Editing the product.xml file doesn't pull up the player (though it does, flawlessly, in IE). Is there some simple setting that I'm missing somewhere?

packetattack 02-12-2006 08:06 AM

Installed under 3.5.3. Works great. Thanks!

icare 02-12-2006 06:26 PM

Quote:

Originally Posted by lonelime
go to usergroups manager.... then you will see what Chris was taking about.....

btw..... this version is great

thanks again

Kindly please explain me... I think I had already set permissions... a register user can view the thread content... I even tested login with admin user and still cant view that video.. please advise whats wrong wit it


All times are GMT. The time now is 07:05 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.02808 seconds
  • Memory Usage 1,903KB
  • 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
  • (4)bbcode_html_printable
  • (8)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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