Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-23 22:21:32

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

How do I list articles by the same author?

Hi there,

I’m very new to this CMS. I’m trying to display customed articles by the same author, but what I want is to display a list of titles of articles wrriten by the same author, rather than a link to this author’s articles. For example: author ‘abc’ created the following articles: 123, 456, 789, … Then on the page, I would like to display this:

Other articles by the same author:
123,(perminant link to this article)
456,(perminant link to this article)
789 (perminant link to this article)

I found the provided tags can only do this:
Other artcles by the same author:
abc (link to another page which has all this authors articles)

But this is not what I need.

Also, I found if author’s name has both first name and family name, then the articles can’t be found. E,g
Author: A Nother (then can’t dispay articles by him)
Author:ANother (then it’s fine.)

Can anybody help me to solve the above problems? Many thanks in advance!

Last edited by liyuyu (2005-09-23 22:25:29)

Offline

#2 2005-09-23 22:41:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: How do I list articles by the same author?

You can use the author=“AuthorName” attribute with the <code><txp:article_custom /></code> tag. Look at the top in the left-hand menu on the page template editing screen.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-09-24 18:25:50

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: How do I list articles by the same author?

Thank you. I know this. But the thing is, I have many different authors. I have to display this author’s article according to which article the user’s reading. i.e, I have ‘The First Article Name’ by ‘The First Author’ and ‘The Second Article Name’ by ‘The Second Author’ on the front page, when users click ‘The First Article’, they will go to the its perminent link to read the full article, and at the end of the article, they will see ‘Read other articles by this author’ (in this case, it should be ‘The First Author’‘s articles). If when users click ‘The Second Article’, they will go to the its perminent link to read the full article, and at the end of the article, they will also see ‘Read other articles by this author’ (in this case, it should be ‘The Second Author’s articles). So I can’t specify AuthorName in the form. Do you know how I can do this?

Also, can anybody tell me why I cant display articles with author names like Firstname Lastname, but like FirstnameLastname is fine?

Thanks

Offline

#4 2005-09-24 20:22:23

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: How do I list articles by the same author?

I see. I’ll think on that for a bit. As for your second point, and don’t quote me on this (I’m sure a dev will come and put me right if I’m wrong) but TXP uses various name types as part of the URL which doesn’t work too well with blanks. If you check out things like article titles and section and category names, they always have a “-” or “_” where the blanks go, or get squashed into a single word. I think the same applies to authors as well as they get used in URLs too.

I think there may be a plug-in for the first problem. I’ll go check.

No. I can’t find anything suitable and I’m afraid I can’t think of a way of doing it with standard TXP tags.

Last edited by thebombsite (2005-09-25 01:18:52)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-09-26 19:39:29

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: How do I list articles by the same author?

Thanks Stuart. Have you figured out the first point? I checked the plugin but couldn’t find one…:-(

For the second point, no one else can help me? I can’t use “-” or “_”, not even too say to make author’s name like a nickname…that is not professional for an acdemic site…

Please, and dev can help me on this?

Offline

#6 2005-09-26 20:57:45

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: How do I list articles by the same author?

I don’t think the second point should be very hard to solve at all. TXP has a “Real Name” field for each user, does it not? We have this function <code>get_author_name($id)</code> which returns the author’s login name; why couldn’t there also be one which returned the author’s real name? Again, not difficult at all to accomplish in a plugin. It’s just a matter of getting someone to actually write the code.

-Kurt

Last edited by KurtRaschke (2005-09-26 20:58:12)


kurt@kurtraschke.com

Offline

#7 2005-09-26 21:07:48

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: How do I list articles by the same author?

Well, yes Kurt. But I don’t know how to write that code..I’m already feeling very hard to get the site working being a designer that is forced to learn managing a CMS.

Offline

#8 2005-09-26 22:01:13

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: How do I list articles by the same author?

> liyuyu wrote:

> Well, yes Kurt. But I don’t know how to write that code..I’m already feeling very hard to get the site working being a designer that is forced to learn managing a CMS.

Well, maybe post a plugin request on the Plugins forum section? There are plenty of plugin authors on the forum; I’m sure one of them could spare the time to put this together.

Alternatively, it could also be posted as Feature Request, for addition to Textpattern itself. I’m sure there are others who could make use of such a tag.

-Kurt

Last edited by KurtRaschke (2005-09-26 22:03:38)


kurt@kurtraschke.com

Offline

#9 2005-10-03 05:22:03

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: How do I list articles by the same author?

paging Mr Wilshire One — rss_suparchive_byauthor ??

Offline

#10 2005-10-04 19:32:02

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: How do I list articles by the same author?

> nardo wrote:

> paging Mr Wilshire One — rss_suparchive_byauthor ??

Well, let me try….

Offline

Board footer

Powered by FluxBB