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.

About: Brad Ungar

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Protecting HTML & PHP pages under membership

By:  Brad Ungar in: Community Forum

voices: 3
replies: 8

3 years, 8 months ago  Khairul Anwar

s2 Member File Downloads – Place in subfolder

By:  Brad Ungar in: Community Forum

voices: 1
replies: 0

4 years, 2 months ago  Brad Ungar

Viewing 2 topics - 1 through 2 (of 2 total)

Topics I've Started

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Protecting HTML & PHP pages under membership

By:  Brad Ungar in: Community Forum

voices: 3
replies: 8

3 years, 8 months ago  Khairul Anwar

s2 Member File Downloads – Place in subfolder

By:  Brad Ungar in: Community Forum

voices: 1
replies: 0

4 years, 2 months ago  Brad Ungar

Viewing 2 topics - 1 through 2 (of 2 total)

My Latest Replies (From Various Topics)

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday Oct 31st, 2012 at 2:19 pm #30252

Eduan,

If I place all my files into the “s2member-files” folder is there a way to point to files in a subfolder? I want to add all my html and php files for my form into the protected folder and then display inline. I will need to access the html file inline but then also point to the files (php and png mostly) that are in the subfolder for the form.

I have added all the file types to the accessibility of being viewed inline and can access files that are just in the root “s2member-files” but have no idea how to get into the subfolder (Idea Submissions) I added in the folder (s2member-files).

Thanks,
Brad

Posted: Thursday Oct 25th, 2012 at 5:29 pm #29706

I placed the code on the main php for the form, but don’t see any change. I was still able to access the html link and upload directly from the form.

I haven’t done anything to the html file. I have attached the code for the php form where I placed the code. Do I need to put this on all php files that have any relation to the form?

THANKS SO MUCH!!

<?php

include_once "wp-load.php";
if (current_user_can("access_s2member_level1"))
	{ 
		// User is allowed to view, so display something here.
		$scriptpath = substr( $_SERVER['SCRIPT_FILENAME'], 0, -4 );
		$paths = explode ( DIRECTORY_SEPARATOR , $scriptpath );
		$myName = end($paths);
		require $scriptpath . '/fbapp/php/config.inc.php';


		if( strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) {

			$ctl = new FormController();
			$ctl->Dispatch();

		} else {
			
			if( ! isset( $_GET['action'] ) )		$myPage->ReportStats( 'NotifyFormView' );
		}

		ob_start();

		$myPage->Show();
		ob_end_flush();

		
	}
else
	exit("Permission denied!");


?>
Posted: Thursday Oct 25th, 2012 at 3:23 pm #29689

I put that code at the top of the main php file it is referencing, just as it is. Am I supposed to put anything in the if statement where it says “// User is allowed to view, so display something here.”. So far it doesn’t seem to have made any difference.

Also, the php relates to an html file which this code can’t be attached since: “This solution uses PHP code and that means the external pages that use this code will need to be PHP files. Files that end in .htm or .html will not be able to use this code unless you’ve specifically configured your web server to parse those file types with PHP.”

So far I still have access to the form within the iFrame and if I go to the html I can see and submit info still even when not logged in.

Thanks,
Brad

Viewing 3 replies - 1 through 3 (of 3 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.