In the admin section you can search for users and if you leave the box blank you get all the users.
What i want to do is when the list is compiled i also want to add two more columbs which are: membership level and subscribe to a news group.
I have checked all the forum and searched for 2 days before i posted this as i did not know if this has been done.
So what i looked at is the file at skin1/admin/main/users.tpl file.
I was looking at the section:
Code:
<TR class="TableHead">
<TD></TD>
<TD>{if $search_prefilled.sort_field eq "username"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_username}</TD>
<TD>{if $search_prefilled.sort_field eq "name"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_name} / {if $search_prefilled.sort_field eq "email"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_email}</TD>
<TD>{if $search_prefilled.sort_field eq "usertype"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_usertype}</TD>
<TD>{if $search_prefilled.sort_field eq "last_login"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_last_logged_in}</TD>
</TR>
What i looked at is making the two extra columbs like below:
Code:
<TR class="TableHead">
<TD></TD>
<TD>{if $search_prefilled.sort_field eq "username"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_username}</TD>
<TD>{if $search_prefilled.sort_field eq "name"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_name} / {if $search_prefilled.sort_field eq "email"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_email}</TD>
<TD>{if $search_prefilled.sort_field eq "usertype"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_usertype}</TD>
<TD>{if $search_prefilled.sort_field eq "last_login"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_last_logged_in}</TD>
<TD>{if $search_prefilled.sort_field eq "news"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_news}</TD>
<TD>{if $search_prefilled.sort_field eq "membership"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_membership}</TD>
</TR>
Now the above codes gives me the two extra columbs but no data is shown.
Now the full section of the form is:
Code:
<FORM action="process_user.php" method="POST" name="processuserform">
<INPUT type="hidden" name="mode" value="">
<INPUT type="hidden" name="pagestr" value="{$pagestr}">
<TR class="TableHead">
<TD></TD>
<TD>{if $search_prefilled.sort_field eq "username"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_username}</TD>
<TD>{if $search_prefilled.sort_field eq "name"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_name} / {if $search_prefilled.sort_field eq "email"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_email}</TD>
<TD>{if $search_prefilled.sort_field eq "usertype"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_usertype}</TD>
<TD>{if $search_prefilled.sort_field eq "last_login"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_last_logged_in}</TD>
<TD>{if $search_prefilled.sort_field eq "news"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_news}</TD>
<TD>{if $search_prefilled.sort_field eq "membership"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}
{$lng.lbl_membership}</TD>
</TR>
{section name=cat_num loop=$users}
{assign var="_usertype" value=$users[cat_num].usertype}
{if $_usertype eq "P" and $single_mode eq ""}
{assign var="products" value=$users[cat_num].products}
{else}
{assign var="products" value=""}
{/if}
<TR{cycle values=", class=TableSubHead"}>
<TD width="5"><INPUT type="checkbox" name="user[{$users[cat_num].login}]"{if $users[cat_num].login eq $login} disabled{/if}></TD>
<TD>
{$users[cat_num].login}</TD>
<TD>
<FONT class="ItemsList">{$users[cat_num].firstname} {$users[cat_num].lastname}</FONT> / {$users[cat_num].email}</TD>
<TD><SPAN title="{$users[cat_num].membership|default:$lng.lbl_no_membership}">{$usertypes.$_usertype}</SPAN>{if $_usertype eq 'B'}
<FONT class="SmallText">
({if $users[cat_num].status eq 'Q'}{$lng.lbl_unapproved}{elseif $users[cat_num].status eq 'D'}{$lng.lbl_declined}{else}{$lng.lbl_approved}{/if})</FONT>{/if}
{if $products ne ""} <NOBR>({$lng.txt_N_products|substitute:"products":$products})</NOBR>{/if}
</TD>
<TD nowrap>{if ($users[cat_num].last_login ne 0)}{$users[cat_num].last_login|date_format:$config.Appearance.datetime_format}{else}{$lng.lbl_never_logged_in}{/if}</TD>
</TR>
{/section}
<TR>
<TD colspan="5">
<INPUT type="button" value="{$lng.lbl_delete_selected}" onClick="document.processuserform.mode.value='delete'; document.processuserform.submit();">
</TD>
</TR>
<TR>
<TD colspan="5">
<FONT class="FormButton">{$lng.lbl_reg_chpass_admin}</FONT>
<TABLE border="0" cellpadding="2" cellspacing="1">
<TR>
<TD><INPUT type="radio" name="for_users" value="S" checked></TD>
<TD>{$lng.lbl_of_selected_users}</TD>
<TD></TD>
<TD><INPUT type="radio" name="for_users" value="A"></TD>
<TD>{$lng.lbl_of_all_found_users}</TD>
</TR>
</TABLE>
<INPUT type="button" value="{$lng.lbl_apply}" onClick="document.processuserform.mode.value='change_password'; document.processuserform.submit();">
</TD>
</TR>
</FORM>
So what am i missing to show this data, also i am not sure i have used the write names to search, but i do know the columb titles are correct.
could do with some help here so i can then scroll through my customers and look at what member ship level they have and if they are subscribed to a news group.
Thanks.