latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

s2Stream short code URL problem?

Home Forums Community Forum s2Stream short code URL problem?

This topic contains 11 replies, has 3 voices. Last updated by  Jason (Lead Developer) 3 years, 9 months ago.

Topic Author Topic
Posted: Friday Mar 1st, 2013 at 6:24 pm #43538
Ira Feldman
Username: iradave

I can’t seem to get access level protection working correctly for downloadable files. I can access videos and PDF’s that are in s2member-files no problems. And it appears that mod_rewrite is working fine. (Can access both with & and non-parametered URL’s.). However, if I put the video in s2member-files/access-s2member-level1 it is not found even if logged in as admin (Level 4).

On s2member (Free) (I haven’t upgraded the plug in to PRO yet) this short code

[s2Stream player="jwplayer-v6" player_path="/wordpress/jwplayer/jwplayer.js" file_download="access-s2member-level1/testhaba.mp4" player_key="key-goes-here" rewrite="yes" /]

[Yes, I know my jwplayer is in a non-standard location.]

Produces this page source:

jwplayer('s2-stream-776a1e0d391fda43d912a76943d2668f').setup
	({
		playlist:
			[{
				title: '',
				image: '',

				mediaid: '',
				description: '',

				captions: [],

				sources: // Available sources.
					[
						{file: 'http://www.DOMAINNAME.org/wordpress/wp-content/plugins/s2member-files/s2member-file-stream-no/s2member-file-inline/access-s2member-level1%2Ftesthaba.mp4'}
					]
			}],

		controls: true,
		height: 270,
		skin: '',
		stretching: 'uniform',
		width: 480,

		autostart: false,
		fallback: true,
		mute: false,
		primary: 'flash',
		repeat: false,
		startparam: '',

		
	});

Is the problem the %2F in the URL? If so, how do I work around this?

Thanks,

Ira

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Friday Mar 1st, 2013 at 6:33 pm #43539
Ira Feldman
Username: iradave

Oh and for clarity sakes accessing a PDF in the access-s2member-level1 directory works fine like this:

http://www.DOMAINNAME.org/wordpress/wp-content/plugins/s2member-files/s2member-file-stream-no/s2member-file-inline/access-s2member-level1/pool.pdf

I just can’t get the video to play – so I suspect it is the rewrite of the video URL.

Posted: Tuesday Mar 5th, 2013 at 7:00 am #43758

Hi Ira.

Thanks for reporting this. I’ll show it to Jason and let you know as soon as I hear back from him.

Posted: Thursday Mar 7th, 2013 at 11:49 am #43967
Ira Feldman
Username: iradave

Cristian,

Thanks! Any feedback yet? I still need a work around (other than not protecting specific files by membership level).

Thanks,

Ira

Posted: Friday Mar 8th, 2013 at 12:56 pm #44096

No, he hasn’t reached this ticket yet. He’s been quite busy.

Is the problem the %2F in the URL? If so, how do I work around this?

That seems right. You can use the output code instead of the shortcode for now, try replacing [hilite mono]%2F[/hilite] with a slash.

http://www.domainname.org/wordpress/wp-content/plugins/s2member-files/s2member-file-stream-no/s2member-file-inline/access-s2member-level1/testhaba.mp4
Posted: Friday Mar 8th, 2013 at 1:02 pm #44097
Ira Feldman
Username: iradave

Hi Cristian,

I’m fairly confident that the PHP/html code will work fine once the %2F is corrected. (The URL alone works fine.) What I need is a workaround so I can simply generate the correct code in my WordPress pages without writing all the PHP to load the player completely from scratch. I have almost 40 video files that I need to post.

Thanks,

Ira

Posted: Friday Mar 8th, 2013 at 1:14 pm #44102

Of course, the shortcode is more convenient.

Posted: Friday Mar 8th, 2013 at 1:15 pm #44103
Ira Feldman
Username: iradave

Cristian,

Without the short code, what is the correct “long code” to call the JW Player? I didn’t see that anywhere in the documentation.

Thanks,

Ira

Posted: Friday Mar 8th, 2013 at 1:22 pm #44106

You can find them here: [hilite path]Dashboard -› s2Member® -› Download Options -› JW Player® & RTMP Protocol Examples -> PHP Code Examples[/hilite]

Or you can use the shortcode, load the page, copy the output code, paste the code in the editor (text, not visual) and fix the URL.

Posted: Saturday Mar 16th, 2013 at 12:25 am #44885
Staff Member

Thanks for your patience.

This issue has been identified in the development copy and a fix will be pushed out in the next maintenance release. Until then, if you’d like to patch your existing copy of the software, please download and extract the attached file; allowing it to override your existing copy of: /s2member/includes/classes/files-in.inc.php

http://d1v41qemfjie0l.cloudfront.net/s2member/uploads/files-in.inc_.php_1.zip

Thank you for reporting this important issue!

Posted: Saturday Mar 16th, 2013 at 12:29 am #44886
Ira Feldman
Username: iradave

Jason – Many thanks! I will give it a go shortly (over the weekend). I’m assuming it is fixed and will only reply if it doesn’t work or I find something else. Thanks again!

Posted: Friday Apr 5th, 2013 at 2:59 am #46676
Staff Member
UPDATE: This patch was formally applied to the maintenance release of s2Member v130404.
See changelog: http://www.s2member.com/changelog/#s2-changes-v130404
Viewing 11 replies - 1 through 11 (of 11 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.