Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: nikan on May 14, 2010, 02:16:29 AM

Title: JW Player
Post by: nikan on May 14, 2010, 02:16:29 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2529)

Introduction
JW Player mod integrates JW Player (http://www.longtailvideo.com) 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
Title: Re: JW Player
Post by: divecall on May 22, 2010, 08:38:22 AM
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 ?
Title: Re: JW Player
Post by: vicram10 on May 22, 2010, 09:06:03 AM
nice mod...

@divecall

try

In Sources/Subs-Editor.php

Find

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

Replace with

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

and test it
Title: Re: JW Player
Post by: divecall on May 22, 2010, 04:27:45 PM
Thank you, problem solved...

great mod (and great support !).
Title: Re: JW Player
Post by: vicram10 on May 22, 2010, 05:36:04 PM
you're welcome ;)
Title: Re: JW Player
Post by: Mick. on May 22, 2010, 05:37:18 PM
I like this.  Very cool man ;)
Title: Re: JW Player
Post by: 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.
Title: Re: JW Player
Post by: nikan on May 23, 2010, 10:05:53 AM
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
Title: Re: JW Player
Post by: 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
Title: Re: JW Player
Post by: 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
Title: Re: JW Player
Post by: nikan on May 25, 2010, 01:37:37 PM
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.

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.
Title: Re: JW Player
Post by: BobDoyle on May 26, 2010, 12:47:20 PM
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.
Title: Re: JW Player
Post by: nikan on May 26, 2010, 05:27:49 PM
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
Code: [Select]
array(
'image' => 'jwp',
'code' => 'jwp',
'before' => '[jwp=width,height,image]',
'after' => '[/jwp]',
'description' => $txt['jwplayer']
),
/Sources/Subs.php
Code: [Select]
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
Code: [Select]
'jwp' => array('code' => 'jwp', 'before' => '[jwp=width,height,image]', 'after' => '[/jwp]', 'description' => $txt['jwplayer']),/Sources/Subs.php
Code: [Select]
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>',
),
Title: Re: JW Player
Post by: - danny on June 01, 2010, 10:40:02 PM
nikan,

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

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

which points to:
Code: [Select]
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:

Code: [Select]
'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?
Title: Re: JW Player
Post by: nikan on June 02, 2010, 01:01:36 AM
Edit file Sources/Subs.php

Find:
Code: [Select]
global $txt, $scripturl, $context, $modSettings, $user_info;
Replace:
Code: [Select]
global $txt, $scripturl, $context, $modSettings, $user_info, $settings;
Title: Re: JW Player
Post by: - danny on June 02, 2010, 10:06:58 PM
i think that was it. :)

thank you!
Title: Re: JW Player
Post by: simmi2121 on August 23, 2010, 04:10:55 AM
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 ?
Title: Re: JW Player
Post by: nikan on August 23, 2010, 10:25:39 AM
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 (http://www.longtailvideo.com/support/jw-player-setup-wizard) wizard to get the code.
Title: Re: JW Player
Post by: simmi2121 on August 23, 2010, 10:33:45 AM
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

Title: Re: JW Player
Post by: nikan on August 24, 2010, 12:34:17 AM
If you haven't got a portal mod installed you must put the code of the JW Player in the index.template.php
Title: Re: JW Player
Post by: yakyakyak on September 01, 2010, 06:19:41 AM
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

Code: [Select]
http://askusaquestion.net/index.php?board=53.0
Title: Re: JW Player
Post by: 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.
Title: Re: JW Player
Post by: nazamarya on September 05, 2010, 11:21:16 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..
Title: Re: JW Player
Post by: Ataru Moroboshi on September 29, 2010, 11:19:17 AM
don't know, if it's possible, how to set preview image... any help?

using that code:

Code: [Select]
[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:
Code: [Select]
[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]
Title: Re: JW Player
Post by: eyeseven on February 24, 2011, 09:36:25 AM
please update it for RC5..
Title: Re: JW Player
Post by: nikan on February 24, 2011, 12:38:02 PM
Updated for 2.0 RC5
Title: Re: JW Player
Post by: eyeseven on February 25, 2011, 04:40:41 PM
Updated for 2.0 RC5

thanks so much nikan! :D
Title: Re: JW Player
Post by: Bodacious on May 04, 2011, 12:16:50 PM
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 ?
Title: Re: JW Player
Post by: ʜᴏᴍɪᴄɪᴅᴇ on July 01, 2011, 07:16:50 PM
is it possible to use this MOD as a music player for Profile's
Title: Re: JW Player
Post by: Dain on July 03, 2011, 06:33:43 AM
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
Title: Re: JW Player
Post by: ʜᴏᴍɪᴄɪᴅᴇ on July 15, 2011, 06:46:12 AM
is it possible to use this mod as a profile song player?
Title: Re: JW Player
Post by: Wallace.D on August 02, 2011, 08:50:38 PM
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:

Code: [Select]
[jwp=425,344,image]ftp://prodigal@ftp.XXXXXXXforum.XXXXXX.com/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!
Title: Re: JW Player
Post by: Wallace.D on August 06, 2011, 06:39:12 AM
Bump
Title: Re: JW Player
Post by: Wallace.D on August 17, 2011, 10:14:08 PM
Thanks for all of your help everyone, especially Nikan.

Er, wait... nevermind.

Thanks for nothing.

Title: Re: JW Player
Post by: nikan on October 26, 2011, 02:37:53 PM
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
Title: Re: JW Player
Post by: Mr. Pirate on November 24, 2011, 11:20:52 AM
Is there anyway I can only make this available to admins only?
Title: Re: JW Player
Post by: Mr. Pirate on November 24, 2011, 08:11:43 PM
Is there anyway I can only make this available to admins only?

Bump!
Title: Re: JW Player
Post by: nikan on November 25, 2011, 04:29:24 AM
In file /Sources/Subs-Editor.php

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

Add after:
Code: [Select]
if (!$context['user']['is_admin'])
$disabled_tags[] = 'jwp';
Title: Re: JW Player
Post by: Mr. Pirate on November 26, 2011, 03:06:46 AM
In file /Sources/Subs-Editor.php

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

Add after:
Code: [Select]
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.
Title: Re: JW Player
Post by: nikan on November 26, 2011, 11:31:48 AM

Bump!

Ηasty, hasty...


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.
Title: Re: JW Player
Post by: Mr. Pirate on November 26, 2011, 02:06:38 PM
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".
Title: Re: JW Player
Post by: nikan on November 27, 2011, 02:56:50 AM
Did you empty the cache of your internet browser?
Title: Re: JW Player
Post by: Mr. Pirate on November 27, 2011, 01:49:17 PM
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.
Title: Re: JW Player
Post by: Mr. Pirate on November 27, 2011, 05:23:48 PM
It worked!! Sorry I placed the code under the wrong place!

Thanks, nikan
Title: Re: JW Player
Post by: JFFP on May 23, 2014, 12:24:22 PM
How i can play videos from a different host?
Title: Re: JW Player
Post by: engrz on May 10, 2016, 09:26:37 AM
is this mod working on smf 2.0.11?
Title: Re: JW Player
Post by: Grammy on May 10, 2016, 09:39:22 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.   :)
Title: Re: JW Player
Post by: engrz on May 10, 2016, 11:05:09 AM
I have installed it, and it is working fine
Title: Re: JW Player
Post by: naijacrux on December 13, 2017, 02:52:44 AM
doesnt work for me
Title: Re: JW Player
Post by: Rock Lee on December 14, 2017, 07:51:08 PM
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!
Title: Re: JW Player
Post by: 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?
Title: Re: JW Player
Post by: Rock Lee on December 03, 2019, 10:24:23 AM
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!
Title: Re: JW Player
Post by: Kathryn_ on December 03, 2019, 01:37:33 PM
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