2
here is the basic idea of what userinfo.php has set up .which is what you are wanting.
some php file..
[color=006633]//part one. create object for user.[/color]
$uid = intval($_GET['uid']);
$member_handler = xoops_gethandler('member');
$thisUser =& $member_handler->getUser($uid); [color=006633] //uid is the userid of the other person (classified ad or something)[/color]
[color=006633]//part two. create pm link for that user. w/image[/color]
$xoopsTpl->assign('user_pmlink', "<a href="javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$thisUser->getVar('uid')."', 'pmlite', 450, 380);"><img src="".XOOPS_URL."/images/icons/pm.gif" alt="".sprintf(_SENDPMTO,$thisUser->getVar('uname'))."" /></a>");
[color=006633]//creates the link to use in the smarty variable.. "<{$user_pmlink}>".. [/color]
//if you already have something that creates the object for the person,author(classified ad poster).. part two would be what you are after... with a little bit of modification.
CBB / LatestNews / Publisher / XM-Spotlight
(ノ◕ヮ◕)ノ*:・゚✧