|
|
#1 |
|
Junior Member
Join Date: Sep 2008
Posts: 9
Rep Power: 0 ![]() |
hello
i would like to know if there way to solve the damage in the style when the user type in the description field 72 number of word in the same line in his ad . the style would affected for this line so i would like to avoid this problem note: i am useing 3 column style thanks in advance |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,201
Rep Power: 36 ![]() ![]() |
I know how frustrating this is because it causes the table to auto expand even if you have a set width in place.
Here's what I have done for many of my clients to resolve this particular issue: {$entry.description|truncate:120:"...":false:false } The 120 is the total number of characters including the "..." that will show. the "..." is the suffix that will show if the field is indeed truncated. The false:false are options that tell it to complete words and to put the suffix at the end instead of the middle. The result is something like this: blah, blah, blah, blah... This is a smarty built in function. Smarty Hope that helps, -Mike
__________________
Mike-N-Tosh v3.1.10 Developer IndianaPC.org - A community website Sandbox v4.0.9, 4.1 Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds. Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2007
Posts: 278
Rep Power: 14 ![]() |
{$entry.description|truncate:120:"...":false:false }
Hi Mike, where would you place this?
__________________
v4.1 Developer "All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642) |
|
|
|
|
|
#4 | |
|
Moderator
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,201
Rep Power: 36 ![]() ![]() |
Quote:
Example for showlistings2.tpl replacing the "shortDescription" field with "Description field around line 105. Find this: HTML Code:
<tr> <td colspan="3" width="100%"{if $entry.class<>""} class="{$entry.class}"{/if}> {$entry.shortDescription} <a href="{$entry.link}" title="{$entry.title}">more</a></td> </tr> HTML Code:
<tr> <td colspan="3" width="100%"{if $entry.class<>""} class="{$entry.class}"{/if}> {$entry.description|truncate:120:"...":false:false} <a href="{$entry.link}" title="{$entry.title}">more</a></td> </tr>
__________________
Mike-N-Tosh v3.1.10 Developer IndianaPC.org - A community website Sandbox v4.0.9, 4.1 Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds. Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Nu Style Conifer (4.1X) | seymourjames | Modification Release | 0 | 03-05-2009 11:22 AM |
| Nu Style Ruby (4.1X) | seymourjames | Modification Release | 4 | 03-01-2009 08:24 AM |
| Nu Style Plum (4.1X) | seymourjames | Modification Release | 0 | 02-19-2009 04:19 PM |
| Nu Style Ocean (4.1X) | seymourjames | Modification Release | 0 | 02-19-2009 04:19 PM |
| Water Damage | Eric Barnes | Off Topic | 10 | 10-23-2007 11:15 PM |