MTAuthors

Blogs that have multiple authors sometimes have the need for a 'credits' page or something like that that lists everyone. This plugin allows you to do just that by providing a <MTAuthors> tag that Movable Type lacks. Continue reading for documentation and download link.

Availability

You can download this plugin here: mtauthors-1_32.zip

Installation

To install, place the 'authors.pl' file in your Movable Type 'plugins' directory. The 'authors.pm' file should be placed in a 'bradchoate' subdirectory underneath your Movable Type 'extlib' directory. Your installation should look like this:

  • (mt home)/plugins/authors.pl
  • (mt home)/extlib/bradchoate/authors.pm

Refer to the Movable Type documentation for more information regarding plugins.

Description

This plugin allows you to list the authors for your blog. You can also use any of the 'Author' tags within a MTEntries tag if you so desire.

Tags made available through this plugin:

  • <MTAuthors>: Container tag for listing available authors.
  • <MTAuthorID>: The author's ID.
  • <MTAuthorName>: The author's name.
  • <MTAuthorNickname>: The author's nickname.
  • <MTAuthorLink>: Prints a link for the author, either with an anchor href to their URL or a mailto link if URL is undefined but e-mail address is.
  • <MTAuthorURL>: The URL for the author.
  • <MTAuthorEmail>: The author's e-mail address.
  • <MTAuthorPublicKey>: The author's public key (this value is currently unused in Movable Type 2.21).
  • <MTAuthorBlogCount>: The number of blogs the author has access to.
  • <MTAuthorEntryCount>: The number of entries the author has posted to the current blog.

<MTAuthors>

This container tag retrieves the authors from Movable Type.

These attributes are allowed:

  • permissions: Allows you to specify what permissions are required to be listed. Separate permissions using a comma. Valid permissions you can filter by are (and they are case-sensitive):
        post
        upload
        edit_all_posts
        edit_templates
        edit_authors
        edit_config
        rebuild
        send_notifications
        edit_categories
        edit_notifications

Examples:

This will produce a list of all authors who have permission to post entries to the current blog:

<MTAuthors permissions="post">
  <MTAuthorName>: <MTAuthorURL><br />
</MTAuthors>

This will lists those that can do rebuilds and edit the blog's configuration (super users!):

<MTAuthors permissions="rebuild,edit_config">
  <MTAuthorName>: <MTAuthorURL><br />
</MTAuthors>

This lists all available authors for the current blog:

<MTAuthors>
  <MTAuthorName>: <MTAuthorURL><br />
</MTAuthors>

<MTAuthorID>

Provides the author's ID.

<MTAuthorName>

Provides the author's name.

<MTAuthorNickname>

Provides the author's nickname.

<MTAuthorEmail>

Provides the author's e-mail address.

These attributes are allowed:

  • spam_protect: If specified, this will use the Movable Type technique for 'masking' an e-mail address so that it is less likely to be harvested for spamming.

<MTAuthorLink>

Produces a link for the author either using the URL or e-mail address for that author.

These attributes are allowed:

  • spam_protect: If specified, this will use the Movable Type technique for 'masking' an e-mail address so that it is less likely to be harvested for spamming.

<MTAuthorPublicKey>

This will produce the value of the 'public_key' stored for the author. This is a new Movable Type field reserved for future use.

<MTAuthorBlogCount>

This will produce the number of blogs the author has access to.

<MTAuthorEntryCount>

This will produce the number of entries the author has created.

Support

If you have any questions or need assistance with this plugin, please add your questions and/or comments using the form below.

License

Released under the MIT License.

Changelog

  • 1.32: Fixed test for checking for inner 'MTEntries' tag. Thanks to Kevin Shay (www.staggernation.com) for the pointer.
  • 1.31: Patch to add 'use' statement for the MT::Template::Context class.
  • 1.3: Added AuthorID tag.
  • 1.2: Bugfix to authors.pl.
  • 1.1: Added AuthorBlogCount, AuthorEntryCount.
  • 1.0: Initial release

TrackBack

TrackBack URL for this entry:
http://bradchoate.com/mt/feedback/tb/248

Listed below are links to weblogs that reference MTAuthors:

» Carla, Tabitha, Jayme: from gym.blog
I've installed the MT Authors hack, so now everything gets all nice and sorted by author. This means that [Read More]

» Carla, Tabitha, Jayme: from gym.blog
I've installed the MT Authors hack, so now everything gets all nice and sorted by author. This means that [Read More]

» Carla, Tabitha, Jayme: from gym.blog
I've installed the MT Authors hack, so now everything gets all nice and sorted by author. This means that [Read More]

» movabletype plugins from jknoll.org...
with this new redesign, i figure i should give credit (where it is due) to the authors of the various movabletype external resources i've utilized:

    ...
[Read More]

» MT Plugins Installed from Technology Updates
The following MovableType plugins were installed: From Brad Choate IncludeEx - Improves on MT’s Include tag by processing the included file for MT tags. MTAuthors - This plugin allows you to list the authors for your blog. You can also... [Read More]

» Two Useful MT Plugins from Contrast
Brad Choate has two very useful plugins that allow me to list all authors and to include some cool texts with inline formating. Like ® © and a list for anything listing is easy with a # oh boy i... [Read More]

» Cobbling together the site from Suck it, Trebek
Ok bigdog is doing a bang-up job with the look and feel. I'm trying to get the Authors pop-up menu working. Here's a list of my resources so far. (i'm having little luck) UPDATE: IT WORKS! Look in the extended entry to find out the fix.... [Read More]

» Small Tweak from Constantly Risking Absurdity
I've added Brad Choate's MTAuthors Plugin so we can all see who's been slacking round here, maybe we'll compete 'till the end of the year (the winner buys the rest a beer) :)... [Read More]

» MT Plugins from Life. Love. Faith.
Wanted to give some shoutouts to the kickin' MovableType plugins that are making the new design of the site rock... [Read More]

» CustomFields 1.0 from Movalog
I'm incredibly proud to announce CustomFields 1.0. This is a plugin set consisting of two plugins, one for entries and the other for authors, that allow you to (finally) define custom fields in a powerful way rather than resorting to... [Read More]

» Styling Movabletype Comments from ProfitPapers
So how do you get people adding comments to your blog? Stylizing Movable Type's comments of course. Comments are the stickiness factor for many large weblogs. The Movabletype comments feature allows anyone to add valuable content to any entry. Acti... [Read More]

» Movable Type Tipp: MTAuthors sortieren from pixelgraphix
Wer das Plugin MTAuthors von Brad Choate verwendet, um Informationen ├╝ber mehrere Autoren eines Movable Type Weblogs auszugeben, kann diese per ID sortieren. Laut Angaben des Autors sortiert das Plugin die Daten nach dem Namen. Nutzt man die ID, werden... [Read More]

23 Comments

The Dead One said:

I'm afraid I can't get this to work. It's not the first plugin I've used and I followed the instructions but it does not produce anything.

I'm not using mySQL - would this effect it?

Sammael said:

It does not work for me either. And I am using MySql. I have followed the exact installation text written here. Any clue ?

No go for me either.

Brad Choate said:

You must be running Movable Type 2.21 for these plugins to work. MT 2.2 had a bug that kept custom container tags like MTAuthors from working.

Aside from that, this plugin does NOT require MySQL to work.

Justin Hall said:

Brad - thanks for your work developing this tool. Great idea!

I'm trying to use your Authors plug-in on the lower left hand corner of this page: http://www.chanpon.org/test.html - under the left hand navigation bar, between "test" and "tested" I have this code:

<MTAuthors>
<MTAuthorName>: <MTAuthorURL><br />
</MTAuthors>

- all I see is the : colon between fields; there's no data coming from my MT (v2.21). Is there any way for me to debug this? Thanks for your time.

Sammael said:

Hey Justin, it seem to work on your site now. How did you fix it ? I have the same setup as you, but still nothing before or after the colon.

Thanks

Scott said:

I am trying to generate a list of authors and a list of entries for each. When I try the following:

<MTAuthors permissions="post">
<MTAuthorName>
<MTEntries author="<MTAuthorName>">
<MTEntryTitle>
</MTEntries>
</MTAuthors>

I get the following error message:
Build error in template 'Authors Index': Error in tag: Error in tag: You used an 'MTEntryTitle' tag outside of the context of an entry; perhaps you mistakenly placed it outside of an 'MTEntries' container?

So, I need soome way of automatically placing the author names in the MTEntry tag. I was this list to be automatically updated when new authors and entries are added.

Any suggestions?

Brad Choate said:

Unfortunately, you can't embed MT tags inside another like that. My next update to this plugin will pre-select the entries for that author so that all you have to do is say <MTEntries> ... </MTEntries> and it will expand out accordingly.

Scott said:

I was impatient (because I had promised one of the authors this feature), so I added another container tag (MTAuthorEntries) and three other tags to support what I wanted. But, since I wanted the entry titles sorted, I hacked Entry.pm so that entry titles are indexed. You can see the output page at
http://www.mcgerik.com/lis/authors.php

Phillip Winn said:

Fantastic! I've been testing this for use with Blogcritics.com. I did make a few changes to the code to allow for sorting the authors. Otherwise they come out in what appears to be the order in which they were created.

However, being unfamiliar with the list_iter method and accessing the DB stuff in general, I did it by sorting based on the first tag specified in the template. You can control the sort order in a non-obvious way by using a field hidden in a comment (e.g. <!--<MTAuthorName>-->), but I'm thinking that there is probably a better way to do this.

With a little more time, I could probably come up with a "sort" attribute to the "MTAuthors" container. Is this something people would want?

Brad, would you rather I just send you what I've already done (three very small code changes) so that you can do this? You'd do a better job, I'm sure.

Brad Choate said:

Actually, the sort order for the authors was supposed to be by name. An update to the plugin (perhaps tonight) will address that so it sorts by name. It will also allow for listing the entries for the authors. I had given thought to allowing a 'sort' parameter to be given, but since the only indexed fields for author are name and e-mail address I didn't see the need.

For more control over your author listing, you might try the SQL plugin. It lets you do a query of your authors from the database. So you could sort on 'nickname' or 'url' or whatever other field you'd like.

Phillip Winn said:

I had noticed the sort-by-name thing in the code, but it obviously wasn't working, and as I mentioned, I don't know how load_iter works.

I don't use MySQL, so the other plugin won't do anything for me.

I'm not sure I really need to sort by anything other than name, so if that is fixed, I'll probably leave it at that. Sorting by any field wouldn't be that difficult, but for a huge number of authors, it could chew up some memory/CPU to store and sort the array.

Thanks!

Richard Smith said:

I am trying to get this to work --- my first plugin, so that probably explains it. I have tried to follow the instructions but I am sure I am getting something in the wrong place. Here is my setup"

[cgi-bin]/mt/plugins/authors.pl

[cgi-bin]/mt/extlib/bradchoate/author.pm

It that right? I have mt 2.21 and it didn't have a pre-existing plugins OR extlib directories, so I ahve created them where I think they should be. I do not have mt documents served out of the cgi-bin directory, but from a documents directory...

Andrew said:

Hey Brad, dumb question: where do I actually SET an AuthorName and AuthorNickname? In MT, I'm only aware of user login names as identification. Can you have a user login "andrew" with an associated name "Andrew Otwell"?

Brad Choate said:

'AuthorName' is a little misleading I suppose. It pulls from the author_name field in the author table, so that's why it's named that. The 'name' is actually the MT username. 'AuthorNickname' is for the 'author_nickname' field. You assign both of these on the user profile screen in MT. Login and click the "Edit Your Profile" link from the main menu to get to it.

Jacob said:

Is it possible to sort by entry count? I want to show who has the most posts, in decsending order..

Garrett Albright said:

Okay, well... You know how you can fairly easily set up MT so that it can show you all of the posts that are in a certain category? Well, what I'm hoping to do is create a page that shows all the posts written by a certain author, without having to actually create a page by hand for each author, then put <MTEntries author="Somebody"> in all of 'em. Ya know what I mean? Just like the MT script takes care of that automatically with Categories, I'd like it to do that with Authors.

I'm sure there's a way, and this plugin might be key... Alas, exactly how to get this to work is eluding me. Has anyone else stumbled across the same answer? I'd greatly appreciate it if you could share with me how you did it.

Garrett Albright said:

Hmm. Never mind about that above comment so much, I suppose... I've figured out how to get MT to give me a custom page when I give it an author's name... now I'm trying to do what Scott was trying to do, which doesn't seem to be possible, although I'm not getting an error as he did. Ah well... I'll keep plugging at it.

kelly said:

Just a quick thank you - I came across this plug-in months ago, but thought it would be too difficult to install (I'm useless with hacking stuff). However tonight I gave it a try and managed to install it without a hassle. It's perfect! Thanks ever so much :)

Faf said:

is there a way of sending a "NOT" command to this script. It'll be very helpful in listing all authors who are NOT allowed to "edit_config"...

one use of this i can think of is this:

on my archives page,http://dotfaf.com/v2/ i list all entries in the blog but then i have another portion which lists only entries not made by me.

I was thinking about using the authors plugin to do something like this, but i cant find a way of telling it NOT me, ie. cannot edit_config.

Howard said:

Hi. We're using this at Correspondences.org. We really like it. We actually are also using a bit of code from the javascript referenced here: http://www.movabletype.org/support/index.php?act=ST&f=9&t=19620&s=65a7b40bd44d76f971139067d0165e9f What I'd like to do is figure out how to sort by author who has the most entries first. It would also be useful to not show authors who have 0 entries. Any advice on that? Thanks for making this, Brad. -- Howard

Howard said:

I should link the page:
http://www.correspondences.org/author.html

Marc North said:

Brad, is there a way to produce a unique list of authors, across all blogs within a single installation of MT? If nested within , authors are duplicated. (I'm trying to show total posts for each author across a multi-blog intranet.) Thanks!

About

This article was published on August 1, 2002 6:53 PM.

The article previously posted was Dear Tim.

The next article is Way too many games.

Many more can be found on the home page or by looking through the archives.

Powered by Movable Type