Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] kgr_safe_excerpt
I dont’ have this plugin installed but from what I’ve read you need to do something like this:
<code>
<txp:if_individual_article>
<txp:body />
</txp:if_individual_article>
<txp:if_article_list>
<txp:kgr_safe_excerpt words=“50” linktext=” read more…” />
</txp:if_article_list>
</code>
Offline
Re: [archived] kgr_safe_excerpt
Great plug-in! It is exactly what I was looking for! You’ve fixed one of my dilemas.
Offline
Re: [archived] kgr_safe_excerpt
@ swf
thanx that works, but it isn’t exactly what I want.
the first problem: If I using this plugin, all of my articles are affected, but i just want it for some selected articles.
the second problem: most of my articles are having a photo. by using this plugin, the photo will show only when I read the full text.
Visit my Textpattern sites:
Northerndelight | Hasenbude
Curiculum Vitare | Rezepteblock
Offline
Re: [archived] kgr_safe_excerpt
holli.p:
Using my plugin your pictures should stay in the excerpt if they fall within the amount of the body entry that you specify to include in the excerpt.
However, I don’t think it’s possible to use either my plugin or kgr_safe_excerpt on only selected articles
I posted some information about my plugin and how it relates to kgr_safe_excerpt earlier in this thread, but the original post is also available here:
Offline
Re: [archived] kgr_safe_excerpt
> philipashlock wrote:
However, I don’t think it’s possible to use either my plugin or kgr_safe_excerpt on only selected articles
I think it’s possible. You just need another form with the special plugin tags. I call it “excerpt”.
when you need an excerpt, you can use the option “Override form” in textpattern, to change the default form with the excerpt form.
But how I written in the tread of your plugin is my problem to find the right tags to build a proper form.
http://forum.textpattern.com/viewtopic.php?id=2777
Visit my Textpattern sites:
Northerndelight | Hasenbude
Curiculum Vitare | Rezepteblock
Offline
Re: [archived] kgr_safe_excerpt
i tryied to use this plugin. i uploaded it and used the tag in the form of the articles. before i used it in only in the template.
when i used it in the form, i had only one article on the front page, where i wanted it to be, but the other articles dissapeared.
in the page of the article itself, the link “read more” still appeared also when there was nothing else to read.
and now, whenever i try to use the link i was using to access the articles ( it is a list of sections), i get the error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1316 bytes) in /www/www.bridgepeople.com/http/tati/textpattern/lib/txplib_db.php on line 181
i must have done something very very wrong.
some help????
txs!
claudia
Offline
Re: [archived] kgr_safe_excerpt
My HTML/Textile is stripped out in the excerpts??
Offline
#20 2004-09-04 05:06:41
- vagari
- Plugin Author
- Registered: 2004-08-25
- Posts: 19
Re: [archived] kgr_safe_excerpt
Normally excerpts don’t have paragraphs, so I put them in, but if the body is too small to be cut up it’ll bring in the html. So my wrapped p’s were getting doubled and breaking my validation. :)
I added in this after the “esle if”…
<code>
$excerpt = preg_replace(“/^\t<p>/i”,”“,$excerpt);
$excerpt = preg_replace(“/\s*<\/p>\s*$/i”,”“,$excerpt);
</code>
To pull out the first and last p’s. It’s worked so far, I hope this is helpful. :)
Great plugin Kurt.
Offline
Re: [archived] kgr_safe_excerpt
I cant work this out!!!
I have set my <em>kgr_safe_excerpt</em> to show only the first 20 words when in an article list. (incidentally column on my pages). You can see the problem with a gap below my headline on the first article.
For some reason on the first article (and only the first article) it ADDS extra <p>
tags?
I tried Vagari code above but it doesnt seem to do anything?
Cheers
Last edited by Martagnan (2004-11-17 12:14:09)
Offline
#22 2004-11-17 21:39:32
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: [archived] kgr_safe_excerpt
Martagnan:
I’m stumped. I have to admit that I really can’t see any reason for the extra <code><p></code> tags.
-Kurt
Last edited by KurtRaschke (2004-11-17 21:39:57)
kurt@kurtraschke.com
Offline
#23 2004-11-18 03:37:56
- vagari
- Plugin Author
- Registered: 2004-08-25
- Posts: 19
Re: [archived] kgr_safe_excerpt
That’s odd Martagnan, it looks like the problem is in the form (from all the extra whitespace) but I don’t understand why it’d only be in the first list item. I don’t know if it’ll help but I’ll include my form.
<code>
<div class=”<txp:author_id />Box”>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<p><txp:kgr_safe_excerpt linktext=”…” words=“35” /></p>
<txp:posted /> – by <txp:author /> – <txp:comments_invite /></div>
</code>
Good luck, let us know if you figure it out. :)
Oh yeah, and I like the design on your site.
Last edited by vagari (2004-11-18 03:41:42)
Offline
Re: [archived] kgr_safe_excerpt
KurtRaschke > Im probably going to discover its my fault. I’ll have a poke around later today – thanks!
vagari > Ill give that a go later thanks.
Offline