Care to share how you did it?
I have a classified site, with the private messaging in the system,
I want to replace the default contact form (which emails the ad owner) and replace it with a pm message.
thanks
I was able to create a Contact Button by using the following code:
<?
$name = get_the_author(); // I used Author since I wanted the Author of the post to be contacted.
$title = 'Title / Subject';
$message = 'Default message goes here (placement text)';
echo '<a href="/?fepaction=newmessage&to='.$name.'&message_title='.$title.'&message_content='.$message.'">Contact Author</a>';
?>
If you used HTML you’d have to enter all the info manually.
I have run into a problem when contacting some usernames with Spaces between them though so if anyone knows a way around that I’d definitely be interested in knowing.
Thanks for that!.
If anyone have a fix to the error that shows with spaces in the username, please share, I have tried to fix it with no success.
Thanks.
Try putting rawurlencode($name);
in the echo and it should add %20 where spaces are.