rootnik
12-07-2005, 01:44 PM
I'm using The UserPages extension: https://vborg.vbsupport.ru/showthread.php?t=91903&highlight=userpages
There is a part of the install that requires you to add some code to the usercpshell template. This code simply displays the links for creating/editing the userpage.
The original looks like this:
<if condition="$show['createuserpagelink']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=create">Create Your Userpage</a></td>
</tr>
</if>
<if condition="$show['edituserpagelink']>
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=edit">Edit Your Userpage</a></td>
</tr>
</if>
But I want to only show the links to users who have filled out a profile field. After many searches, I thought this should work:
<if condition="$show['createuserpagelink'] && $userinfo['field7']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=create">Create Your Userpage</a></td>
</tr>
</if>
<if condition="$show['edituserpagelink'] && $userinfo['field7']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=edit">Edit Your Userpage</a></td>
</tr>
</if>
But it doesn't return anything, even when field7 has been filled out.
What am I doing wrong here? :(
There is a part of the install that requires you to add some code to the usercpshell template. This code simply displays the links for creating/editing the userpage.
The original looks like this:
<if condition="$show['createuserpagelink']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=create">Create Your Userpage</a></td>
</tr>
</if>
<if condition="$show['edituserpagelink']>
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=edit">Edit Your Userpage</a></td>
</tr>
</if>
But I want to only show the links to users who have filled out a profile field. After many searches, I thought this should work:
<if condition="$show['createuserpagelink'] && $userinfo['field7']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=create">Create Your Userpage</a></td>
</tr>
</if>
<if condition="$show['edituserpagelink'] && $userinfo['field7']">
<tr>
<td class="$navclass[signature]" nowrap="nowrap"><a class="smallfont" href="userpage.php?$session[sessionurl]do=edit">Edit Your Userpage</a></td>
</tr>
</if>
But it doesn't return anything, even when field7 has been filled out.
What am I doing wrong here? :(