Removing Email Column from Memberlist

Started by trcx, June 25, 2011, 11:46:29 AM

Previous topic - Next topic

trcx

Hi all, 

    I am working on a mobile theme, and am looking to make it as full featured as possible.  Can any help me remove the email column from the member list.  I can remove the text from the column easily myself, but can't seem to ride myself of the header.  The code that needs to be modded is
Code ("php") Select

// Display each of the column headers of the table.
foreach ($context['columns'] as $column)
{
//echo $context['columns'] as $column;

// We're not able (through the template) to sort the search results right now...
if (isset($context['old_search']))
echo '
<th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
', $column['label'], '</th>';
// This is a selected column, so underline it or some such.
elseif ($column['selected'])
echo '
<th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . ' nowrap="nowrap">
<a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" /></a></th>';
// This is just some column... show the link and be done with it.
else
//echo $column['link'];
echo '
<th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
', $column['link'], '</th>';
}


I don't want to remove the column from the database, as I wanted it still accessible on the desktop version of the site...I was thinking along the lines of
Code ("php") Select
if ($columnname!="Email") then //display column name
I couldn't seem to work that out...I still a little new to how SMF structures everything, but have a pretty good grasp on programming. 

Thanks for your help :)

Advertisement: