Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-14 21:16:36

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

mta_author_section: Author bio/profile section plus glue

Note: Clean URLs” must be enabled.

This plug-in allows you to link author names to a section containing an article per author, much like bos_author, but also provides some extra behind-the-scenes glue between author sections and article searches by author name.

The following preferences need to be set and can be later changed from the “mta_author_section” tab under the “Extensions” tab:

  • Author section name – The section you intend to store author bio/profile articles.
  • Author article title as – Whether you want the author’s bio/profile article’s title to be their real name or user ID.

It also implements the following single tags:

mta_author

Syntax

The mta_author tag has the following syntactic structure:

<txp:mta_author />

Attributes

The mta_author tag will accept the following attribute (note: attributes are case sensitive):

link="integer"

When set to 1, returns a link to the author’s article in the author section, otherwise returns just the author’s name if set to 0. Available values: 0 or 1 (default).

display="string"

When set to realname, returns the user’s full name or returns the user’s ID if set to id. Available values: id or realname (default).

Example

<txp:mta_author link="0" display="id" />

mta_author_article

Syntax

The mta_author_article tag has the following syntactic structure:

<txp:mta_author_article />

Attributes

The mta_author_article tag is an extension of the built-in article_custom tag, so it accepts the same attributes. The only modification is to the following attribute:

author="string"

Restrict to articles by specified author, otherwise restrict to the current author search if left blank. Default is unset, so restrict to the current author search.

Example

<mta_author_article section="article" />

Change Log

v0.1 Initial release. Download: mta_author_section-0.1.txt (corrected link – 8/14/2014)

Offline

#2 2008-10-17 13:14:43

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: mta_author_section: Author bio/profile section plus glue

Hi Morgan

Thanks for making this plugin, really helpful. But I have some trouble figuring out how to use it.

For a blog where would you put the <txp:mta_author_article /> tag?

Like this?
<txp:if_section name=“blog”> <txp:mta_author_article />
<txp:else /> <txp:article />
</txp:if_section>

Does not work for me…

Should it replace the normal <txp:article /> tag?

Should I create a separate section called for example “authors”?

I’ve tried lots of different stuff, but I simply can’t grasp what goes where…

Should I create an article with the same name as the author?

Last edited by raveoli (2008-10-17 14:04:18)

Offline

#3 2008-10-17 17:33:33

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: mta_author_section: Author bio/profile section plus glue

The <txp:mta_author_article /> tag is really just there so you can show a list of articles by that author on their author page. For example, on the page for your author section, you might want something like the following:

<txp:if_individual_article>
<txp:article />
<txp:if_section name="authors">
<h3>Recent Articles:</h3>
<txp:mta_author_article />
</txp:if_section>
</txp:if_individual_article>

I don’t think there’s much of a use for it elsewhere.

Let me know if that makes sense or helps.

Offline

#4 2008-10-17 21:39:58

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: mta_author_section: Author bio/profile section plus glue

Aha, but my problem is I don’t know:

How do I tie an author profile ie. article to the author link? Using the <txp:mta_author /> tag in the article form does give a link, but the link is 404 at www.blah.com/blog/oliver-nielsen, even though I’ve created an article named Oliver Nielsen with the url “oliver-nielsen”…

Basically, you’ve described the syntax, but not where it should go, and what should go where.

Last edited by raveoli (2008-10-17 21:40:58)

Offline

#5 2008-10-17 22:14:53

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: mta_author_section: Author bio/profile section plus glue

I okay, I understand now. Here’s how to get started (and I’ll try to update the documentation this weekend):

1) Create a section for author profiles (“authors” or whatever you want)
2) Go to the “Extensions” tab and click on the “mta_author_section” tab, then select the “author section name” (“authors”, in my example)
3) Select “author article title as” (either “User ID” of “Full Name) and click “Save”
4) Create an article containing the author’s profile/bio with either the user’s ID or full name as the title (depending on which you selected for “author article title as” above) and put it into the author section (“authors”, in my example)

Now the link should point to that user’s bio/profile article. If you then wanted to modify the page for that author section to also show recent articles below the user’s bio/profile, then you could do so as I mentioned in my previous reply.

I’m happy to make any further clarifications, if needed.

Offline

#6 2009-06-25 05:50:51

linkingarts
Member
Registered: 2006-06-18
Posts: 14

Re: mta_author_section: Author bio/profile section plus glue

Would this be easy to extend to create a linked list of authors, with a count of posts, e.g.

  • Sys Admin (1)
  • Anonymous Coward (12)
  • Semiprivileged User (2)

Or might there be an easier or other existing way?

thx!

Offline

#7 2009-10-19 19:26:27

wchung
Member
Registered: 2009-04-23
Posts: 29

Re: mta_author_section: Author bio/profile section plus glue

We have several columnists who write in our editorial section.

I would like each editorial article to list the 10 most recent articles by the author who wrote that article but not the article itself. Is there some way to do this without having to create separate page templates or categories for each author?

Thanks.

Offline

Board footer

Powered by FluxBB