Tips and Tricks HQ Support Portal › Forums › WP eMember › Partial Post Protection
Tagged: wp-emember-warning-msgbox-text
- This topic has 8 replies, 3 voices, and was last updated 13 years, 3 months ago by amin007.
-
AuthorPosts
-
May 7, 2011 at 2:01 am #3343verityMember
A few questions.
- I want the visitors of the site to see: “Thank for you visiting. To download our free still images, please join as a free member. To download our videos, please join as a paid member.”
And for the free members, I want them to see “To download our videos, please join as a paid member.”
- I was able to edit the message. But is there a way to make the CSS styling of the message look a little more friendly? The big orange bar and warning symbol are a little too serious for my purposes. Is there a way to just hide the protected content, instead of hiding it AND having that big bar?
I’m thinking that this part is what I need to edit somehow, but I’m worried what will happen if I just delete it. (This is from wp_eMember1.php) Do I edit the CSS, or can I edit this PHP to simply have the protected content hidden?
}
function eMember_is_post_protected ($post_id){
global $wpdb;
$wpdb->prefix . "wp_eMember_membership_tbl";
$query = "SELECT post_list FROM " . $wpdb->prefix . "wp_eMember_membership_tbl WHERE id = 1;";
$post_list = unserialize($wpdb->get_var($wpdb->prepare($query)));
if(!$post_list) return false;
return in_array($post_id, $post_list);
}
May 7, 2011 at 2:44 am #32140amin007ParticipantYou can customize the following CSS element in the “css/eMember_style.css” file to customize how the message box looks like:
wp-emember-msgbox
If you don’t want any of these formatting and just want to show a simple text line then you can just take it out completely from PHP. Search for the following function:
function wp_emember_format_message($msg)
Once you find it replace it’s content with
return $msg;
. It will look like the following after this modification:function wp_emember_format_message($msg){
return $msg;
}May 9, 2011 at 4:10 pm #32141verityMemberPerfect, thanks!
May 9, 2011 at 8:06 pm #32142verityMemberIs it possible to have different messages displays for different levels of membership? For example, if they aren’t a member, I want them to be prompted to join as a free member.
But if they are already a free member, I want them to be prompted to join as a paid member.
Is it possible to customize the PHP to reflect different messages based on membership level? Would I need to go in and edit the PHP that I deleted above?
Thanks!
May 10, 2011 at 1:00 am #32143amin007ParticipantYou can wrap your message in various kinds of section protection so it is only shown to the targeted audience. These posts have examples:
How to Protect a Section of a Post or Page (Partial Protection)
http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248
May 10, 2011 at 2:13 am #32144verityMemberThank you! What is the difference between a “Hidden Content Message” and a “Members Only Message?”
May 10, 2011 at 4:02 am #32145amin007ParticipantHidden content usually refers to content that your membership level does not allow you to see. Members only content refers to content only members can see.
August 10, 2011 at 12:24 am #32146ucomeauMemberHow do I change the text in the wp-emember-warning-msgbox-text element. Which file do I need to edit to find the actual text to place in the warning box? I found the element in this file: wp-eMember/wp_eMember1.php but no place to alter the text.
I’m utterly baffled. Can you help me please?
Thanks
August 10, 2011 at 1:19 am #32147 - I want the visitors of the site to see: “Thank for you visiting. To download our free still images, please join as a free member. To download our videos, please join as a paid member.”
-
AuthorPosts
- You must be logged in to reply to this topic.