Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#13 2005-07-24 17:26:38

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [archived] sab_substr

This plugin doesn’t work with rev608 haven’t just upgraded – can anyone fix this? Have uninstalled and reinstalled but no luck.

thanks

EDIT: My mistake I forgot the offset tag is now used instead of just limit x, x.

cheers

Last edited by sekhu (2005-07-24 17:29:32)

Offline

#14 2005-07-24 18:25:55

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [archived] sab_substr

Cool. This is fantastic. I have altogether new plans to use this plugin. (I’ll be using this plugin as a drop-cap). But i would like to see one more function being added. (If you can)

I would like to display all the letters of a paragraph except the first letter.

Eg. Instead of “The quick brown fox jumps over the lazy dog”

I would like to display it as “he quick brown fox jumps over the lazy dog”. (In short I would like to strip of the first letter).

The code…

<code>
<div class=“dropcap”> // A class to create a drop-case
<txp:sab_substr limit=“1” trail=”“><txp:body /></txp:sab_substr></div> // Displays the first letter of the body.
<txp:sab_substr strip=“1”><txp:body /></txp:sab_substr> // Displays everything else other than the first letter.
</code>
<br />
<a href=“http://www.citrusmoon.net/dropcaps.html”>THE RESULT</a><br /><br />

Last edited by creativesplash (2005-07-24 18:27:57)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#15 2005-07-24 19:23:59

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: [archived] sab_substr

creativespash: that seems like a bad idea…

instead, why don’t you try my sexy drop-caps, which use pure CSS? This would create less processes for each page.

Offline

#16 2005-07-24 19:34:19

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [archived] sab_substr

Yeah I know about this. But the problem is it wont display in IE. My audiences primarily use IE.


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#17 2007-07-27 13:49:06

fas.khan
Member
From: Paris
Registered: 2007-06-06
Posts: 41

Re: [archived] sab_substr

Hello all,

I am into this same problem where I want to trim the Title (<txp:title />) length and put (…) at the end. It seems that this plugin can do the jo, but I really dion’;t where to get this plugin.

The site www.bluecamel.org is not working.

Can I anyone suggest me where to get this plugin or any other way how to accomplish it ?

Thanks.

Offline

#18 2007-07-28 12:06:38

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [archived] sab_substr

An attempt to recreate the plugin code (requires TXP 4.0.4 or higher).
Tag usage is identical to the one described at the beginning of this topic. This one should behave UTF8-aware and assumes the enclosed content has not yet been HTML escaped(default limit = 10, default trailing char is the ellipsis character).

download plugin

Last edited by ruud (2007-07-29 13:57:12)

Offline

#19 2007-07-29 14:47:57

fas.khan
Member
From: Paris
Registered: 2007-06-06
Posts: 41

Re: [archived] sab_substr

Whoa …

Now this is the way Dutch Bell the Cats … :-)

Done ! …

Thank you so so much …

Offline

#20 2007-08-09 22:31:46

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: [archived] sab_substr

Hi Ruud, thank you very much for updating this plugin!

I am having a little trouble with unencoded html entities, a lot of &#8217; and &#8211;.

I also modified the plugin slightly to include $thing = strip_tags($thing); to remove html tags as I am using it to output txp:body content.

Any help with the html codes would be great!

Last edited by Sam (2007-08-09 22:34:19)

Offline

#21 2007-09-01 12:48:39

snthr
Member
Registered: 2007-07-13
Posts: 42

Re: [archived] sab_substr

hi…

i’m feeling a bit stumped here, like as if there’s something obvious i’m missing…

as a result of my previous thread about title shortening, i was redirected to this thread, and i’ve now installed and activated this plugin, but it’s not working at all. the sab_substr code is simply being spat straight through to the final html on the page, so that i end up with page code like this:

<h4><sab_substr limit=“10” trail=”…”>Here’s a long title</sab_substr></h4>

however, other plugins are working fine running alongside it… is there something i’ve overlooked?

thanks…

snthr.

Offline

#22 2007-09-01 13:58:16

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [archived] sab_substr

Use <txp:sab_substr> instead of <sab_substr> :)

Offline

#23 2007-09-01 16:40:07

snthr
Member
Registered: 2007-07-13
Posts: 42

Re: [archived] sab_substr

Offline

#24 2007-09-01 18:22:23

snthr
Member
Registered: 2007-07-13
Posts: 42

Re: [archived] sab_substr

so i got it up and running (sheepish face), but i seem to be getting the same problems as sam posted about (quoted below), with ‘& #160’ and the like coming through – any ideas for a fix?

thanks…

Sam wrote:

Hi Ruud, thank you very much for updating this plugin!

I am having a little trouble with unencoded html entities, a lot of & #8217; and & #8211;.

I also modified the plugin slightly to include $thing = strip_tags($thing); to remove html tags as I am using it to output txp:body content.

Any help with the html codes would be great!

Offline

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

Board footer

Powered by FluxBB