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.

File tree

Home Forums Community Forum File tree

This topic contains 1 reply, has 2 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Saturday Mar 3rd, 2012 at 4:51 pm #7192
csw
Username: cswake

I’ve found that S2 supports everything I need except for a file tree, similar to the one at [ fabi.me/downloads/ ]. Rather than having to manually input the filenames of every file, is there something similar that can automate the process of listing the files and directories available to membership levels?

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Mar 6th, 2012 at 1:15 am #7382
Staff Member

Hi there. Thanks for your inquiry.

That’s a great suggestion, thank you. While this feature is not yet available in s2Member, you could do something like this in PHP if you want to display a list of all files in the security-enabled directory for s2Member.

<?php
foreach(scandir($GLOBALS&#91;"WS_PLUGIN__"&#93;&#91;"s2member"&#93;&#91;"c"&#93;&#91;"files_dir"&#93;) as $file)
	if(strpos($file, ".") !== 0)
		echo '<a href="'.site_url('/?s2member_file_download='.urlencode($file)).'">'.$file.'</a>';
?>
Viewing 1 replies (of 1 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.