Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] kgr_safe_excerpt

#31 2005-04-21 21:24:02

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

Re: [archived] kgr_safe_excerpt

I’ve been meaning to release an update for a while now…I’ll see if I can get something put together by the weekend.

Features in the (hopefully) upcoming release:

  • RC3 support
  • Option to count characters as opposed to words
  • Option to count words/characters even if the excerpt is being shown

-Kurt


kurt@kurtraschke.com

Offline

#32 2005-04-21 22:21:07

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [archived] kgr_safe_excerpt

:) yay! thanks Kurt


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#33 2005-04-22 00:07:56

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: [archived] kgr_safe_excerpt

thanks!

Offline

#34 2005-04-24 02:10:21

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

Re: [archived] kgr_safe_excerpt

Okay, the new version is out (same location as before; see the first post in this thread). As promised, it works under RC3, and there are two new parameters: “countchars” and “countexcerpt”, which both do just what you’d expect. Set “countchars” to 1, or “true”, or any value, and then the value of the “words” parameter will used to count characters instead of words. If “countexcerpt” is true, then the excerpt, if it exists, will used, but it will be truncated based on word or character count according to the same rules applied to the body.

-Kurt


kurt@kurtraschke.com

Offline

#35 2005-04-26 22:57:51

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: [archived] kgr_safe_excerpt

Hey Kurt, wonderful plugin thanks for updating.

I was wondering, could you make it so it automatically adds a … at the end of where it cuts it off.

Also, it seems like some excerpts are being put inside <p>‘s and some not, or something like that, is there a way to make them consisitent? Thanks a bunch once agian.

Offline

#36 2005-05-03 16:42:34

futurosity
Member
From: Petaluma, CA
Registered: 2005-01-14
Posts: 14
Website

Re: [archived] kgr_safe_excerpt

This plugin looks great, but I’m having some problems getting it to work in RC3.

I added txp:kgr_safe_excerpt words=“100” linktext=“Read More” to my list form, but the output always says “more…” instead of “Read More”, and nothing changes when I change the words parameter. Also, it cuts off everything that comes after the tag (it deletes my comments_invite tag).

I’m probably missing something obvious, but can anyone suggest anything?

Thanks!

Robert

P.S. How do I enclose a tag in <> when I post a message here?!


Futurosity | Creating Possibilities
Mystics of the Ordinary | One Man. One Year. One Novel.

Offline

#37 2005-05-16 00:11:03

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

Re: [archived] kgr_safe_excerpt

Trying out this plugin, but unsuccesful. My form looks like below, however I end up with all my article titles but no bodies.

<code>
<div id=“article”>
<h3><txp:permlink><strong><txp:title /></strong></txp:permlink>
&middot;
<txp:posted /></h3>

<txp:if_individual_article> <div class=“txt”><txp:body /></div>
</txp:if_individual_article>

<txp:if_article_list> <txp:kgr_safe_excerpt words=“100” linktext=“Read more…” /> <br/> <p style=“text-align: center”><img src=”/images/45.jpg”/></p>
</txp:if_article_list>

</div>
</code>

Offline

#38 2005-05-16 00:49:17

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [archived] kgr_safe_excerpt

sorry if this is completely off base.. but did you check that the plugin is turned on (to Yes) in the admin/plugins tab?


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#39 2005-05-16 01:29:30

mericson
Member
Registered: 2004-05-24
Posts: 137
Website

Re: [archived] kgr_safe_excerpt

Doh! It has been many months since I installed a new plugin, that was the problem. Thanks!

Offline

#40 2005-05-16 01:33:40

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [archived] kgr_safe_excerpt

:)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#41 2005-06-12 15:56:27

Coin
New Member
Registered: 2005-06-01
Posts: 2

Re: [archived] kgr_safe_excerpt

Just wondering, is there anyway of it being modified so that it showed the number of words, but only to the nearest “.” ? So, say I have words=“55” and after word #49 there is a “.”, it would cut out words #50-55? So that it doesn’t cut in the middle of a sentence?

I guess placing “…” in the plugin after the post will suffice for the moment, but a thought nevertheless (I’m a bit useless at PHP honestly…)

Offline

#42 2005-06-13 19:35:37

jstar
Member
Registered: 2005-05-12
Posts: 12
Website

Re: [archived] kgr_safe_excerpt

I have installed this plugin, but it does not seem to be working properly. I am new to TXP so I could be that I haven’t set something right.

I have a section on the site I am working on that is set up as a blog. I have created a template for that section called blog and in the code I am calling the form that I created in < txp: article form=“blog” />. My form is called blog and it looks like this:

<pre>
<h3><txp:permlink><txp:title /></txp:permlink> :: <txp:posted /></h3>
<txp:body />
<txp:kgr_safe_excerpt words=“150” linktext=“Read more…” />
<br /><br />
</pre>

But when I view the page (http://dev.matthewpaulturner.net/blog) I see the posting, looks like a repeat of the first paragraph & then the “Read more…” link. I just want to show the first 150 words of the article, but it doesn’t seem to be working. Any ideas?
Thanks,
-j


“On the run from Johnny Law… ain’t no trip to Cleveland.”

Offline

#43 2005-06-13 20:45:26

vagari
Plugin Author
Registered: 2004-08-25
Posts: 19

Re: [archived] kgr_safe_excerpt

Remove <code><txp:body /></code> from your form, you’re basically telling it to show it twice. This plugin replaces the <code><txp:body /></code> element in the form.

Last edited by vagari (2005-06-13 20:46:29)

Offline

#44 2005-06-13 21:16:36

jstar
Member
Registered: 2005-05-12
Posts: 12
Website

Re: [archived] kgr_safe_excerpt

Awesome! Thanks vagari!

One more question. Is there a way to allow the /blog article to still show a posted image? The top article has an image and when I removed the <pre><txp: body /></pre> tag the image is no longer in the excerpt?
Thanks again for your help!
-j


“On the run from Johnny Law… ain’t no trip to Cleveland.”

Offline

#45 2005-06-13 22:07:18

jstar
Member
Registered: 2005-05-12
Posts: 12
Website

Re: [archived] kgr_safe_excerpt

I just used the ‘excerpt’ field and called the image in there. That will work just fine for now. Thanks again for the help! Thanks to Kurt for the great plugin!
-j


“On the run from Johnny Law… ain’t no trip to Cleveland.”

Offline

  1. Index
  2. » Archives
  3. » [archived] kgr_safe_excerpt

Board footer

Powered by FluxBB