Quote:
Originally Posted by EasyTarget
hey waza, can you provide some code that will make it so if someone has a userpage and you click on their name in a post that you'll have the option to view/visit their page? Also in their profile if its not already there? thanks.
|
Hey,
Do the following (not tested, but it should work):
make a new plug-in in member_complete:
give it a name and add this code to it:
PHP Code:
$hasuserpageresult=$db->query_read("SELECT id FROM ".TABLE_PREFIX."userpages WHERE userid=".$userinfo['userid']."");
$hasuserpage=$db->num_rows($hasuserpageresult);
Then add somewhere in your MEMBERINFO template:
HTML Code:
<if condition="$hasuserpage">
<a href="userpage.php?u=$userinfo[userid]">Visit $userinfo[username] 's userpage</a>
</if>
grz