News:

Join the Facebook Fan Page.

Main Menu

JW Player

Started by nikan, May 14, 2010, 02:16:29 AM

Previous topic - Next topic

nikan

Link to Mod

Introduction
JW Player mod integrates JW Player into SMF and adds a bbcode button to insert video and audio files.
The files must reside on the same server, except youtube videos.

JW Player License:
For non-commercial use the JW Player 5 for Flash is licensed as open source software under a non-commercial variation of the Create Commons License.

Features
* Adds a BBCode button to insert flv,swf,mp4,mp3,aac files
* Uses JW Player to play the files

Languages
english
english-utf8
greek
greek-utf8

History
1.1 - Added parameter for preview image
1.0 - Initial release

divecall

Thank you for this mod. Its a good and nice one.

But i have a little problem: it is necessary, that the movie is hosted on my server. so in my case, only the admin (me) can show the movie. it´s ok, but i know the BBC-code now. How can i delete the button in the posting area ? it is not necessary for the other, because they never can upload movies...
how can i delete the marked button in the picture ?

vicram10

nice mod...

@divecall

try

In Sources/Subs-Editor.php

Find


array(
'image' => 'jwp',
'code' => 'jwp',
'before' => '[jwp=425,344]',
'after' => '[/jwp]',
'description' => $txt['jwplayer']
),


Replace with


/* array(
'image' => 'jwp',
'code' => 'jwp',
'before' => '[jwp=425,344]',
'after' => '[/jwp]',
'description' => $txt['jwplayer']
),
*/


and test it

divecall

Thank you, problem solved...

great mod (and great support !).

vicram10


Mick.

I like this.  Very cool man ;)

gbsothere

#6
Just a quick comment...  The instructions (1.1.11, default) for manual installation are:

Move the included file "player.swf" to "./Themes/default".
Move the included file "swfobject.js" to "./Themes/default".
Move the included file "yt.js" to "./Themes/default".
Move the included file "jwp.gif" to "./Themes/default/images/bbc"

There is no "yt.js" in the zip, but there is a "yt.swf".  I'm sure that's what you meant, but I thought you might not mind if I pointed it out, in case you wanted to make a slight change in the parsing instructions?

:) 



ETA:  Great mod; works beautifully.  Thank you.
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

nikan

Quote from: gbsothere on May 22, 2010, 05:41:57 PM
Just a quick comment...  The instructions (1.1.11, default) for manual installation are:

Move the included file "player.swf" to "./Themes/default".
Move the included file "swfobject.js" to "./Themes/default".
Move the included file "yt.js" to "./Themes/default".
Move the included file "jwp.gif" to "./Themes/default/images/bbc"

There is no "yt.js" in the zip, but there is a "yt.swf".  I'm sure that's what you meant, but I thought you might not mind if I pointed it out, in case you wanted to make a slight change in the parsing instructions?

:) 



ETA:  Great mod; works beautifully.  Thank you.

Fixed and updated the package. Thanks gbsothere

BobDoyle

I didn't see this addressed, but I'm wondering about any plans to add the ability to add other JWPlayer parameters like image, autostart, skin, etc.)

Is it safe to assume that I can go to the source code added and hardcode those values if they are consistent throughout the forum (and point to my licensed JWPlayer if I want?)

Thanks,

Bob

jaisi

i have just install this mod but i don't know how to  upload mp3 Files ?? please guide me

nikan

Quote from: BobDoyle on May 25, 2010, 09:40:42 AM
I didn't see this addressed, but I'm wondering about any plans to add the ability to add other JWPlayer parameters like image, autostart, skin, etc.)

Is it safe to assume that I can go to the source code added and hardcode those values if they are consistent throughout the forum (and point to my licensed JWPlayer if I want?)

Thanks,

Bob

I made a modified version for my demo site with image parameter but you can add any parameter you want at your site and if you are kind enough you can post here any change you make as long it is for the non-commercial version of jw5.
Yes you can do changes in the code to point to your licensed JWPlayer.

Quote from: jaisi on May 25, 2010, 10:55:31 AM
i have just install this mod but i don't know how to  upload mp3 Files ?? please guide me
Install an ftp client software in your pc and the rest is easy.

BobDoyle

Quote

I made a modified version for my demo site with image parameter but you can add any parameter you want at your site and if you are kind enough you can post here any change you make as long it is for the non-commercial version of jw5.
Yes you can do changes in the code to point to your licensed JWPlayer.

I may have given the impression that I would actually know how to add parameters through modification of code. I can probably figure out how to hard code specific values, but not how to modify the code so I could do something like [jwp image=http://xxxx 200,200]

If you have modified code to do something like this, where would I find an example of it? If I could see it I might have enough knowledge to use that as a start to add other parameters as needed.

nikan

You can add parameters inside the [jwp=425,344] like this [jwp=width,height,image] and add them in the code.
To add preview image use this code:

SMF 2

/Sources/Subs-Editor.php
array(
'image' => 'jwp',
'code' => 'jwp',
'before' => '[jwp=width,height,image]',
'after' => '[/jwp]',
'description' => $txt['jwplayer']
),

/Sources/Subs.php
array(
'tag' => 'jwp',
'type' => 'unparsed_commas_content',       
'content' => '<object type="application/x-shockwave-flash" data="' . $settings['default_theme_url'] . '/player.swf" width="$2" height="$3"><param name="movie" value="' . $settings['default_theme_url'] . '/player.swf" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="WMode" value="transparent" /><param name="FlashVars" value="file=$1&image=$4" />$1</object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),


SMF 1

/Themes/default/Post.template.php
'jwp' => array('code' => 'jwp', 'before' => '[jwp=width,height,image]', 'after' => '[/jwp]', 'description' => $txt['jwplayer']),
/Sources/Subs.php
array(
'tag' => 'jwp',
'type' => 'unparsed_commas_content',       
'content' => '<object type="application/x-shockwave-flash" data="' . $settings['default_theme_url'] . '/player.swf" width="$2" height="$3"><param name="movie" value="' . $settings['default_theme_url'] . '/player.swf" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="WMode" value="transparent" /><param name="FlashVars" value="file=$1&image=$4" />$1</object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),

- danny

nikan,

was checking my error log and i'm getting something strange listed.

8: Undefined variable: settings
File: /home/xxxxxx/public_html/Sources/Subs.php
Line: 1294


which points to:
array(
'tag' => 'jwp',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',       
'content' => '<object type="application/x-shockwave-flash" data="' . $settings['default_theme_url'] . '/player.swf" width="$2" height="$3"><param name="movie" value="' . $settings['default_theme_url'] . '/player.swf" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="WMode" value="transparent" /><param name="FlashVars" value="file=$1" />$1</object>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),


specifically, line 1294 is:

'content' => '<object type="application/x-shockwave-flash" data="' . $settings['default_theme_url'] . '/player.swf" width="$2" height="$3"><param name="movie" value="' . $settings['default_theme_url'] . '/player.swf" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="WMode" value="transparent" /><param name="FlashVars" value="file=$1" />$1</object>',

any clue what this is about?

nikan

#14
Edit file Sources/Subs.php

Find:
global $txt, $scripturl, $context, $modSettings, $user_info;

Replace:
global $txt, $scripturl, $context, $modSettings, $user_info, $settings;

- danny

i think that was it. :)

thank you!

simmi2121

its like i want to add mp3 player on my site with my playlist .... m unable to do it ...  i want it on my main index ... and the playlist + song i will put it in my hosting area ... so that it can directly play on site ... in simply i want a simple media player for my main page

i think JW player of works in posting area only ?

nikan

Yes, this mod is only for posting area.
If you have installed JW Player mod create a html or php block from your portal and put the necessary code inside it.
Use this wizard to get the code.

simmi2121

very thanks 4 replying my dear bro .... but bro i want on my main page ... is there any player in ur knowledge bro that plays music on my main index page


nikan

If you haven't got a portal mod installed you must put the code of the JW Player in the index.template.php

yakyakyak

Adding Portal block code using the Integrated Portal option will make your existing forum look seamless with the added benefit of adding useful blocks anywhere on your forum


http://askusaquestion.net/index.php?board=53.0

nazamarya

jw player mode http://custom.simplemachines.org/mods/index.php?mod=2529 board.

I've added videos has opened firefox. but it also does not open explorer.

I've added links to videos on their site explorer is opened, but my explorer does not open my SMF forum.

Do smf jw player problem? Thank you.

nazamarya

Quote from: nazamarya on September 05, 2010, 11:12:27 AM
jw player mode http://custom.simplemachines.org/mods/index.php?mod=2529 board.

I've added videos has opened firefox. but it also does not open explorer.

I've added links to videos on their site explorer is opened, but my explorer does not open my SMF forum.

Do smf jw player problem? Thank you.

attached images..

Ataru Moroboshi

#23
don't know, if it's possible, how to set preview image... any help?

using that code:

[jwp=425,344,image]http://www.sslazio.it/images/stories/videos/conferenza zarate.flv[/jwp]

i got just a black screen, no image.

ok, got it...

i have to put that code:
[jwp=425,344,http://www.sslazio.it/components/com_gk2_photoslide/images/thumbm/967694zarate_20conf.jpg]http://www.sslazio.it/images/stories/videos/conferenza zarate.flv[/jwp]

eyeseven

please update it for RC5..


eyeseven


Bodacious

Great Mod , thank you very much!

I'm using version 1.1.13 and was wondering if there's a way to change the default skin to one that fits my needs better ?

ʜᴏᴍɪᴄɪᴅᴇ

is it possible to use this MOD as a music player for Profile's


Dain

#29
Hi
I want to know that ,,,where will we upload audio files using ftp client.....and what address will we add in the JW tag .....and what code should we use to embed it to Adk portal.........

I just installed the JW player , and have installed ADK Portal in SMF 2.0 ;

it4u.net63.net

I Dont know that where should I upload my files on my Site, and how to use them with JW code
Please Experts help me in this

Thanks with Regards

ʜᴏᴍɪᴄɪᴅᴇ

is it possible to use this mod as a profile song player?


Wallace.D

Hi nikan, everyone,

I've installed JW Player on SMF 2.0... Everything seems to have worked fine on the install but I can't seem to get it to work. When I try to post video the player is visible but no video - just an error message on the screen:

"Video not found or access denied"

For what reason might access be denied? How do I enable access? This is very frustrating... especially seeing that others here seem to have had no problems in using this mod!

I uploaded the video (mp4) using Filezilla to the 'Public_html' folder on my server... then by right-clicking on it, I copied the URL to my clipboard then pasted it into the BBC code as follows:

[jwp=425,344,image]ftp://[email protected]/public_html/Fox%20News%Hacked_.mp4[/jwp]

Can anyone tell me what I'm doing wrong or why this thing won't work?

I'm basically having the same issues as Dain above (except I don't have a 'portal' - Do I need one?) in that I'm not sure where exactly on the server to upload the video to... then once it's there - I have no idea how to link to it so that it will play.

I've searched now for about 3 days trying to figure this out on my own but to no avail, so I've come to humble myself and ask you fine folks for help with this. Not to be overly critical but you would think that these basic instructions on how to use this mod would be included here...

If I'm having these issues - I think we can be sure that others (such as Dain) have had them too.

Thanks in advance to anyone willing to help me out here!

Wallace.D


Wallace.D

Thanks for all of your help everyone, especially Nikan.

Er, wait... nevermind.

Thanks for nothing.


nikan

Is it obvious? I really hope you figure it out by now.

You used an ftp address with username and probably a password and the proper use is http://domain.com/video.mp4

Mr. Pirate

Is there anyway I can only make this available to admins only?

Mr. Pirate

Quote from: Mr. Pirate on November 24, 2011, 11:20:52 AM
Is there anyway I can only make this available to admins only?

Bump!

nikan

#37
In file /Sources/Subs-Editor.php

Find:
if (empty($modSettings['enableEmbeddedFlash']))
$disabled_tags[] = 'flash';


Add after:
if (!$context['user']['is_admin'])
$disabled_tags[] = 'jwp';

Mr. Pirate

Quote from: nikan on November 25, 2011, 04:29:24 AM
In file /Sources/Subs-Editor.php

Find:
if (empty($modSettings['enableEmbeddedFlash']))
$disabled_tags[] = 'flash';


Add after:
if (!$context['user']['is_admin'])
$disabled_tags[] = 'jwp';


It didn't work. I made a test account and it is still visible to regular members.

nikan

#39
Quote from: Mr. Pirate on November 24, 2011, 08:11:43 PM

Bump!

Ηasty, hasty...

Quote from: Mr. Pirate on November 26, 2011, 03:06:46 AM

It didn't work. I made a test account and it is still visible to regular members.

...hasty again.

I did my tests before posting the modification.
The button is only visible to admins, the posted video is visible to all.
Clear forum and browser cache.

Mr. Pirate

It doesn't work, I cleared the cache, emptied out logs, and other maintenance and still it didn't work. It says on the test account when I create a topic "Insert flash video".

nikan

Did you empty the cache of your internet browser?

Mr. Pirate

Yes, but its still visible to regular members. In the next version can you put permissions? I don't want new members posting porn or anything you know.

Mr. Pirate

It worked!! Sorry I placed the code under the wrong place!

Thanks, nikan

JFFP

How i can play videos from a different host?

engrz

is this mod working on smf 2.0.11?

Grammy

#46
Quote from: engrz on May 10, 2016, 09:26:37 AM
is this mod working on smf 2.0.11?


I haven't had a chance to play around with it yet, but I did upload the zip through my 2.0.11 package manager and it installed cleanly with no errors.  If that helps at all...   :)

Edit:  Uploaded a video to my server and tested it and it works beautifully.  No errors.   :)

engrz

I have installed it, and it is working fine

naijacrux


-Rock Lee-

Quote from: naijacrux on December 13, 2017, 02:52:44 AM
doesnt work for me

What kind of problem did he give you? In the error logs does something appear? It has to be something more explanatory if you want help.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Kathryn_

I know this post is old but I so want to use jplayer on my ebook site..I can then put evrything in one post. the problem is how can I add more than one link from libriVox? Is thre a way to have a playlist with this mod?

-Rock Lee-

Quote from: Kathryn_ on December 02, 2019, 07:54:35 PM
I know this post is old but I so want to use jplayer on my ebook site..I can then put evrything in one post. the problem is how can I add more than one link from libriVox? Is thre a way to have a playlist with this mod?

In theory I would not have problems although when creating lists it may not work quite well, at least with the tests I did quickly.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Kathryn_

Ok well it was a thought at best  :)  Its impossible for me to get the version of jplayer on my site so I thought I could write a code to the exixting mod but since I am nit a developer I thought it best not to...It won't accept Utube audiobooks either though

Advertisement: