I think the only way you can do it for now is add a plug-in that checks per post if the user has a userpage or not.
But this would add a query per post per user!
I also don't know right now where to put the plug-in.
But it should look like:
$hasuserpage=$db->query_read("SELECT id FROM ".TABLE_PREFIX."userpage WHERE userid='".$userinfo['userpage']."'");
if($db->num_rows($hasuserpage)){
$hasuserpage=1;
}else{
$hasuserpage=0;
}
And then add in postbit template:
<if condition="hasuserpage">
<a href="userpage.php?u=$userinfo[userid]">Visit's $userinfo['username']'s userpage</a>
</if>
But again, I don't think this is a good way to do it.
|