PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
wp-content/plugins/s2member-files/file-in-the-s2member-files-folder
wp-content/plugins/s2member-files/sub-folder/file-in-the-sub-folder
<?php
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.get_permalink($post->post_parent));
?>
Eduan wrote:I believe that would work yes.
You can have sub-folders, you can have as many sub-folders as you want, s2Member won't limit you on this manner, just make sure you don't confuse yourself.
In order to put a sub-folder in the url simply put another forward slash ( / ), so if I want to access a normal file the url would be:
wp-content/plugins/s2member-files/file-in-the-s2member-files-folder
That would give me access to any file in the s2Member files folder, just make sure to put the name correctly, because it's case sensitive.
And so, if you want to access a sub-folder, simply put:
wp-content/plugins/s2member-files/sub-folder/file-in-the-sub-folder
Does this make sense?
wp-content/plugins/s2member-files/file-in-the-s2member-files-folder
<img src="[s2If current_user_can(access_s2member_level1)]http://genealogy.org.il/wordpress/?s2member_file_download=SUBFOLDER/1923_nurses.png&s2member_file_download_key=<?php echo s2member_file_download_key("1923_nurses.png"); ?>
[/s2If]
Eduan wrote:I believe that would work yes.
You can have sub-folders, you can have as many sub-folders as you want, s2Member won't limit you on this manner, just make sure you don't confuse yourself.
In order to put a sub-folder in the url simply put another forward slash ( / ), so if I want to access a normal file the url would be:
wp-content/plugins/s2member-files/file-in-the-s2member-files-folder
That would give me access to any file in the s2Member files folder, just make sure to put the name correctly, because it's case sensitive.
And so, if you want to access a sub-folder, simply put:
wp-content/plugins/s2member-files/sub-folder/file-in-the-sub-folder
Does this make sense?
[s2If current_user_is(s2member_level1)]
This is an image, only for members level 1:
[s2File download="access-s2member-level1/images/image-1-cat.png" inline="yes" /]
[/s2If]
[s2If !current_user_is(s2member_level1)]
You must be a member level 1 in order to see this image
[/s2If]
Eduan wrote:EDIT: This is an edit to the post above: The s2member-files folder should come with an .htaccess file, you must preserve that file.
You would insert the sub-folder in the s2member-files folder.
So let's say I have the sub-folder named "images", in which I'm going to insert images, so the URL for that would be:
/s2member-files/images
Now, in that folder I want a file named "image-1-cat.png", so the URL for that file would be:
/s2member-files/images/image-1-cat.png
Is that clear?
Now, if I want to protect that file with level 1, I would add
/s2member-files/access-s2member-level1/images/image-1-cat.png
The shortcode for all of this would be:
[s2If current_user_is(s2member_level1)]
This is an image, only for members level 1:
[s2File download="access-s2member-level1/images/image-1-cat.png" inline="yes" /]
[/s2If]
[s2If !current_user_is(s2member_level1)]
You must be a member level 1 in order to see this image
[/s2If]
Hope this clears some things up.
philipt18 wrote:Just to be clear, I don't need to copy the .htaccess file to sub-folders, right?
philipt18 wrote:Also, I'm not clear on the folder access-s2member-level1 you created. There is nothing special to that name is there? I didn't see a way to restrict different folders with different levels. Is that just a name you made up, or is there actually a sub-folder you can use for specific levels?
philipt18 wrote:If I left out that just used images/ it would be the same, no?
philipt18 wrote:Also, the shortcodes you've used would actually prevent someone with a level higher than 1 from accessing the files, right? Instead, if I wanted all users from level 1 and up to access, I would use [s2If current_user_can(access_s2member_level1)] I would guess.
Users browsing this forum: Google [Bot] and 2 guests