Makes information about the next user from a user list available.
<fm:UserNext groupId="123">
<fm:Loop>
<h1>Next user:</h1>
<a href="/profile/{$$user.id}?{$$user.filterString}">{$$user.user}</a><br />
</fm:Loop>
<fm:NoResults>
<h1>At start of user list</h1>
</fm:NoResults>
</fm:UserList>
This component is intended to be used within a template arrived at from a user list component. It will accept the same filters and sorting options as a user list and make available details about the next user in that list.
All attributes from the fm:UserList component are supported with the exception of "pageSize" and "startPage". These supported attributes may also be set via GET variables (the query string). Any values filters or sorting set via attributes will override the same parameters within GET variables. This allows the developer to have this component only show the next user matching specific filters without allowing the end user to bypass the filtering.
Name | Required | Default | Description |
---|---|---|---|
accounttype | Optional | Filters based on the account type | |
active | Optional | none | Filters the results based on whether the users are active or not. Supported values are either 'true' (users with active accounts) or 'false' (users with non-active accounts). Leave out to get users with active and non-active accounts |
assignmentNotification | Optional | none | Filters based on the notifications enabled, either 0 or 1 |
city | Optional | Filters based on the city | |
country | Optional | Filters based on the country | |
deviceGeoCenter | Optional | none | Latitude,Longitude center point to be used with deviceGeoDistance |
deviceGeoDistance | Optional | none | Distance in meters user can be from the deviceGeoCenter location |
disabled | Optional | none | Filters the results based on whether the users have their accounts disabled or not. Supported values are either 'true' (users with disabled accounts) or 'false' (users with non-disabled accounts). Leave out to get users with disabled and non-disabled accounts |
Optional | Filters based on the email address | ||
evenClass | Optional | The contents of this attribute will be placed in the 'loop.evenClass' template variable, only for even row-numbers. This allows you to give every even row a specific css class | |
fields | Optional | See below | Comma-separated list of fields you'd like to use. See below for a list of supported fields |
firstname | Optional | Filters based on the first name | |
gender | Optional | Filters based on the gender | |
groupId | Optional | none | Only return users in the specified group |
lastname | Optional | Filters based on the last name | |
occupation | Optional | Filters based on the occupation | |
oddClass | Optional | The contents of this attribute will be placed in the 'loop.oddClass' template variable, only for odd row-numbers. This allows you to give every odd row a specific css class | |
school | Optional | Filters based on the school | |
sort | Optional | created DESC | Sortfield. You can currently sort on id, user, firstname, lastname, friends, publicfiles, nickname, city, country, gender, email, unmoderatedfiles, approvedfiles, deniedfiles, active, lastlogin and created. By default this component will sort Descending, to sort Ascending use for example 'friends ASC' |
state | Optional | Filters based on the state | |
user | Optional | Filters based on the username |
The following fields for the 'fields' attribute are supported:
Name | Description |
---|---|
loop.hasResults | The contents of this variable will be either 0 or 1, depending on if there are items in the list. |
loop.oddClass | The contents of this variable will reflect the "oddClass" attribute. This will only be set for odd rownumbers. |
loop.evenClass | The contents of this variable will reflect the "evenClass" attribute. This will only be set for even rownumbers. |
loop.index | The 0-based index of the item in the loop. (Will contain 0,1,2,3,4, etc.) |
loop.count | The count of the current item in the loop. (Will contain 1,2,3,4,5 etc.) |
loop.currentPage | If a pager is involved in this loop, this will contain the current page number (0-based index). If page information is not available, this will be 0. |
loop.currentPage1 | This value is currentPage + 1. This number can be useful to display the current page number to use user. (people generally count from 1, not 0). |
loop.totalPages | Total number of pages avaiable in this loop. This will be 0 if the loop does not support paging. |
loop.totalItems | Total number of individual items. This will be 0 if the loop does not support paging. |
loop.pageSize | Total number of items on 1 single page. This will be 0 if the loop does not support paging. |
user.user | The username |
user.email | User's email address |
user.firstname | User's given name |
user.lastname | User's family name |
user.address1 | Address line 1 |
user.address2 | Address line 2 |
user.cellphone | User's cellphone number |
user.phone | User's homephone number |
user.city | User's city |
user.country | User's 2-letter country code |
user.created | Created date and time |
user.friends | Number of friends |
user.geo_latitude | The user's latitude |
user.geo_longitude | The user's longitude |
user.id | The user's unique id |
user.meta | The user's meta-data (an array). Its values are configurable in the user profile page. Because the user's metadata is configurable, its variables differ for each user. Sample user_metadata variables for the templates are:
|
user.json_meta | The User's meta-data represented as a json object. |
user.description | The user's description |
user.gender | The user's gender |
user.website | The user's website |
user.occupation | The user's occupation |
user.nickname | The user's displayname/nickname |
user.accounttype | The user's account type. Numeric field (integer) Its value can range from 0 to 262144 (2^18). Its value is held in the variable {$$loggedinuser.accounttype}. Most likely values are 10, which stands for voter, and 11 which denotes entrant. The value can be set by template developers, who can set the value of the intergs to have any meaning that is necessary. Examples of filetypes: 1 = Administrator 2 = User 10 = Voter 11 = Entrant |
user.postalcode | The user's postalcode |
user.approvedfiles | The number of approved media items this user has |
user.deniedfiles | The number of denied media items this user has |
user.unmoderatedfiles | The number of unmoderated media items this user has |
user.publicfiles | The number of uploads this user did |
user.state | 2-letter state code |
user.externalids | Array of external ids from various providers the user may have. Eg. user.externalids.0.external_id_provider, user.externalids.0.external_id, user.externalids.0.external_id_sub_provider |
user.deviceinfo | An array of the user's devices, returned only when fields[deviceinfo] is set. The values returned are as follows: (with i being the iterator of the user's devices, should the user have more than one)
|
user.offset | 0-based offset from start of list. Example: the fourth user on the second page, where pages are 50 users long, has offset 53. |
user.filterstring | Provides a string to be used in conjunction with the fm:UserNext and fm:UserPrevious components. This string will contain all filters and sorting that was applied to this user list. Use this in a link as "<a href='/profile/{$$user.id}?{$$user.filterString}'>{$$user.user}</a>". |
user.disable_media_notifications | The user's setting for Media notifications - an integer: (0 for allow notifications, 1 for disable notifications) |
user.disable_thread_notifications | The user's setting for Thread notifications - an integer: (0 for allow notifications, 1 for disable notifications) |