Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2006-04-09 20:36:38

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

Re: [archived] kgr_safe_excerpt

No. He means in your default FORM template, not in the tag.


Stuart

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

Offline

#62 2006-04-09 20:44:18

tripdragon
Member
Registered: 2005-07-22
Posts: 19

Re: [archived] kgr_safe_excerpt

thebombsite wrote:

No. He means in your default FORM template, not in the tag.

AH! Sweeeet ! Now I just have to figure out the if things to reshow all of the text after read more… Many thank yous ! :D

Offline

#63 2006-04-09 20:53:21

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

Re: [archived] kgr_safe_excerpt

Well that would require something like:-

<code>
<txp:if_individual_article>
<txp:body />
<txp:else />
<txp:kgr_safe_excerpt />
</txp:if_individual_article>
</code>
<br />

assuming everything else in your form that surrounds this remains the same in both cases.

Last edited by thebombsite (2006-04-09 20:54:00)


Stuart

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

Offline

#64 2006-04-09 21:03:09

tripdragon
Member
Registered: 2005-07-22
Posts: 19

Re: [archived] kgr_safe_excerpt

sweettt! Many thanks! but one thing dont add … to the linktext it screws it up I got it to work with this !
<h3><txp:permlink><strong><txp:title /></strong></txp:permlink>
<txp:posted /></h3><txp:if_individual_article>
<txp:body />
<txp:else />
<txp:kgr_safe_excerpt count="1000" linktext="Read More stuff" />
<p class="header-blog-comments"><span><txp:comments_invite /></span> </p>
</txp:if_individual_article>

Many thanks again ! :D

Last edited by tripdragon (2006-04-09 21:08:27)

Offline

#65 2006-04-09 21:12:44

tripdragon
Member
Registered: 2005-07-22
Posts: 19

Re: [archived] kgr_safe_excerpt

Aw fudge now it screws with formating :(
It’s takeing away P tags

Last edited by tripdragon (2006-04-09 21:14:27)

Offline

#66 2006-04-09 21:15:23

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

Re: [archived] kgr_safe_excerpt

Well you can leave your comments_invite tag outside the conditional tags as it only appears in an article_list anyway.


Stuart

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

Offline

#67 2006-04-09 21:27:08

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

Re: [archived] kgr_safe_excerpt

Oh you mean the plug-in is stripping the tags. Yes that is deliberate. This plug-in is more useful for short excerpts which have no paragraph breaks. Rather than only having partial formatting, like an opening “p” tag but no closing “p” tag because the excerpt cuts it out, it removes the tags completely. If you want to try something else there is pfa_beginning. This is less accurate on the word-count as it looks for the nearest complete paragraph but in doing so it retains all the formatting.


Stuart

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

Offline

#68 2006-04-10 00:52:30

tripdragon
Member
Registered: 2005-07-22
Posts: 19

Re: [archived] kgr_safe_excerpt

On another note a place I visit http://creativebits.org/ uses this code
<!--break--> to basicly create an excerpt right from the top of their content No fus no mus..
Would be a nice addtion Gives a little more control of posts …

un…. the <del> are two – marks,,, can;t figure out this forums code handing

Last edited by tripdragon (2006-04-10 00:57:05)

Offline

#69 2006-04-10 02:21:58

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

Re: [archived] kgr_safe_excerpt

tripdragon,

I believe there is a plugin out there that works like that—a search here or at textpattern.org should turn it up.

-Kurt


kurt@kurtraschke.com

Offline

#70 2006-08-17 17:08:55

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,588
Website

Re: [archived] kgr_safe_excerpt

Kurt, I’m trying your v1 plug-in on the current pre 4.0.4 svn and it returns the following 3 errors per article:

<code>tag_error <txp:kgr_safe_excerpt linktext=“mehr…” styleclass=“weiterlesen” />
-> Warning: array_keys() [function.array-keys]: The first argument should be an array on line 581
-> Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 581
-> Warning: Invalid argument supplied for foreach() on line 581</code>

Also, could it be that in your streamlining efforts you completely removed the countexcerpt switch? I can find the var info at the beginning of the plug-in but at the moment it does not seem to be queried anywhere else in the code. Currently it always strips to the current wordcount whatever it’s set at.

Any suggestions?

BTW: would just like to add +1 for the linkinside option described above. For the moment I’ve changed the plug-in to do that myself but it would be great as an official option.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB