<?php
$lang['friendlyname'] = 'Frontend User Listing';
$lang['postinstall'] = 'Post Install Message, e.g., Be sure to set "Use Skeletons" permissions to use this module!';
$lang['postuninstall'] = 'Post Uninstall Message, e.g., "Curses! Foiled Again!"';
$lang['uninstalled'] = 'Module Uninstalled.';
$lang['installed'] = 'Module version %s installed.';
$lang['prefsupdated'] = 'Module preferences updated.';
$lang['accessdenied'] = 'Access Denied. Please check your permissions.';
$lang['error'] = 'Error!';
$lang['error_nosuchgroup'] = 'User group is not specified or does not exist';
$lang['upgraded'] = 'Module upgraded to version %s.';
$lang['title_mod_prefs'] = 'Module Preferences';
$lang['title_mod_admin'] = 'Module Admin Panel';
$lang['title_admin_panel'] = 'Frontend User Listing Module';
$lang['error_nosuchgroup'] = 'No such user group in the system';
$lang['error_nogroupspecified'] = 'No user group specified';
$lang['error_nogroupspecified'] = 'No user id specified';

$lang['submit'] = 'Submit';
$lang['summarytemplate'] = 'Summary Template';
$lang['detailstemplate'] = 'Details Template';

$lang['moddescription'] = 'This extention to the Frontend Users module shows Front End User listing in the front end.';
$lang['welcome_text'] = '<p>This extention to the Frontend Users module shows Front End User listing in the front end.  More to be added here...</p>';
$lang['changelog'] = '<ul>
<li>Version 0.3. 21 March 2006. Added sorting by the sortkey parameter.</li>
<li>Version 0.2. 22 February 2006. Improved sorting algorithm, which fixed the bug with lost fields.
Added detailed view for individual users.</li>
<li>Version 0.1. 20 December 2005. Alpha Release.</li>
</ul>';
$lang['help'] = '<h3>What Does This Do?</h3>
<p>It shows Front End User listing in the front end.</p>
<h3>How Do I Use It</h3>
<p>Place the module in a page or template using the smarty tag:</p>
<blockquote>&#123;cms_module module=FrontEndUserListing group=usergroup sortkey=first_name}</blockquote>
<p>Make sure to edit the template to fit your needs.  
You will need to drop the inner foreach cycle and pull properties one by one.<br />
To link to the details view, use the detlink property, it contains the necessary link.<br />
Do not forget to escape email address for spam protection.<br />
For example:<br />

<pre>
&lt;!-- Start FrontEndUserListing Display Template --&gt;

&lt;table cellpadding="8"&gt;

&lt;tr&gt;
&lt;th&gt;Company&lt;/th&gt;
&lt;th&gt;Name/email&lt;/th&gt;
&lt;th&gt;ICQ&lt;/th&gt;
&lt;th&gt;Phone number&lt;/th&gt;
&lt;/tr&gt;

{foreach from=$items item=entry}

&lt;tr&gt;

&lt;td&gt;&lt;a href="{$entry.detlink}"&gt;{$entry.company}&lt;/a&gt;&lt;br&gt;
{$entry.email|escape:"hexentity"}&lt;/td&gt;

&lt;td&gt;&lt;a href="{$entry.email|escape:"hexentity"}"&gt;{$entry.last_name} {$entry.first_name}&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;{$entry.icq}&lt;br&gt;
{$entry.lan_icq}&lt;/td&gt;

&lt;td&gt;office: {$entry.home_num}&lt;br&gt;
gsm: {$entry.cell_num}&lt;/td&gt;

&lt;/tr&gt;

{/foreach}

&lt;/table&gt;
		
&lt;!-- End FrontEndUserListing Display Template --&gt;
</pre>


<p>The details template can have something like this:<br>
<pre>
{$items.first_name->data} {$items.last_name->data} ({$items.sex->data})<br>
{$items.companyname->data}<br>
{$items.industry->data}<br>
</pre>
</p>

<h3>Optional Parameters</h3>
<ul>
<li><i>sortkey</i> - the front end user property name to be used for sorting.  Default: userid.</li>
</ul>

<h3>Tradeoffs</h3>
<p>You can have only one template for all groups.  If your user groups use different sets of properties, you can use one of the following solutions:<br>
<ul>
<li>Adapt your form to show only properties that are used by all groups;</li>
<li>Allow empty fields for groups that do not have these properties;</li>
<li>Use if/else conditions on a property that is required in one group and is not used in the other.</li>
</ul>


<h3>Copyright and License</h3>
<p>Copyright &copy; 2005, Victor Katolyk <a href="mailto:katonchik@gmail.com">&lt;katonchik@gmail.com&gt;</a>. All Rights Are Reserved.</p>
<p>This module has been released under the <a href="http://www.gnu.org/licenses/licenses.html#GPL">GNU Public License</a>. You must agree to this license before using the module.</p>
';
?>
