Webmastersite.net
Register Log In

Truncate description
limiting words in description

Comments on Truncate description

trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 26, 2005 - 6:33 PM:

Is there a way to limit the amount of words dsiplayed for the description.

I would like the displaylink in category to have a truncated version of the description and then when details are clicked they see the whole description.

SO I think all I need to modify is the displaylink template to limit the words in the description.

can this be done?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 27, 2005 - 8:30 AM:

scripts.webmastersite.net/w...inks/wsnmanual/articles/10
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 27, 2005 - 1:11 PM:

I tried {LINKDESCRIPTIONSENTENCE} nothing happens. I still see the whole description.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 27, 2005 - 11:59 PM:

Tested, it works just as described.
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 28, 2005 - 8:37 AM:

I replaced the regular {linkdescription}with that. IS that what I should be doing?
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 28, 2005 - 8:48 AM:

Actually, I assumed that because it is {LINKDESCRIPTIONSENTENCE},sentence being the key word, that it would limit the description after the first period. A period at the end of words is a sentence. Instead it is limiting it by the words on the first line of the text box and if it also has a period. So should this be working this way?
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 28, 2005 - 8:54 AM:

if it should it will not be a good thing because unless a member submits a descrtion that has a period on the first line of the text box it wont work.

If I use the character limiter is there a way to add ... at the cut off but not have the dots show once they read the full description?
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
Posted Jul 28, 2005 - 8:59 AM:

sorry Paul,I tested thecharacterlimiter and it does the dots , Although I prefer the sentence one.It would be great to get that one to work right. Can I modify aphp file to fix it?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 28, 2005 - 6:13 PM:

It's not broken, so it can't be 'fixed'. It shows the first sentence of the description, which is exactly what the manual says it does. I have no idea what you want or expect.
trued
Experienced

Usergroup: Customer
Joined: Oct 10, 2003

Total Topics: 19
Total Comments: 69
trued
#10 - Quote - Permalink
Posted Jul 28, 2005 - 7:23 PM:

You are right , I apologize, wrong choice of words.
It says it limits it to the first sentence. A sentence is a string of words ending in a period. The {LINKDESCRIPTIONSENTENCE} variable does not limit it to a sentence unless the description entered has a string of words ending in a period on the first row of the input box. If the period happens to end the sentence on the second row of the input box it does not do the limiting. So I would have to make sure my sentence ended on the first row of the input box for it to work.

I hope I explained it better now. Is this the way it should work?Seems like it would not be good especially when others added links. They wouldnt know when to end their first sentence in their description.

I apologize if I am posting many topics but in my defense Im hoping that my requests and questions help others as well.

thank you for all the help.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.