Re: Do not truncate a whole word

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59901
interpreted = N
texte = This is how I do it... [if [countchars][MAINSTORY][/countchars]>150] [then] [listwords delimiters= &words=[url][getchars start=1&end=150][MAINSTORY][/getchars][/url]][text]word[math][index]+1[/math ]=[word][/text][text]word[index][/text] [/listwords]... (Click for more...) [/then] [else] [MAINSTORY] [/else] [/if] Just change both instances of 150 to whatever you need. Probably can be done more efficiently but it works for me. Cheers ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1224 642960 Fax +44 1224 642962 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com ======================================== > From: Stuart Tremain > Reply-To: WebDNA Talk > Date: Fri, 5 Nov 2004 19:56:49 +1100 > To: WebDNA Talk > Subject: Re: Do not truncate a whole word > > Would that be rather server intensive ?? > > On 05 Nov 2004, at 06:34 PM, Kenneth Grome wrote: > >> Make a list of the words [listwords] then display only the first XX of >> them [showif [index]>XX] then follow the results with a space and >> three dots. >> >> >> >>> Hi >>> >>> I need a little help here. I want to truncate a paragraph of text but >>> do not want to cut it off mid way through a word. >>> >>> Something like this is not acceptable. >>> >>> should truncate to: >>> >>> Something like this is not ... >>> >>> Rather than: >>> >>> Something like this is not accp ... >>> >>> Any ideas ???? >>> >>> Thanks >>> >>> Stuart Tremain >>> idfk web developments, sydney, australia >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> -- >> >> Sincerely, >> Kenneth Grome >> www.kengrome.com >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> > Regards > > Stuart Tremain > idfk web developments > 114a/40 yeo street neutral bay 2089 australia > t +612 9908 2134 > f +612 9908 4837 > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Do not truncate a whole word ( Brian Fries 2004)
  2. Re: Do not truncate a whole word ( Kenneth Grome 2004)
  3. Re: Do not truncate a whole word ( Steve Craig 2004)
  4. Re: Do not truncate a whole word ( Stuart Tremain 2004)
  5. Re: Do not truncate a whole word ( Kenneth Grome 2004)
  6. Do not truncate a whole word ( Stuart Tremain 2004)
This is how I do it... [if [countchars][MAINSTORY][/countchars]>150] [then] [listwords delimiters= &words=[url][getchars start=1&end=150][MAINSTORY][/getchars][/url]][text]word[math][index]+1[/math ]=[word][/text][text]word[index][/text] [/listwords]... (Click for more...) [/then] [else] [MAINSTORY] [/else] [/if] Just change both instances of 150 to whatever you need. Probably can be done more efficiently but it works for me. Cheers ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1224 642960 Fax +44 1224 642962 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com ======================================== > From: Stuart Tremain > Reply-To: WebDNA Talk > Date: Fri, 5 Nov 2004 19:56:49 +1100 > To: WebDNA Talk > Subject: Re: Do not truncate a whole word > > Would that be rather server intensive ?? > > On 05 Nov 2004, at 06:34 PM, Kenneth Grome wrote: > >> Make a list of the words [listwords] then display only the first XX of >> them [showif [index]>XX] then follow the results with a space and >> three dots. >> >> >> >>> Hi >>> >>> I need a little help here. I want to truncate a paragraph of text but >>> do not want to cut it off mid way through a word. >>> >>> Something like this is not acceptable. >>> >>> should truncate to: >>> >>> Something like this is not ... >>> >>> Rather than: >>> >>> Something like this is not accp ... >>> >>> Any ideas ???? >>> >>> Thanks >>> >>> Stuart Tremain >>> idfk web developments, sydney, australia >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> -- >> >> Sincerely, >> Kenneth Grome >> www.kengrome.com >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> > Regards > > Stuart Tremain > idfk web developments > 114a/40 yeo street neutral bay 2089 australia > t +612 9908 2134 > f +612 9908 4837 > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Steve Craig

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

web delivery (1997) [taxRate] [TaxTotal] ? (1997) 'RequiredField' Question (1998) Webcat causing crashes left and right! (1997) Shopping Cart Limits? (1998) WebDNA HitLogger available (was Signal Raised Error) (1997) Sku numbers (1997) Plain Language Manual? (1998) More on the email templates (1997) WebCat2b13MacPlugIn - [include] (1997) WebCat2 Append problem (B14Macacgi) (1997) New WebDNA Example from Olin -- (1998) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) RE: [WebDNA] special chars (2009) Database Connectivity (1999) ssl and invoic.tpl and back bttn (2002) email address with spaces (2001) [ShowIf] a either fields are blank (1998) Question about replacing words (1998) calculating tax rates, mail order solutions and version 2 (1997)