Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-06 13:20:38

Morgon
Member
From: Selmer, Tennessee
Registered: 2004-12-01
Posts: 23
Website

Posting other author's content, but displaying their bio...

Hello, I’m coding the templates for the redesign of Rose Creek Village’s Website, and would like to have a short “About the Author” section at the bottom of every entry, sort of like what they have at A List Apart .

The problem is that we get writings from all sorts of people, and everything’s posted by only two or three of us, so the built-in Author system in TXP won’t work, as far as I can tell, since every article is going to be assigned the author of whomever posted it online, regardless of who actually wrote it.

I’ve got a custom field called “Author” set up for ths, but I’m wondering how to go about posting the info. I’ve thought of two ideas, and one didn’t work, and I’d rather stick to TXP’s tags instead of using the other:

1: something like this: <txp:output_form form="<txp:custom_field name="Author" />" /> – This didn’t work. I figured that you couldn’t call one tag from inside another.

2: Do a PHP include of a simple text file that contained the bio of each author, using something like: <? include "<txp:custom_field name="Author" />.txt"; ?>

Any other ideas?

Ideally, or at least I think it is :), I’d like to use a form for each author, and somehow call it.

Thanks

Offline

#2 2006-04-06 14:26:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Posting other author's content, but displaying their bio...

(1.) Is there a reason why you can’t just put <txp:custom_field name="author" /> at the bottom of your article form?

If you need it somewhere else on the page, you could create an article form, e.g. ‘author’, with <txp:custom_field name="author" /> in it. Then on your page call it with
<code>
<txp:if_individual_article>
<txp:article form=“author” />
</txp:if_individual_article>
</code>
(if you’re using comments you must turn ‘automatically append comments to articles’ off, otherwise comments will show twice on your page because there are now two article tags.)

You also might want to have a look at ajw_admin_workflow, I’m not familiar with it but it seems to let you change the author of an article.

Offline

#3 2006-04-07 01:07:17

MsContrary
Member
From: California
Registered: 2004-12-27
Posts: 52
Website

Re: Posting other author's content, but displaying their bio...

Els,

Thanks so much for this explanation. I am trying to do exactly the same thing as Morgon and your reply has helped me! I think I had puzzled it out but your information has clarified a few things that were still bothering me.

Now to go try it.

M

Last edited by MsContrary (2006-04-07 01:08:33)


I am not a professional woman

Offline

#4 2006-04-07 13:30:23

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: Posting other author's content, but displaying their bio...

Hi-

I have a site with articles from about 100 authors, but only a handful actually post them themselves, the rest are posted by me.

I use ajw_admin_workflow to post articles in someone else’s name, and bos_author to link to ‘more about the author’ pages, which also list all the author’s writings. And it works a dream!

- Iris

Offline

#5 2006-04-07 15:23:13

Morgon
Member
From: Selmer, Tennessee
Registered: 2004-12-01
Posts: 23
Website

Re: Posting other author's content, but displaying their bio...

Yes, the trick for me was the ajw_admin_workflow plugin. Works like a charm. I’m also trying to use the rss_author_info plug to provide the bio and other information for the Authors, so that I don’t need to use the PHP includes (they work, but I want all my content/info editable in TXP).

Offline

#6 2006-04-07 15:41:56

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: Posting other author's content, but displaying their bio...

If you click on any of the author’s names on A List Apart, you go to alistapart.com/authors/..
Note that’s author*s*, not author. If I’m not mistaken, that’s the bos_author plugin at work there.
And that’s exactly what I’m doing on my site with the bos_author plugin, link to the same kind of bio info/list-of-articles-by-this-author combo that they do.

The “more about this author” block at the bottom of an article is identical to the article you see when you click on the author’s name, so that’s the same article, from the authors section.
I reckon they just have a page that outputs the main article, followed by a related article, matching by author, and from the authors section.

- Iris
<br /><br />

Edit: OK, that wasn’t very clear… for the step-by-step how-to see my next post.

Last edited by M_i (2006-04-07 16:21:53)

Offline

#7 2006-04-07 16:09:04

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: Posting other author's content, but displaying their bio...

Elaborating the plan of attack from my previous post-

First, get yourself the bos_author plugin. This gives you a tag to replace the normal txp:author tag. The txp:bos_author tags creates a link to an article with the author’s name as title within any section you want.

Then make a section to hold your author articles. Something called ‘authors’ or ‘writers’ or whatever. Create an article for each of your authors within this section with all the information you want to display. Use ajw_admin_workflow to assign each of these articles to the author concerned. Change your forms to include that txp:bos_author tag where you would have used txp:author before. But that of course creates a link to the info. To display the bio info on the same page as the article, you need to change the page (i.e. template).

So changing the page- What I use is chh_related_articles, which is a plugin that enhances related_articles. Plain old related_articles may well be fine for this too, give it a try.
In the page you use to display the articles that need the ‘about the author’ bit, just below the article tag (or article_custom, or whatever tag you use to display your article), you’ll need to insert something like this:

<code>
<txp:if_individual_article>
<txp:chh_related_articles section=“authors” relation=“author” limit=“1” form=“form” />
</txp:if_individual_article>
</code><br /><br />

What that’ll do is, in case of a individual article, it’ll find one article in the authors section (or whatever section you used), that is by the same author as the current article, and display it using the ‘form’ form.

Hope this helps!

- Iris
<br /><br />
Edit: Read with crossed out text to recreate what they do at A List Apart, or without it if all you need is ‘About the author’ blocks at the bottom of pages, and not on separate pages.

Last edited by M_i (2006-04-07 17:53:03)

Offline

#8 2006-04-07 17:25:17

Morgon
Member
From: Selmer, Tennessee
Registered: 2004-12-01
Posts: 23
Website

Re: Posting other author's content, but displaying their bio...

Thanks, M_i, that was very helpful. I’m not sure if I want to go that in depth for each author, but it’s a good possibility. :) Thanks.

Offline

#9 2006-04-07 17:47:07

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: Posting other author's content, but displaying their bio...

Morgon wrote:

Thanks, M_i, that was very helpful. I’m not sure if I want to go that in depth for each author, but it’s a good possibility. :) Thanks.

Well, of course the related_article will only show a related article if there actually is one to find. In other words, the “About the author” bit at the end of the page will only be displayed if you have information about that author, if you have an article about (and by) him in that section you specify in the related_article tag.

This was my guess of how they do it at A List Apart. Or, this is how I would recreate what they do there. And as said, when you there click on an author’s name, you land at a page with the same bio information you find at the bottom of the articles, plus all their work – if you also want to do that, you’ll obviously need a page for each author, or you’ll get 404 errors.
But if you don’t need pages like that, and you only want to display this info at the bottom of articles, forget all I said about the bos_author plugin. Just make the bio pages, transfer ownership to the appropriate author with the ajw_admin_workflow plugin, and display them at the bottom of a page using the related_articles tag.

- Iris

<br/>

Edit: PS: Crossed out the bits you can forget about in my earlier post.<br/>

And edit again: Of course you can also do a happy medium. You create pages for all the authors, but simply leave them empty for those authors you do not have info for. This is what I do at my site. Click on an author’s name, and you’ll land on a page with all his work. Some of these pages also have some bio info at the top, but not all of them. The list of works is created by the page you use for the authors section (again, with a related_articles tag), so all you need to do is give the article the right title (the author’s name) and transfer ownership to that author, and the page takes care of the rest.
Of course you then do not want to have ‘About the author’ blocks at the end of pages that say ‘About the Author’ but nothing else, but that is easily solved by putting a conditional tag in the form you use on that related_articles tag so nothing is displayed when the article has no body.

Last edited by M_i (2006-04-08 06:30:46)

Offline

#10 2006-04-08 02:50:38

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: Posting other author's content, but displaying their bio...

A List Apart is based on a totally custom ruby on rails cms. There’s no textpattern behind it I’m afraid.

Offline

#11 2006-04-08 06:19:58

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: Posting other author's content, but displaying their bio...

guiguibonbon wrote:

A List Apart is based on a totally custom ruby on rails cms. There’s no textpattern behind it I’m afraid.

Still, you want to do what they do with their author bios, and do it in Textpattern, you can recreate it perfectly.

Offline

#12 2006-04-08 10:46:15

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: Posting other author's content, but displaying their bio...

absolutely (i’m pretty much doing the same too), but I thought you might want to know.

Offline

Board footer

Powered by FluxBB