« IfAvailable - Test Availabiity of Plugins and Perl Modules | Main | MT Forum - Integrated Forums for Movable Type »

User Profiles 1.6 - Support for MT 4.1

User Profiles is a plugin for Movable Type 4.1+ that extends the user profiles in MT. Version 1.6 adds support for MT 4.1.

In the Pro version, extended profiles can be edited from the admin interface, or by commenters:

New features

Version 1.6 primarily adds support for MT 4.1. In the latest version of MT, user profile images are a core feature, called "userpics". If you previously installed the User Profiles plugin on MT4, version 1.6 will automatically migrate your users' profile photos to use the new core Userpic system.

Note that while Userpics are a core feature in MT 4.1, there is no core feature for enabling commenters to upload their userpics -- you will need the User Profiles plugin to enable that.

Features in User Profiles 1.6

  • Commenters can upload a profile image (any authenticated commenter, including Vox, OpenID, etc.)
  • Authenticated commenters can edit basic profile info

Features in User Profiles Pro

User Profiles Pro includes the following additional features:

  • Authors and commenters have extended profiles. Extended profiles come with 22 built-in fields (such as City, Country, Birthdate, About Me, etc.).
  • Custom fields for extended profiles can be defined by system administrators
  • Publish profile pages for each author and commenter, including profile images, basic and extended profile info, recent entries, and recent comments.
  • Automatically import profile images (avatars) for all your existing users from Gravatar, MyBlogLog, Vox, Livejournal, and BlogCatalog.
  • AJAX function auto-imports avatars in the background after new commenters login.

How it Works

Authenticated commenters can edit their profiles and upload a profile image:

Finally, the <MTAuthorImageURL> and <MTCommenterImageURL> tags can be used to display the user's profile image on your published blog pages (or use the core "userpic" tags in 4.1)

Profile images are stored as Assets within Movable Type. This means that these images can also be used in other ways, such as inserting them into entries. Movable Type will keep the full size image (cropped to square, if necessary) and create thumbnails when using the tags described below. Each profile image is tagged with '@userpic'.

With User Profiles Pro, extended profiles can be edited, either from the admin interface, or by commenter via the "edit profile" link after they login. User Profile pages are published automatically as static pages, which boosts performance for high traffic sites.

Live Demo - Try User Profiles Pro Now

User Profiles Pro has been enabled on the MT Test Blog. Start from this entry and read the instructions. Sign in, edit your profile, upload a photo, view your published profile. Try it now!

Template Tags

Version 1.6 of User Profiles includes the following template tags:

  • <MTAuthorImageURL> - This displays the url to a thumbnail of the author's profile image. There is one optional argument:
    • size - the size in pixels of square thumbnail, default is 50 pixels (each side)
  • <IfMTAuthorImage> - This conditional tag displays its contents if the author has uploaded a profile image.
  • <MTAuthorImageURL> - This displays the url to a thumbnail of the commenter's profile image. There is one optional argument:
    • size - the size in pixels of square thumbnail, default is 50 pixels (each side)
  • <IfMTCommenterImage> - This conditional tag displays its contents if the commenter has a profile image. Note: if you posted a comment on your own blog (while signed in), your profile image will be displayed using this tag.

Example: In your "Entry Metadata" template module, your could add the following:

<MTIfAuthorImage><img src="<MTAuthorImageURL size="50">" align="left" /> </MTIfAuthorImage>

This would display the author's profile image, if they have one in their profile.

Similarly, in your "Comment Detail" module, you could add:

<MTIfCommenterImage><img src="<MTCommenterImageURL size="50">" align="left" /> </MTIfCommenterImage>

Both example above can be seen in action on the MT4 Test Blog.

User Profiles Pro Template Tags

User Profiles Pro includes the following additional tags:

  • <MTAuthorProfileURL> - This displays the url to the author's published profile page.
  • <MTCommenterProfileURL> - This displays the url to the commenter's published profile page.
  • <MTEntryAuthorLink> - This replaces the core tag of the same name. Instead of linking to the author's URL, it will link to the author's profile page.
  • <MTCommentAuthorLink> - This replaces the core tag of the same name. Instead of linking to the commenter's URL, it will link to the commenter's profile page. If the commenter was not authenticated, it will link to the URL provided.
  • <MTUserProfile> - This tag is used to display extended profile information. There is one required argument:
    • field - the name of the field that you wish to display. For built-in fields, valid values are birthdate, first_name, last_name, address, city, state, country, mobile_phone, land_phone, sex, marital_status, occupation, company, signature, about_me, activities, interests, music, tv_shows, movies, books, or quotes. For custom-defined fields, use the defined name of the field (more on custom fields below). Note that for the built-in "birthdate" field, you can also specify a "date_format" argument that follows MT's date formats.
  • <MTAuthorComments> - This container tag, which is used on the default "User Profile" template, displays the comments from the author in context. On the published User Profile page, this is used to display a list of recent comments by the user.

User Profiles Template Set

User Profiles comes with several default templates that are easy to install with the Template Installer plugin. The User Profile template set includes the following templates:

  • Javascript - This a replacement for the core "Javascript" index template. If you have customized your existing template, it will be backed up during the installation process. The new version includes some new features for User Profiles.
  • Edit User Profile - This template module is used to display the "edit profile" page that commenter's see when they click the "Edit Profile" link. Note that this template also displays the image upload and the "edit extended profile" pages. You can customize the user profile experience (and extended profile fields) bu editing this module. Note: you should not rename this template module.
  • User Profile (Pro only) - This template module is used to publish the User Profile pages. Customize this template to change the way user profiles are displayed. A special note about this template -- when you save it, it will automatically republish all user profile pages (no need to republish your site). Note: you should not rename this template module.
  • YUI Javascript (Pro only) - This template module includes reference links to several Yahoo Javascript libraries. This template should be included in the Header template for all feedback templates (Entry archives). The auto-image-import AJAX function uses these libraries. Note: if you are already using the Ajax Comments plugin, then you already have this module, so you don't need to include it again.

Requirements

Installation

  1. Download the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation.
  2. You should now see an Upgrade Screen for User Profiles. For User Profiles Pro, the upgrade will add a new table for extended profiles and import profile images for existing users in your system
  3. Go to System Overview, then to Preferences > Plugins. Then choose User Profiles, then Settings. Entry the blog_id for profile images and templates, and the path for uploading profile images, then save.
  4. Return to the User Profiles settings and click the "Install Templates" button. The templates will be installed into the blog you chose in the previous step.
  5. In your "Header" template, add the following before the </head> tag:

    <MTIf name="include_javascript">
    <script type="text/javascript" src="<$MTLink template="javascript"$>"></script>
    </MTIf>

    And (Pro only) after the line that reads <MTIf name="entry_template">, add:

    <MTInclude module="YUI Javascript">

    Then save your "Header" template.

  6. Republish your Javascript template and Entry archives for the chosen blog

  7. Upload a profile image from your profile. (Tip: the quickest way to get to your profile is to click the "Hi Username!" link in the very top right of the page.) Click the link to add a profile image and follow the steps as shown above.

  8. Edit your extended profile by clicking "Extended Profile" from your profile page

  9. Edit your templates to display profile images, as described in the Template Tags section above.

Customizing Extended Profiles and Adding Custom Fields

User of User Profiles Pro may want to customized the display of the fields or add custom fields to the profiles. Click to read an in-depth article on how to customize Extended Profiles.

Get User Profiles Pro

Commercial License for 1 to 10 blogs - $97

Blog Network License for 10+ blogs - $249

Personal License for 1 to 4 blogs - $33

Get User Profiles

User Profiles v1.6 is free for both commercial and non-commercial use. Note that User Profiles does no include the "Pro" features mentioned above.

Download Now

Download Now
Downloads: 470

As always, comments, questions, and suggestions are welcome.

Rate this entry:

  • Currently 4.3/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4.3/5 (15 votes cast). Powered by the Ajax Rating plugin.

Comments (33)

Awesome, will be upgrading this in a little while.

This might be a simple option to do, but I'm unsure how to do it. Is it possible to limit the size (or even better to auto-resize) of pics uploaded? I have users who upload digital camera pics, which will be 1MB+ in size so then I just have to manually download the pics, resize them and re-upload them. Would be nice if there was an option to do that automatically. Excuse me if it happens to be an easy fix or if maybe you already explained it and I missed it.

Thanks for the suggestion, Bryan.

The commenter upload function will currently upload whatever size is given, then crop to square. Then the plugin will automatically create small version to be displayed on screen. So the larger version are never used (by default) and won't slow down page loads, etc. That said, you still have the larger file on your server, which may be an issue if you have limited space.

The only option with the current version is to use the core MT "CGIMaxUpload" config directive to block uploads over a certain size. Auto-downsizing after uploading could be added as an option in a future version of the plugin.

Hi Mark.

I am paying for server space, so it is an issue for me as you mentioned - otherwise I wouldn't care. Thanks for the CGIMaxUpload config tip. I'm looking into that now.

I'm getting this error when I Install the Template after I enter my blog ID:

Can't use string ("1000") as a HASH ref while "strict refs" in use at /home/15830/domains/aeropause.com/html/movabletype/plugins/TemplateInstaller/TemplateInstaller.pl line 129.

Thanks,
Shane

Ok scratch that, I solved the above error by updating the Template Installer. But now I'm getting the following error when I click on "Edit Profile":

Cannot find column 'userpic_asset_id' for class 'MT::Author' at /home/15830/domains/aeropause.com/html/movabletype/plugins/UserProfiles/../../plugins/UserProfiles/lib/UserProfiles/Tags.pm line 63

Hmm I also can't see the User Profile templates when I go to the template installer. I see a lot of others though :-)

Neop Author Profile Page:

Issues I am having:

1. I upgraded from the previous version (never got to install the templates because there was an incompatibility issue with MT 4.1) and I didn't see any options for image location folder as described in your installation notes.

2. I am able to upload an image from my admin profile page. But that image doesn't show up anywhere, neither on the MT Dashboard nor in my user profile if I login as a commenter.

3. If I try to use your upload form (from the edit profile link when logged in as a commenter) I get this error: Can't call method "Crop" on an undefined value at lib/UserProfiles/Util.pm line 27.

After the install, it runs the database upgrade and when I try to log in to MT I get the following error:

Can't call method "site_url" on an undefined value at /home/rmiles/public_html/cgi-bin/mt/plugins/UserProfiles/lib/UserProfiles/Pro/Tags.pm line 62.

OK, I have that fixed now. I ended up deleting and re-uploading everything in the user profiles directory and that seemed to fix the problem.

Well I've got this all working, but of course, as you mentioned, there's no support at this time for dynamic sites. When do you anticipate releasing a version with dynamic support?

Additionally, is there a way around this issue while still publishing my entries dynamically?

Thanks,
Shane

mirc:

Hmm, thank you Mark..

aeropause,

I will add dynamic support in future if there is enough demand for it. If others are interested in this, please speak up here.

In terms of workarounds, for userpics, you can use the built-in author and commenter userpic tags that come with MT 4.1 -- those will work under dynamic publishing. As for linking to a user's profile from a dynamic page, that is a bit harder, and I don't think there is a workaround for that.

Greg K:


Hi Mark -

I recently upgraded from MT 4.01 to MTOS 4.1. The upgrade went fine, and after I verified that everything was working, could publish to blogs, etc. we purchased and installed the MTForum and Entry Post plugins (along with IfAvailable and TemplateInstaller, of course). As soon as I installed the plugins, the MT admin interface login URL became unavailable. I pulled the plugins, and everything returned to normal.

For Takes 2 and 3 I tried just installing the MTForum plugin into the MT CGI scripts plugins subdir and then the mt-static plugins subdir. Even with just the MTForum plugin, the mt.cgi admin login URL is inaccessible, and the mt-upgrade.cgi URL shows up, for some reason.

Have you heard of any similar behavior? We really would like to use the forum features...


Thanks, Greg

Greg K:


Whoops - my post was meant to be in the comments for MTForum....

Adam Author Profile Page:

Hello. My MT Templates do not include in the header. Where, exactly, should I be putting the ?

Retroriff:

Hi Mark, I'm experiencing a little issue. I'm using 2 differents forms on the edit user profiles template.When I submit the basic profile form the data is modified correctly and everything works. Although the User Profiles Pro data is not rendered after the submission. I think it doesn't load . It is not a JS issue as the code neither appear on the page source. Do you know why is this happening?

Mark, this plugin is only designed for a single blog per MT install, isn't it? Hence the system setting for the Blog ID?

Oh, and @Retroriff, I'm having the exact same issue. The extended profile is not displayed after submission of the basic profile. I'm going to have to look into a hack workaround, like bouncing the user back or something.

keeptry8 Author Profile Page:

I am also confused Mark. If one has multiple blogs beneath a single MT installation, how can one set up the plugin to work for more than one Blog ID?
Thought: Perhaps the System-Level setting is simply an interface to install the templates, and can therefore be continously re-used to set-up UserProfiles on other Blog-IDs, without effecting UserProfiles previously-installed on other Blog IDs.

I upgraded to MT 4.2RC and the headshots have all disappeared - plus entries are listed as under the same name. Is UserProfiles 1.6 incompatible w/ the latest MT beta?

Hi Mark.

Is User Profiles 1.6 still compatible with the latest MT? I have Commercial 4.23 installed and seem to have an issue with the Edit User Profile template that breaks it.

The and tags are listed as Unrecognised Tags in the Template Tags Docs column on the right. I think (?) because of that, that the entry fields aren't showing up on the Edit Profile page like they used to. So as for now, no one is able to add or edit their user pic.

<mtapp:setting>
<mtapp:statusmsg>

(Didn't show up in previous message) These are the 2 tags that are listed as Unrecognised Tags.

brianmoy:

Search engine optimization, the process of improving ranking in search engine resultshttp://www.link4seo.com

Hi im install MTForum but how i can change to blue templates?
Run perfect ;) im very funny with forum static, the others scripts of forum the server is very load

Hi im install MTForum but how i can change to blue templates?
Run perfect ;) im very funny with forum static, the others scripts of forum the server is very load

艾葳酒店經紀:

THANKS^ ^

Whoops - my post was meant to be in the comments for MTForum....

http://www.t7b.com/dlil

Run perfect ;) im very funny with forum static, the others scripts of forum the server is very load

http://www.t7b.com/dlil/show80156.html

Paul:

Fabulous article. Thank you so much!

I get panic attacks just imagining about being apart from my laptop. I’m a visual person so I save to my desktop also. A couple months ago I experienced a computer virus and luckily was able to salvage everything, but I even so feel discombobulated by the entire thing.

Post a comment