Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where is this information saved

  • @clivesmith

    Participant

    Hi,

    I allow anybody to reply to a topic, but I ask for their name and Email address, all replied are moderated, when I look at the reply under replies I can see the name but not the Email. I am sure somewhere I put “(will not be published)” after the Mail (required) label: but I cannot remember where I did that.
    I have the latest wordpress, bbpress, bbp toolkit, bbpress moderation and bbp style pack installed.
    Can someone help where to find the Email given please, I have spent two days looking.

    Clive

Viewing 12 replies - 1 through 12 (of 12 total)
  • @robin-w

    Moderator

    From memory the email address is shown to Keymasters only, and appears after their name in topics and replies.

    If that is not happening for you, then come back, and I’ll take a look

    @clivesmith

    Participant

    Hi Robin,

    I am admin and Keymaster, but I cannot see them. All I see after their name is their IP address.

    Clive

    @robin-w

    Moderator

    ok, do you know how to add code to your functions file if I give you some

    @clivesmith

    Participant

    Yes I do, I have a child theme setup

    I have found it in the database. it is in the postmeta table, meta key is _bbp_anonymous_email

    @clivesmith

    Participant

    Is there some way to show the Email address somewhere inside dashboard that only I can see it ?

    I can only see it by looking through each record in the table.

    @robin-w

    Moderator

    untested (as I’ve not got anonymous set on my test site, and I’m on another project) but this should work

    add_action ('bbp_theme_after_reply_author_admin_details', 'rew_add_email') ;
    
    function rew_add_email () {
    	$email = get_post_meta ( bbp_get_reply_id () , '_bbp_anonymous_email' ) ;
    	if (!empty ($email))
    		echo '<p>'.$email ;
    }

    Add this to your functions file.

    This will put the email after the ip address on anonymous topics and replies for admins only

    If it doesn’t work come back and I’ll do some testing

    @clivesmith

    Participant

    Thank you Robin for your help.

    with your code I get the word Array under the IP address not the Email.

    Clive

    @robin-w

    Moderator

    ok, try this, if this fails I will load it to my test site and get it right for you

    add_action ('bbp_theme_after_reply_author_admin_details', 'rew_add_email') ;
    
    function rew_add_email () {
    	$email = bbp_get_author_email (bbp_get_reply_id () ) ;
    	if (!empty ($email))
    		echo '<p>'.$email ;
    }

    @clivesmith

    Participant

    Hi Robin,

    Thanks, but now there is nothing there.

    Clive

    @robin-w

    Moderator

    ok, two wrong fixes, so I loaded it to my test site

    This works for me

    add_action ('bbp_theme_after_reply_author_admin_details', 'rew_add_email') ;
    
    function rew_add_email () {
    	$email = get_post_meta ( bbp_get_reply_id () , '_bbp_anonymous_email', true ) ;
    	if (!empty ($email))
    		echo '<p>'.$email ;
    }

    @clivesmith

    Participant

    Brilliant, thank you Robin, you’re a star

    @robin-w

    Moderator

    great – glad you are fixed

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar