Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-29T17:02:03-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14111 2011-07-29T17:02:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=29468#p29468 <![CDATA[Re: Protecting Different Download Folder]]>
Cristián Lávaque wrote:
Hi Damien.

I think you can use this to change the download directory protected by s2Member. Create this directory and file

/wp-content/mu-plugins/s2hacks.php
Code:
<?php
add_filter
('ws_plugin__s2member_files_dir', 'my_files_directory');
function my_files_directory() {
    return '/server/path/to/other/download/directory';
}
?>


With the shop protected, though, it may not be needed to do anything else, but if you worry about users sharing the URLs to the files, then it's fine you try to protect them more.

I hope that helps. :)



Hi, I don't know exactly what the URL should be?
If I have a http://mydomain.com/v1/memb1/contacts.php
What should I write first in: 'my_files_directory' ?
Should it be my: v1/memb1
And in the return '/also v1/memb1/?
Sorry I am lost.

PS,
My goal is to protect a non WP page that has the URL http://mydomain.com/v1/memb1/contacts.php

And if I understand the URI protection it should be: /v1/memb1/contacts.php

But I have tried to set that on level 0 on one of the "sub" blog in a multisite and it didn't work.
have tested to add the URI the "base" blog and it still is open for all to see.

Have I misunderstood that I could protect any .php page and or all material inside a folder if I protect for example /memb1/ in my example above?

Regards / Lars

Statistics: Posted by LarsW — July 29th, 2011, 5:02 pm


]]>
2011-07-16T00:07:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28479#p28479 <![CDATA[Re: Protecting Different Download Folder]]>

Hmm... The Membership Options Page can only be chosen from one of the pages you created in WordPress where s2Member is. That said, you could create a redirection with htaccess, or try another plugin that redirects pages, to the URL you want.

Statistics: Posted by Cristián Lávaque — July 16th, 2011, 12:07 am


]]>
2011-07-15T07:45:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28420#p28420 <![CDATA[Re: Protecting Different Download Folder]]>
The problem was down to my lack of understanding of URI fragments, once light dawned on my empty head everything worked fine, now its locked down tighter than a nun's virtue :shock: .

Just one final question and it is more from an aesthetics rather than a usablity perspetive. The template comes with a rather nice login/register page that obviously fits the theme. Is there a way to make this my 'Membership Options' page given that, like the 'STORE' page, it is a php file called by the template and not a wp-page? I have spent quite some time surfing the forum for any clues but I may be searching for the wrong thing

Many thanks for your assistance, it is very much appreciated.

Damien

Statistics: Posted by damien — July 15th, 2011, 7:45 am


]]>
2011-07-14T19:43:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28397#p28397 <![CDATA[Re: Protecting Different Download Folder]]> WP Admin -> s2Member -> Restriction Options -> URI Restrictions

Statistics: Posted by Cristián Lávaque — July 14th, 2011, 7:43 pm


]]>
2011-07-14T07:46:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28373#p28373 <![CDATA[Re: Protecting Different Download Folder]]>
Much appreciated and easier than using .htaccess, password and scramling the pdf title.

Another question for you - I'm using a 3rd party theme and the 'STORE' page is not a page bat rather a store.php file that is called by the index page.

The store.php is located at:- http://www.mydomain.com/server/path/to/ ... /store.php but the URL is:- http://www.mydomain.com/?page=store

In other words I do not have a Page id to enter in the page restrictions section. Is there any way I can protect the stroe page?

Thanks

Statistics: Posted by damien — July 14th, 2011, 7:46 am


]]>
2011-07-13T15:58:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28310#p28310 <![CDATA[Re: Protecting Different Download Folder]]>
I think you can use this to change the download directory protected by s2Member. Create this directory and file

/wp-content/mu-plugins/s2hacks.php
Code:
<?php
add_filter
('ws_plugin__s2member_files_dir', 'my_files_directory');
function my_files_directory() {
    return '/server/path/to/other/download/directory';
}
?>


With the shop protected, though, it may not be needed to do anything else, but if you worry about users sharing the URLs to the files, then it's fine you try to protect them more.

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — July 13th, 2011, 3:58 pm


]]>
2011-07-13T07:14:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14111&p=28268#p28268 <![CDATA[Protecting Different Download Folder]]>
Thank you for a superb product.

My question regards protecting alternative folders for downloadable files (pdf's). I am using http://wpstorecart.com/ for a registration website and controling the registration process with s2Member, I don't need to use the shopping cart facility but the presentation of products looks good, and it works fine with the work-around I posted here: http://wpstorecart.com/forums/general-support-group1/mods-addons-integration-forum3/removing-shopping-cart-process-thread173/.

Unfortunatley, http://wpstorecart.com/ forces me to use their own download folder which is inside the /plugins directory. As the 'Store' is contained within a page http://wpstorecart.com/demo/ named STORE I can quite easily restrict access to it.

My questions are 1) How can I protect downloadable files in their download folder or 2) Is there any need to do this as I have protected the store page?

Any help greatly appreciated.

Damien

Statistics: Posted by damien — July 13th, 2011, 7:14 am


]]>