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.

Philly


My Latest Replies (From Various Topics)

Viewing 25 replies - 126 through 150 (of 267 total)
Author Replies
Author Replies
Posted: Tuesday Jul 31st, 2012 at 7:03 am #20767

Ok some big changes based on the requests.

Please test with the old one disabled. Nearly ready for a final realise I think.

https://dl.dropbox.com/u/40574414/s2Member-Video-Shortcodes-v0.0.4.zip

Its now 2 shortcodes, 1 for a single video(with multi videos per page support) and 1 for playlists

support added for download key to allow non-member the option to view and music only support.

[s2video] 

[s2playlist]

attributes for playlist remain the same but with the addition of a download key to allow non-member the option to view

[s2video downloadkey="true"] 

[s2playlist downloadkey="true"] 

To use for music set the height to 24 and just replace the video file with an appropriate format eg mp3

[s2video height="24"] 

[s2playlist height="24"]

Has been simplified to use for single videos(removed size option and numbers)

[s2video width="" height="" image="" video="" ]
[s2video hd="true" width="" height="" image="" video="" hdvideo="" ]
[s2video html5="true" download="true" hd="true" width="" height="" image="" video="" hdvideo="" ]

To use to embed multiple players in one page set the “id” value to be unique for every shortcode

[s2video id="2"]

[s2video width="" height="" image="" video="" ]
[s2video id="2" width="" height="" image="" video="" ]
[s2video id="3"  width="" height="" image="" video="" ]

An important not with multi embeds:

Each player has to have a unique ID I’m using ‘videoplayer’, when embedding multi players the ID’s will change videoplayer1, videoplayer2, videoplayer3 etc etc, so I have added the class ‘videoplayer’ to every player to make it easy to apply your CSS rules.

  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Monday Jul 30th, 2012 at 7:40 pm #20721
Posted: Monday Jul 30th, 2012 at 7:36 pm #20720

Hi Ross,

So does JW Player and S2 support mp3 streaming too, and does the player adapt, to only show the control bar, rather than a blank video window?

I think so I will look into it.

Can S2 embed videos and audio through JW Player that can be seen by people who aren’t logged in?
Effectively I give the option for people to purchase access links to pages even if they aren’t a member.
Can S2 still display JUST the streaming versions to these people?
I don’t want ANY member to have access to the download link, EVERYONE should only be able to stream!

Yes its possible I will add that option

and I could also do with playing.mov too

It’s possible but do browsers support this? Maybe with a plugin. Its not a format I would advise using but you could do it all the same or maybe offer that format as a download.

Is this possible? And is it possible to simply wrap the code in a simple S2Member conditional so that I can say which level it should be visible too?

Yes. Use:

[s2If current_user_can(access_s2member_level1)][s2videos][/s2If]
Posted: Monday Jul 30th, 2012 at 4:46 pm #20704

Hi Dean,

The results are different depending on whether you are logged in as admin or not, is that right?

I don’t use that plugin so don’t know exactly where it conflicts. However I did take a quick look and can see that the “Display random version number to all non-administrative users” under Tweaks -> Other tweaks. is not compatible with s2member and should be disabled.

Can you start with that and let us know how you get along

Posted: Sunday Jul 29th, 2012 at 6:15 pm #20631
Posted: Sunday Jul 29th, 2012 at 3:07 pm #20624

Hi Core,

I have made a shortcode that I’m currently using that can switch videos between SD and HD, but I don’t use a playlist.

The plugin has fallbacks for people that don’t have flash (iPhones/iPads). The download fallback can also be removed, but please bear in mind to make sure people can’t download the video full stop you can only stream in rtmp mode, so no fallbacks.

So what features do you need? sd/hd, playlist, skin and no download?

I’m not sure about someone to test and review but I would be happy to take a quick look and let you know if I can see any problems but I’m not an expert in those setups.

If you want to private message me you can email: me {at} phillymax dot com

Posted: Sunday Jul 29th, 2012 at 2:33 pm #20621

@ Echo

Its mainly down to your theme so you will need to play with the css.

maybe adding something like

#videoplayer{margin: 0 auto;}

to your themes style.css file. #videoplayer being the id of the player.

And as you know you can play around with the shortcode attributes

width="630" height="335" playlistsize="250"

Maybe make playlistsize smaller.

Hope that helps you, let me know.

@ Core

Thank you, I’m glad its working for you.

Yes I will look into expanding it for those features.

And yes you can increase the amount of videos in the playlist:

size="3"

Change that to the amount of videos in your playlist, then you must reference them in the shortcode like:

video1="video1.mp4" video2="videos2.mp4" video3="videos3.mp4" video4="videos4.mp4" video5="videos5.mp4"

so if you had 10 videos the reference for the last video would be

size="10" .................... video10="video10.mp4"

Let me know how you get along

Posted: Saturday Jul 28th, 2012 at 3:16 pm #20558

Hi Echo,

Here is the finished plugin. (deactivate the other one first)

Has fallback options and displays thumbs etc.

https://dl.dropbox.com/u/40574414/s2member-playlist-shortcode.zip

Use it like this:

[s2playlist size="3" width="630" height="335" playlistsize="250" playlistthumbs="true" playlistposition="right" video1="video1.mp4" image1="full-path-to-image.jpg" title1="Title One" desc1="Description One" video2="videos2.mp4" image2="full-path-to-image.jpg" title2="Title Two" desc2="Description Two" video3="videos3.mp4" image3="full-path-to-image.jpg" title3="Title Three" desc3="Description Three"]

size = number of videos in the playlist, then just reference them in the shortcode and the plugin will do the rest

Posted: Saturday Jul 28th, 2012 at 1:19 pm #20551

Hi Matt,

Yes thats possible. You can do it a few ways, you can redirect based on level or you could give users custom capabilities and direct based on those.

So create your welcome pages like /group1/welcome/ and /group2/welcome/ then give your users the relevant ccaps.

Then in WordPress under Dashboard => s2Member® General Options => Login Welcome Page

your see an input box ‘↓ Or, you may configure a Special Redirection URL, if you prefer. You’ll need to type in the full URL, starting with’

In that box put

http://yoursite.com/%%current_user_ccaps%%/welcome/
Posted: Saturday Jul 28th, 2012 at 12:51 pm #20548

Sorry Mary,

I’ve done a few tests with that player trying to get it too work but have been unsuccessful.

My advice would be to give jw player a try.

Out of interest are you able to download the video ok if you type this in your address bar?

http://website.com/?s2member_file_download=video.mp4
  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Saturday Jul 28th, 2012 at 11:26 am #20543

Yes Thank you Mary,

Everything looks fine with that test.

Can you try linking to the file like this

?s2member_file_download=

instead of

wp-content/plugins/s2member-files/

So your code would be:

<object id="mediaplayer1" width="1000" height="778"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name="flashvars" value="file=http://website.com/?s2member_file_download=video.mp4">

<param name="src" value="../../../training/player.swf" /><embed id="mediaplayer1" width="1000" height="778"  type="application/x-shockwave-flash" src="../../../training/player.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="file=http://website.com/?s2member_file_download=video.mp4">

</object></div>
  • This reply was modified 4 years, 5 months ago by  Philly.
  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Saturday Jul 28th, 2012 at 11:03 am #20537

Hi Mary,

What is the name of the file you uploaded? Have you put it in the same directory as wp-config.php?

What are you using to ftp? Can you please check the file permissions on it and also on /s2member-files/ directory.

Thank you

Posted: Saturday Jul 28th, 2012 at 9:14 am #20528

It certainly is defiantly good to look more into how they work.

Right I’m confident this will work across all browsers its a different approach as webkit based browser don’t seem to like the other method.

https://dl.dropbox.com/u/40574414/s2playlist.zip

Use it in posts/pages like:

[s2playlist video1="menandgrief2.mp4" title1="Title One" desc1="Description One" image1="/wp-content/uploads/thumbnailwindowslivewriter.jpg" video2="menandgrief3.mp4" title2="Title Two" desc2="Description Two" image2="/wp-content/uploads/thumbnailwindowslivewriter.jpg"  ]
Posted: Saturday Jul 28th, 2012 at 6:40 am #20510

Can you download and install this plugin https://dl.dropbox.com/u/40574414/s2member-video-playlist-shortcode.zip

then in your post/page use

[s2video]

See if that works, then we can clean it up if it does

Posted: Saturday Jul 28th, 2012 at 5:13 am #20499

Your rudeness and ignorance are a barrier, and why are you so ungrateful?

I had stopped and taken the time to help you, had you worked with me this problem would have been solved.

So, what did you help on?

By ruling out plugins as a cause and by giving you my precious time

I already knew it wasn’t the plugins

Why didn’t you say that from the start then? How are we supposed to know? Could have saved a reply.

I don’t even use ultimate shortcodes, but you know what they say about assumptions…

Notice the part were I said if your using that? As your problem is still as I said earlier a conflict interfering with the parsing of the shortcode, I’m right to assume its a plugin such as that, as its been well documented on this forum that it causes problems identical to yours

and s2 was the only thing installed at the time…

Really? then the next step would be to look at your theme right? And by following the advice originally given to you when you asked to be payed for finding an issue that didn’t exist.

Are you still hacking the core files? Could be your problem?

Posted: Friday Jul 27th, 2012 at 11:04 pm #20476

Sorry its not working for me in safari.

Will look at the code again tomorrow.

Posted: Friday Jul 27th, 2012 at 10:12 pm #20469

not sure why its happening its working for me on chrome

Posted: Friday Jul 27th, 2012 at 10:11 pm #20468

Thanks for the thumbs down,

I shall remember to only help people that appreciate it

Posted: Friday Jul 27th, 2012 at 7:55 pm #20462

No you have done it correctly.

Log out, then log in with that account you created for me and go to the /test-philly/ page and see if it works?
Works when I log in.

If your logged out or don’t have access to the file, it comes up “JW Player® appears here.” thats because the player won’t render without a valid file. I can’t see that it matters though as I suppose you wouldn’t have access to the page if you didn’t have access to the file

Posted: Friday Jul 27th, 2012 at 7:45 pm #20459

Hi Mary,

There is some sort of problem with your server/hosting environment.

I got the following error when trying to access that file

Error 500: Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

The problem is on the server side, not with your browser or the address. Most probably, a certain service (e.g., Tomcat engine) is down. Please contact your webmaster.

Please can you download this file unzip it and upload it to your server http://www.s2member.com/r/server-check-tool/

so that you can navigate to it here website.com/s2member-server-check-120703.php

That will run a couple of compatibility tests and hopefully give us some more info

  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Friday Jul 27th, 2012 at 7:29 pm #20457

Works for me using that account you created :)

Increase the downloads allowed under s2Member® File Download Options => Basic Download Restrictions
then see if it works for your account.

Posted: Friday Jul 27th, 2012 at 6:00 pm #20449

Thank you I’m glad they have been of use.

Right basically when you generate the file you need to generate the policy, key and signature to append to the url so that access is granted, like:

"file":"videos.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoidmlkZW9zLzAwNjIvMDA2Mi0xMjgweDcyMC5tcDQiLCJDb25kaXRpb24iOnsiSXBBZGRyZXNzIjp7IkFXUzpTb3VyY2VJcCI6Ijg2LjE0LjE1My42NC8zMiJ9LCJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTM0MzUwOTUMn19fV19&Signature=lOfQFai6SYjREARnNPCXCpOSEGFPcdjTifaZ1V7r4cvofdrTRhJyVOD-X7SRr0pVA~~xlFVSQWTAekmS2DOi77UwNQUwWVQi4yPkugJ2JrOoc-aQrU2taB9Ik~krIzC~qwZg1agDNVZ3lqo2oQps7Y79sAr14ge0DswBhx4AVs_&Key-Pair-Id=APKAJTVWA2VC2XWZMSA"

This code may work for your setup, Its not on mine.

<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/";
$s2_jw_config["mp4_video_file_name_1"] = "menandgrief2.mp4"; // Name of your 1st MP4 file.
$s2_jw_config["mp4_video_file_name_2"] = "menandgrief3.mp4"; // Name of your 2nd file.
?>

<div id="jwplayer">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>

<?php /* A direct URL to the RTMP source; counting the file against the current User in real-time. */
$mp4_1_cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name_1"], "url_to_storage_source" => true, "count_against_user" => true);
$mp4_2_cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name_2"], "url_to_storage_source" => true, "count_against_user" => true); ?>

<?php /* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4_1 = s2member_file_download_url ($mp4_1_cfg, "get-streamer-array")) 
                        && ($mp4_2 = s2member_file_download_url ($mp4_2_cfg, "get-streamer-array"))) { ?>

<script type="text/javascript">
jwplayer('jwplayer').setup({
'flashplayer': '/jwplayer/player.swf',
'id': 'playerID',
'width': '650',
'height': '240',
'playlist.thumbs': 'false',
'playlist.position': 'right',
'playlist.size': '250',
'playlist': [
{
'file': '<?php echo $mp4_1["file"]; ?>',
'title': 'First One',
'provider': 'rtmp',
'streamer': '<?php echo $mp4_1["streamer"]; ?>',
'image': '/wp-content/uploads/thumbnailwindowslivewriter.jpg',
'description': 'Yep, this is the first one.'
},
{
'file': '<?php echo $mp4_2["file"]; ?>',
'title': 'Second One',
'streamer': '<?php echo $mp4_2["streamer"]; ?>',
'provider': 'rtmp',
'description': 'And the second one.'
}
]
});
</script>
<?php } else /* Access is denied to the current User. */ { ?>
    Sorry, you do NOT have access to this file.
<?php } ?>

Try that and please let me know if it works, You can see the pattern to add more files to it.

Posted: Friday Jul 27th, 2012 at 4:44 pm #20442

Can you post the full code your using please

Posted: Friday Jul 27th, 2012 at 3:08 pm #20429

Hi Mike,

If you try to access the video directly by typing the url in the browser like:

http://www.yoursite.com/wp-content/plugins/s2member-files/video.mp4

what happens? I’m just wondering if its your browser not supporting the file type? Is it mp4?

Posted: Friday Jul 27th, 2012 at 5:26 am #20374

Hi Mary,

You need to remove the & and everything after it, you cant reference the image like that because the script that protects the video wont be able to process it.

value="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4"

On another note I would recommend using something like the jw player which will give you fallback options for people who dont have flash, probably better supported here too

Hope that helps

  • This reply was modified 4 years, 5 months ago by  Philly.
Viewing 25 replies - 126 through 150 (of 267 total)

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.