Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-24 10:12:39

freaky
Member
From: Austria
Registered: 2004-10-14
Posts: 55
Website

Read more link in feed

Hello!

If there’s an excerpt for an article, the excerpt is used in the feed. But the thing is, that nobody sees that this is only an excerpt. So I want to place an “read more…” in the feed.

How can I do that?
Thanks in advance!

Best regards!

Offline

#2 2008-03-24 10:22:19

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

Re: Read more link in feed

I think the link would need to be a part of the excerpt itself rather than part of the form template.


Stuart

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

Offline

#3 2008-03-24 10:28:05

freaky
Member
From: Austria
Registered: 2004-10-14
Posts: 55
Website

Re: Read more link in feed

Hmm, the thing is, that I don’t now the exact link when I’m writing the excerpt. So it must be part of the template!?

Offline

#4 2008-03-24 10:32:19

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

Re: Read more link in feed

No. As it is still a part of the article I believe the <txp:permlink></txp:permlink> tag should pick up the correct link.


Stuart

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

Offline

#5 2008-03-24 10:38:01

freaky
Member
From: Austria
Registered: 2004-10-14
Posts: 55
Website

Re: Read more link in feed

Ok, that works pretty good. But I don’t want to add every time manally this link :(

Offline

#6 2008-03-24 10:38:29

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

Re: Read more link in feed

Also do you use the excerpts on-site or is this just for the feed?


Stuart

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

Offline

#7 2008-03-24 10:40:47

freaky
Member
From: Austria
Registered: 2004-10-14
Posts: 55
Website

Re: Read more link in feed

Both :)

Offline

#8 2008-03-24 10:51:34

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

Re: Read more link in feed

Mmmm. It’s OK. I was just wondering if one of the excerpt plug-ins would work as something like rss_auto_excerpt can generate it’s own link but I believe that the feed would simply be picking up the <txp:excerpt /> field which would, of course, be blank. Having said that I wonder if placing the plug-in tag directly into the excerpt textarea would work??? I am just thinking out loud here. I haven’t tried it at all.


Stuart

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

Offline

#9 2008-03-24 11:04:45

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

Re: Read more link in feed

Another way might be to simply give a visual indication that there is more to the article than is shown in the feed by using something like “……” at the end of each excerpt. That would be less work on your part.


Stuart

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

Offline

#10 2008-03-24 12:48:34

freaky
Member
From: Austria
Registered: 2004-10-14
Posts: 55
Website

Re: Read more link in feed

That would be better but thats not a good solution for me. The “…” or “read more” link should be added automaticlly. The thing is, that my users might forget to add the “text stuff” at the end of every excerpt :(

Offline

#11 2008-03-24 17:47:57

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

Re: Read more link in feed

The only other way I can think of is to hack the “excerpt” function to append a “read more” link but I can’t advise you on that as my PHP knowledge isn’t good enough. Maybe someone else could pick that one up.


Stuart

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

Offline

#12 2008-03-25 02:49:50

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Read more link in feed

To line 121 in /textpattern/publish/atom.php (after $content = trim(replace_relative_urls(parse($thisarticle['body']), $permlink));).

$content = $content.' <a href="'.$permlink.'">Read more...</a>';
$summary = $summary.' <a href="'.$permlink.'">Read more...</a>';

And the same to line 73 in /textpattern/publish/rss.php.

I hope that mod helps you.

Offline

Board footer

Powered by FluxBB