Hello,
I'm using the mod that allows you to create custom fields in your profile's and I was wondering if someone could help me with creating a page that could display the persons name along with the three fields that I added ?
Thanks.
Something like this mod? http://custom.simplemachines.org/mods/index.php?mod=331
With that you can create a php page that outputs whatever variables you tell it to output.
That looks great, but I'm not really a php coder .... is this something that someone could help me with if I posted what I wanted displayed ?
Where do you want it displayed? In the user's profile? In the memberlist? Somewhere else?
I wanted to have a page similar to the members list, so not really on a page, but it's own page.
What you can do is (as previously mentioned) install the custom action mod:
http://custom.simplemachines.org/mods/index.php?mod=331 (http://custom.simplemachines.org/mods/index.php?mod=331)
then, using the memberlist.template.php as a starting point, print out the fields you want. From my memberlist.template.php which displays 2 custom fields is this:
// Assuming there are members loop through each one displaying their data.
if (!empty($context['members']))
{
foreach ($context['members'] as $member)
echo '
<tr style="text-align: center;"', empty($member['sort_letter']) ? '' : ' id="letter' . $member['sort_letter'] . '"', '>
<td class="windowbg2">', $member['options']['CP1'], '</td>
<td class="windowbg2">', $member['options']['CP2'], '</td>
<td class="windowbg2">', $member['avatar']['image'], '</td>
</tr>';
}
of which a lot was taken from this thread:
http://www.simplemachines.org/community/index.php?topic=92854.0 (http://www.simplemachines.org/community/index.php?topic=92854.0)
You probably have to know a little PHP to get it all together exactly as you want... If not, you can always try posting in the HELP WANTED section...
rowedf, do you still need help with this or did jamesk's reply help you resolve this?
I've added <td class="windowbg2">', $member['options']['CP1'], '</td> to managemembers.template.php but it doesn't work. Column displays nothing.
I think I have to add another code but what is? :-\