getUserProfiles 1.1.0-beta1

getUserProfiles 1.1.0-beta1

Released Dec 01, 2013 by sepiariver

Snippet to get formatted user profile information and return Resources created by a specified author. Also includes an output modifier that generates the gravatarUrl from an email address.

More info: http://www.sepiariver.ca/blog/modx-web/modx-snippet-to-get-user-profiles-and-gravatar

Download 12kb (1168 downloads)
Downloads: 1,388
License: GPLv2
Requires Revolution 2.2.x or greater
Supports mysql

Added getResourcesAuthor, a simple wrapper for getResources that returns Resources created by a specified author. Can be used just like getResources, with getPage if desired.

Installation Instructions

----------------------------
USAGE
---------------------------- 

To use getResourcesAuthor snippet:
----------------------------------
Example: http://yourdomain.com?author=2

If [[!getResourcesAuthor? ... ]] was called (uncached) on the page, the above request would return Resources created by MODX User ID 2. All getResources properties, including &where, can be used. getResourcesAuthor simply runs getResources. Can be used with getPage.

To use getUserProfiles snippet:
-------------------------------
[[getUserProfiles]]
Prints an array of up to 5 active users' profiles

[[getUserProfiles?group=`1`&showInactive=`1`&limit=`20`&tpl=`myUserTpl`]]
Where [[$myUserTpl]] contains:
[[+id]]<br>
[[+name]]<br>
[[+email]]<br>
[[+phone]]<br>
[[+mobilephone]]<br>
[[+comment]]<br>
[[+website]]<br>
[[+extended.attribute1]]<br>
[[+extended.attribute2]]<br>...
Outputs formatted user profile information for up to 20 users from User Group ID 1, regardless of active state

Note: the value passed to [[+website]] is stripped of url scheme for consistency, so you must prefix with a valid scheme for links to work. Example: <a href="//[[+website]]">

To use gravatarUrl output modifier:
-----------------------------------
<img src="[[+email:gravatarUrl]]" alt="gravatar">
Where [[+email]] is a valid email address the above will generate the gravatar URL for the img src 

For more info: http://www.sepiariver.ca/blog/modx-web/modx-snippet-to-get-user-profiles-and-gravatar

1.1.0-beta1 Dec.1,2013 Added getResourcesAuthor snippet. 1.0.0-beta1 Initial beta release.
Version Released Author Downloads
2 Versions 1 Contributors 1,388 Downloads
1.0.0-beta1 Sep, 20 2013 sepiariver 220