"Contact user" form within the classified

Hi there,

When you press the "contact user" button in a classified, you can sent a message to the member who placed the specific classified.

I have two questions about this.

1.) Is it also possible to sent a copy of the message to the user who submited the "contact user" form?

2.) Is it possible to also add a link directly to the profile of the user who submited the form? For example in core.php?


Kind regards,

  • wijngaardeWD

    Hi Jack,

    Thanks for your reply.

    1.) Do you have an idea what the custom code would be? I think it should be added in wp-content/plugins/classifieds/ui-front/general/single-classifieds.php (somewhere around line 132). Or: wp-content/plugins/classifieds/core/core.php (around line 1000)

    But don't know what to put where exactly to arrange this. So your help would be apreciated!

    2.) I've changed a bit around line 1000 of core.php to meet the needs of my client:

    					global $post;
    					$user_info  = get_userdata( $post->post_author );
    					$body       = 'Hi %s, je hebt een nieuw bericht ontvangen:<br />
    					<br />
    					<strong>Naam:</strong> %s <br />
    					<strong>E-mail:</strong> %s <br />
    					<strong>Onderwerp:</strong> %s <br />
    					<strong>Bericht:</strong> <br />
    					<br />
    					<br />
    					<br />
    					<strong>Swap link:</strong> %s
    					$tm_subject =  'Contact Request: %s [ %s ]';
    					$to         = $user_info->user_email;
    					$subject    = sprintf( __( $tm_subject, $this->text_domain ), $_POST['subject'], $post->post_title );
    					$message    = sprintf( __( $body, $this->text_domain ), $user_info->user_nicename, $_POST['name'], $_POST['email'], $_POST['subject'], $_POST['message'], get_permalink( $post->ID ) );
    					$headers    = "MIME-Version: 1.0\n" . "From: " . $_POST['name'] .  " <{$_POST['email']}>\n" . "Content-Type: text/html; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
    					$sent = (wp_mail( $to, $subject, $message, $headers ) ) ? '1' : '0';
    					wp_redirect( get_permalink( $post->ID ) . '?sent=' . $sent );

    In the most ideal situation it would be somewhere here:

    <strong>Naam:</strong> %s <br />
    In English Naam would be "name"..

    But anywhere around that place would be great.

    Thanks! Hope this clarifies a bit.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.