Forum Replies Created
-
AuthorPosts
-
rwdrummond
ParticipantThanks for confirming that, and for the quick response.
rwdrummond
ParticipantThanks for pointing me in the right direction. I’ll see if I can sort through it!
rwdrummond
ParticipantThanks, but that’s not what I’m asking. Let me see if I can give a better description of what I’d like to do.
I have an existing member who is logged in. I created am HTML form with a textbox – when the member submits the form, I create a new post (by calling wp_insert_post) using the contents of the textbox as the post content. So what I have done is to allow this member to post to the site without having access to the admin back-end. This is all working.
When I create the new post, it is of course, not protected by SWPM. So everyone can see it regardless of whether they are logged in. What I would like to do is to apply SWPM protection to this post, restricting it to a given membership level(s). I can edit the post and do that manually, but I need to do it programmatically when creating the post.
So in essence, my question is, what database changes occur when you select the “Yes, Protect this content” radio button and check one or more membership levels? I want to write a PHP function to allow me to enable content restriction for a given post ID to a given membership level(s).
I’m sure the capability is there, if the developers can point me to the right class/function?
Hope that’s clear!
rwdrummond
ParticipantThanks for the response and for providing the PHP and CSS samples. I was able to trace through the tables to find the custom field values for each of my membership levels, so writing the SQL to pull the “complete” profile including the image and custom fields was pretty trivial.
rwdrummond
ParticipantThanks for considering the request. Hope it is feasible.
rwdrummond
ParticipantPerfect! Thanks for the quick response.
rwdrummond
ParticipantThanks for the quick response. Good point about the name not being unique! Again, thanks for a great plugin!
rwdrummond
ParticipantThanks for the suggestion, mbrsolution – that is a great example of what I want to do, but it requires knowing the member’s ID. What I’m looking for is a way for a member to look up another member’s ID (preferably by first & last name) in order to retrieve the other member’s profile info.
-
AuthorPosts