Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2006-11-16 06:53:54

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: [plugin] [ORPHAN] rss_auto_excerpt

@merz1

I think, every strip-tag-solution is going into the wrong direction for it will strip blindly and most surely too much, not taking into account what the user might have intended when posting his excerpt text.

could not only be used to keep h4 but also every other tag like p

Keeping the p-tag will throw the link out of the paragraph again, I suppose – and bring me back to the starting point? ;-)

The task I’m looking for is simply place the more-link at the end of the last paragraph of an existing excerpt.
And to bring a sense of the difficulty behind: This should work even if there are several nesting or successive tags at the end of the paragraph (imagine links, images, spans whatever).

if excerpt then output form … The output form will contain the excerpt and the formatted more link as you like it.

That was where I started from. There is no tag-preserving way of placing the link inside the paragraph (except with the plugin Beginning but with the problem of a fixed rough way to find the right place (simply deleting the last characters, supposing it’s the right code </p> but running into problems if it isn’t or if there are different ways of ending within one database due to different behaviour of txp-versions.))

So I think there still has to be found a way to find the correct position for the link and place it before the closing paragraph-tag of an existing excerpt – without deleting any other tag/code.
Stripping all doesn’t make sense.

Last edited by saccade (2006-11-16 07:03:49)

Offline

#38 2006-11-16 10:49:28

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Keeping the p-tag will throw the link out of the paragraph again, I suppose – and bring me back to the starting point? ;-)

Good thinking … your point :-)

For an existing excerpt with all tags and whatever I only see two possibilities:

  1. Put the more code into the excerpt which will annoy editors (never tested that). Try to ease the pain with a keyboard shortcut.
  2. Tweak the TXP core code for the excerpt to include the more permalink at the end of the excerpt. And yes you/something will have to replace the last array of predefined content tags with the more permalink followed by the closing tags. Tricky! I.e. you don’t want to have the link in the last cell of a table which is inside a long blockqoute, don’t you?

BTW, I never had your problem because I think that the more link should be big and outstanding to attract readers to click through to the full article. Right now I only use the rss_auto_excerpt solution for an article list on the homepage where I only want a very small two-line teaser below the headline and the sub-headline. All other lists where I use the original excerpt have huge read more areas below the excerpt :)

Last edited by merz1 (2006-11-16 10:50:23)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#39 2006-11-19 23:40:08

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: [plugin] [ORPHAN] rss_auto_excerpt

Now I tried to find a solution and tested it in a small plugin. I appreciate every hint or correction.

Offline

#40 2006-12-22 08:03:55

jusisan
New Member
From: Helsinki, Finland
Registered: 2006-05-13
Posts: 4

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hmm. I don’t know if this is something I’m doing wrong, but I have a two-column layout and the following code in a part of it:

<h1><txp:title /></h1>
<div class="column lower1">
<txp:hak_article_image />
<txp:rss_auto_excerpt paragraphs="1" overrideexcerpt="1" showlinkwithexcerpt="0" />
</div>

<div class="column lower2">
<txp:rss_auto_excerpt skipparagraphs="1" paragraphs="50" />
</div>

What I’m trying to achieve is the excerpt on the other side together with the image and the article merrily continuing on the other side: However, this does not work. The excerpt comes out just right, but the lower2-column refuses to skip the first paragraph.

Please tell me if I’m doing something wrong, or if someone knows how to remedy this.

Cheers, Jussi

Last edited by jusisan (2006-12-22 08:13:36)

Offline

#41 2007-01-04 15:28:56

eric2007
Member
Registered: 2006-05-25
Posts: 18

Re: [plugin] [ORPHAN] rss_auto_excerpt

Is there a way to get this to auto-excerpt the Body content no matter what? As in, show the first 50 words of an article body, even if it already has content in the txp:excerpt field.

(Or, alternatively, suppose I want the first 100 words, txp:excerpt and txp:body included: if my txp:excerpt has 60 words, then show the whole excerpt and the first 40 words of the body.)

Offline

#42 2007-01-04 15:33:48

eric2007
Member
Registered: 2006-05-25
Posts: 18

Re: [plugin] [ORPHAN] rss_auto_excerpt

Don’t know how I missed this: looks like overrideexcerpt=“1” will do just that. You guys have thought of everything.

Offline

#43 2007-01-04 22:36:19

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

eric2007 wrote:
Don’t know how I missed this: looks like overrideexcerpt=“1” will do just that. You guys have thought of everything.

Almost everything…

rss_auto_excerpt 0.3

The latest version of the plugin adds a few new attributes that allow you to specify which field to use for the excerpt and body. This will allow you to use any article field (i.e., a custom field) to generate your excerpt. There is also a new excerptwraptag attribute so that you can wrap the auto-excerpt in an HTML tag.

For example, if you have a custom field called AnotherExcerpt and wanted to show that field if it has data, otherwise you want to show the normal excerpt field, call the plugin as follows:

<txp:rss_auto_excerpt excerpt="AnotherExcerpt" body="excerpt" excerptwraptag="p" length="500" />

Download rss_auto_excerpt

Offline

#44 2007-01-24 18:58:19

gluteus
Member
From: Switzerland
Registered: 2007-01-20
Posts: 74

Re: [plugin] [ORPHAN] rss_auto_excerpt

Is it possible, that the attribute excerptwraptag did not work? I tried it with “span”, there is no change if I look the source of the page. It is still wrapped in “p”.

Any ideas? Help is welcome!

dave

Offline

#45 2007-01-25 00:41:00

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Depends how you’re calling the plugin. Right now that attribute will only work when overrideexcerpt is not true and the excerpt field is not empty. So if an auto excerpt is generated, the excerpt wrap tag is not used. That should probably be corrected in the next version.

Offline

#46 2007-01-25 06:07:53

gluteus
Member
From: Switzerland
Registered: 2007-01-20
Posts: 74

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hello Rob

That’s it. I am using auto excerpt.
My goal was (is) that the “read more” text is on the same line as the “…” ending, while I’m using auto excerpt.

Thank you anyway for your great plugin!

For my goal I “cheat” with the following tag:
<txp:rss_auto_excerpt words=“12” linkwraptag=“span” striptags=“1” linktext=“read more” /> this way it is on the same line.

Thank you for responding.

dave

Offline

#47 2007-01-25 07:32:42

jusisan
New Member
From: Helsinki, Finland
Registered: 2006-05-13
Posts: 4

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hi again. As no-one seems to have the same problems I’ve had (or has run into them), here’s the problem again:

The goal is to produce the leading paragraph to another column than the rest of the article. The following fails with rss_auto_excerpt 0.4 in an article form:

<div class="column upper1">
 <txp:rss_auto_excerpt paragraphs="1" showlinkwithexcerpt="0" overrideexcerpt="1"  />
</div>
<div class="column upper2">
 <txp:rss_auto_excerpt skipparagraphs="1" paragraphs="9999" showlinkwithexcerpt="0" overrideexcerpt="1"  />
</div>

The plugin is great, but does not seem to cope with this kind of use. The only way to get it working is to match the number of paragraphs in the second column with the exact length of the article. Like this (if the article contains five paragraphs):

<div class="column upper1">
 <txp:rss_auto_excerpt paragraphs="1" showlinkwithexcerpt="0" overrideexcerpt="1"  />
</div>
<div class="column upper2">
 <txp:rss_auto_excerpt skipparagraphs="1" paragraphs="5" showlinkwithexcerpt="0" overrideexcerpt="1"  />
</div>

Not really handy when the content is supposed to be produced by someone with no technical understanding – or even access to the forms. Help, anyone? Rob?

Offline

#48 2007-02-12 20:42:50

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hello,

I’m attempting to create a “drop-cap” and I think the feature that keeps the plug-in from cutting off the middle of a word is preventing it from allowing length=“1”

Everything else has been working properly…just discovered this issue today.

Any ideas?


Tom

Offline

Board footer

Powered by FluxBB