Creating a contact member button on site 2 of my multisite setup

Hi all

Been pulling my hair out over this problem for months now and since joining wpmu dev I see there are many knowledgeable folks here so Im going to ask the question here.

I have a multisite setup and site 1 is the primary site where users hold there profile and signup etc. Its a buddypress setup. Site 2 is a premiumpress theme and uses a different URL structure. Built in to site 2 was a profile option but I have bypassed this so that members end up only using site 1 profile options.

All is well with the exception of one link I can not change.

Its a “Contact Member” button on a members blog. The link wants to point to the designated “messages page” which you designate from the themes options. Its like this

What I can not do is change the link because buddypress uses different URLs and wants to put a username into the URL.

Does anyone have any idea how to go about changing the link so that it activates the “contact member” link from buddypress?

Here is some code from site2:

<!– start buttons –>

<div class=”enditembox inner”>

<?php if($userdata->ID == $author->ID){ ?>

<input type=”button” onclick=”window.location='<?php echo get_option(‘dashboard_url’:wink:; ?>'” class=”button gray” tabindex=”15″ value=”<?php echo $PPT->_e(array(‘button’,’7′:wink:); ?>” />

<?php } ?>

/?u=<?php echo get_query_var( ‘author_name’ ); ?>”><?php echo str_replace(“%a”,get_the_author(),$PPT->_e(array(‘author’,’1′:wink:)) ?> <img src=”<?php echo get_template_directory_uri(); ?>/PPT/img/button/comment.png” />


<!– end buttons –>

Am I right in thinking that I need to change the php?