Forum Replies Created
-
AuthorPosts
-
KSpectator
Thanks! Ended up modifying the code somewhat…
function eMember_redirect_instead_of_hide() {
$emember_auth = Emember_Auth::getInstance();
$is_protected = false;
//goes through pages and posts, but can be expanded for pages, posts, categories, comments, etc via the functions in eMember
if(is_bbpress()){
$is_protected = $emember_auth->is_protected_post(bbp_get_forum_id()) && !$emember_auth->is_permitted_post(bbp_get_forum_id());
}
if($is_protected){
header("Location: /member-login");
exit();
}
}Since we are using Thesis as our site theme, just threw this into the custom function file and hooked in at…
add_action('thesis_hook_before_html', 'eMember_redirect_instead_of_hide');
Still need to hide forums in forum listing, but that will be another snippet of code.
KSpectatorI know you can find the membership level(s) of a member, via PHP function, but is there a way to determine what member types are allowed with a page (return the ticked “Select the membership level that can access this content:” membership types associated with eMember Protection Options for the page/post/object/etc)? I couldn’t find that in documentation.
Unfortunately, sitewide protection, while it will be useful to lock down the forums from anonymous visitors, like you said, isn’t going to completely hide the forums in the forum view, and disable access to forums/topics/replies directly via URL. If there is a eMember function to return the allowed membership levels of a page/post/forum/etc, I can then compare that collection to the membership levels of the logged-in user and render/not render redirect/allow accordingly.
Thanks.
KSpectatorGreat tips so far in here. However, lets say we have three different membership levels (Gold, Silver, Bronze for this example) with three forums (one for each level). Gold can see all three, Silver sees Silver and Bronze forums. Bronze only sees Bronze. Is there a way to hide the forums not accessible for the membership level of member, and redirect them to either a login page, or some other page, if they try to access a forum, topic, or reply they don’t have rights to…not just protect the content?
Do you have to hook into bbPress’s rendering model and check the forum’s eMember protection (I know how to get a user’s membership level, but not a protected object’s allowed membership levels), and custom code that for the “forums” page, along with putting in checks whenever a forum, topic, or reply URL is direct loaded, to peg up to the forum level, get that protection level, and then decide whether or not to redirect based on logged in user’s membership level?
While the example I posted has only 3 levels, the client I am working for has 52 different levels, so having to hardcode those views would be time-consuming, never mind, inflexible.
KSpectatorHi,
Investigating whether or not eMember will be a good fit for membership sites we’re looking to produce.
We’re looking at using bbPress (2.0.2 plugin) for the user interaction portion of the member site. We would like the public, unsigned in users, to see a list of all forums, be able to get into and read on a General Public Forum (Group 1 main forum and any of its children) and be able to post to Group 1 forums, after signing up for a free membership (with WP User Integration). The other forums would be available only to members of varying levels of paid membership (also integrated with WP users). So Forum Group 2 and 3 would be available to Silver members, but Gold members could see Forum Group 2 and 3 and 4 (and their children). Bronze would only have Group 2, but perhaps Lead could only have access to Group 5….and so on.
Is all the security done at a page level with shortcode, or is there a direct way to apply eMember user membership info on a forum level…so no matter how the user tries to get to the forum content, they are locked out, if they don’t have the correct authorization.
Thanks,
-Tom (webmaster for K).
December 11, 2011 at 11:47 am in reply to: WP eStore Encrypted Links Fail With WP PDF Stamper Encrypted Downloads #39189KSpectatorWe Updated Versions of Plugins
WP eStore 5.9.9.2 -> 6.2.4
WP PDF Stamper 3.3.8 -> 4.0.7
Seems like it now works on off-peak for the full file size. Will now test on-peak, to make sure it isn’t an issue with shared hosting not having enough resources to process the file.
December 6, 2011 at 10:05 pm in reply to: WP eStore Encrypted Links Fail With WP PDF Stamper Encrypted Downloads #39188KSpectatorEverything works fine with a very small file (80 KB PDF). Our next step was to update both of the plugins. Thanks for the link. Will update to see how it works out.
December 6, 2011 at 2:17 am in reply to: WP eStore Encrypted Links Fail With WP PDF Stamper Encrypted Downloads #39186KSpectatorThe server memory issue was my first thought, too, but I adandoned it when the file did actually get stamped. Perhaps with a smaller file, it won’t bonk. The current PDF file is 3 MB. Did a PHPInfo() dump, and it shows that cURL is installed…
curl
cURL support enabled
cURL Information libcurl/7.21.7 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
I’ll see if I can get a 1 MB PDF to throw the same error.
December 5, 2011 at 8:40 pm in reply to: WP eStore Encrypted Links Fail With WP PDF Stamper Encrypted Downloads #39183KSpectatorYes, the file can be stamped manually. No problem. It is even stamped when the purchase is made (I can go into the Manage Stamped PDF’s), and find it sitting there…when the download link is encrypted, it just can’t find it. The source (unstamped, unencrypted) PDF is in the WP Media Library. The download directory is the default that comes with the plugins. I have noticed that the transaction ID to postpended onto the PDF file name. Perhaps the stamper is looking for the original file name and can’t find it, because that transaction ID is postpended? And why is it generating the download link, before the encypted/stamped file is even created?
December 5, 2011 at 1:06 pm in reply to: WP eStore Encrypted Links Fail With WP PDF Stamper Encrypted Downloads #39181KSpectatorThe server logs are for events that happened over 6 weeks ago. I included the whole file. If there was a server space issue, why are the stamped files still created and can be viewed in the Manage Stamped PDF’s. There are no other log entries. I don’t know why the eStore is saying there is a 500 message when the server logs clearly indicate there are not for the time period the plugin was in use.
-
AuthorPosts