vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - OwnPlayer - Your own video player (https://vborg.vbsupport.ru/showthread.php?t=272051)

Nano_ 10-13-2011 10:00 PM

OwnPlayer - Your own video player
 
1 Attachment(s)
This BBCode allows you create an own video player.


Instructions:

1) Download JWPlayer (Free or Pro, you choose) here.

2) Unzip to temp folder and send to your host, following the instructions below:
Quote:

2.1) Create a folder inside of your forum root folder, called ownplayer
2.2) Inside this ownplayer folder, create other 3 folders called js, skins and videos
2.3) Put jwplayer.js and swobject.js inside js folder
2.4) Put player.swf in your FORUM ROOT FOLDER
2.5) If you find any skins do you like, put this zip in skins folder (i use this)

3) Go to your AdminCP > Custom BB Codes > Add New BB Code.

Title: OwnPlayer Video
BB Code Tag Name: ownplayer
Replacement:
Code:

<div align="center">
<p id='preview'></p>
<script type='text/javascript' src='js/swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','560','340','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=ownplayer/videos/{param}&skin=ownplayer/skins/bekle.zip&logo=ownplayer/logo.png');
s1.addParam('plugins', 'plugins=hd-1', 'plugins=gapro-1&gapro.accountid=UA-GOOGLEANALYTICSHERE');
s1.addParam('hd.file', 'ownplayer/videos/{param}');
s1.write('preview');
</script>
</div>

Use {option}: NO
Remove Tag If Empty: NO
Disable BB Code Within This BB Code: YES
Disable Smilies Within This BB Code: YES
Disable Word Wrapping Within This BB Code: YES
Button Image (Optional): Attachment 133806


4) Change "UA-GOOGLEANALYTICSHERE" to your Google Analytics ID. If you don't have one, just delete this "'plugins=gapro-1&gapro.accountid=UA-GOOGLEANALYTICSHERE'"

5) Put your logo in ownplayer folder, with logo.png name (140px x 56px)

6) Put your:
Videos
in path/to/your/forum/ownplayer/videos;
Skins in path/to/your/forum/ownplayer/skins and change bold blue in code.


Example: [ownplayer]example.flv[/ownplayer]

Attachment 133807

--
+ Know Problems:
- Works only with one video per page (it's a JW Player's limitation, i think).

+ Notes:
- Tested in 4.0 to 4.1.5 PL1;
- Sorry for my poor english;
- I made this code because I needed it for my forums. I'm not a programmer.

Nano_ 10-14-2011 06:41 PM

reserved.

dvL-den 10-24-2011 11:08 PM

Ok, this bbcode is working perfect, but one question... how I can turn off the video menu? I don't want this option in the video player.

cbiweb 10-10-2012 01:32 PM

This needs to be changed because JWPlayer is different now. For one thing, there is no swobject.js file anymore, making the bbcode not work.

Smiler2009 11-25-2012 07:11 PM

This is the code I use for JWPlayer6. I'm using JWPlayer6 Pro but the free version will work identically.

<script src="/jwplayer/jwplayer.js"></script>

<div id='my-video'></div>
<script type='text/javascript'>
jwplayer('my-video').setup({
file: 'path/to/your/video/folder/{param}',
width: '480',
height: '270'
});
</script>

{param} is the filename of the video/audio file to be passed to the code.
All you need do is to make sure the video is uploaded into the folder you specify in the code, type the filename in a forum post, highlight it and click the icon.

Works very well indeed. If you reduce the height to 30 the player will switch into audio mode and display the audio control bar so you can also add an [AUDIO] tag if you wish.

Hope this helps

Jeff.


All times are GMT. The time now is 06:45 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.00974 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete