Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-12-2006, 08:24 PM
New Pligger
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
How truncate the description?

In my index.php , the description is too long!

See the screen captures:


How truncate it?

See the screen captures:
I want to truncate it,like this:
Attached Thumbnails
how-truncate-description-long.png   how-truncate-description-likethis.gif  
Reply With Quote
  #2 (permalink)  
Old 03-12-2006, 10:47 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Depends on your version... if you're using one with the templates folder, open link_summary.tpl and search for

<p>{$story_content}</p>

and replace with

<p>{$story_content|truncate:200}</p>
__________________
- Ash
Reply With Quote
  #3 (permalink)  
Old 03-13-2006, 12:53 AM
New Pligger
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Hello AshDigg.
Thanks a lot!
Reply With Quote
  #4 (permalink)  
Old 03-13-2006, 06:11 AM
New Pligger
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Hello AshDigg.

In http://mysite.com/index.php,the short description is ok.

But,in http://mysite.com/story/**/,the full description can't see.
Reply With Quote
  #5 (permalink)  
Old 03-13-2006, 06:18 AM
New Pligger
 
Join Date: Feb 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
show u site. i want see more details,than i can say
Reply With Quote
  #6 (permalink)  
Old 03-13-2006, 06:54 PM
New Pligger
 
Join Date: Mar 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
if you change this:
Quote:
{/if}

{if $viewtype eq "full"}
<p class="news-body-text">{$story_content}</p>
{/if}
to this:
Quote:
{/if}

{if $viewtype eq "full"}
<p class="news-body-text">{$story_content|truncate:200}</p>
{/if}
it will also truncate the text when you open the story.

I dont think its very useful there.
Reply With Quote
  #7 (permalink)  
Old 03-16-2006, 04:08 PM
New Pligger
 
Join Date: Feb 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
I agree. It's be awesome to be able to truncate the stories in the line up, but it's got to show the whole story on the individual story page. Maybe when I get some time I'll see if I can figure out how to do that. For now I need to get the site presentable. :)
Reply With Quote
  #8 (permalink)  
Old 03-16-2006, 04:17 PM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,849
Thanks: 112
Thanked 183 Times in 129 Posts
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
We were discussing having different templates for individual post urls. This should allow you to truncate anything thats on a front page story, but show the hole description on the individual story page.
__________________
Need a Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.
Reply With Quote
  #9 (permalink)  
Old 04-26-2006, 06:28 PM
Constant Pligger
 
Join Date: Feb 2006
Posts: 120
Thanks: 5
Thanked 1 Time in 1 Post
Quote:
Originally Posted by Yankidank
We were discussing having different templates for individual post urls. This should allow you to truncate anything thats on a front page story, but show the hole description on the individual story page.
Is this feature coming soon? Before I launch my site I need to be able to have frontpage/queued story descriptions truncated, and have full descrptions on the individual post URLs.
Reply With Quote
  #10 (permalink)  
Old 04-26-2006, 09:14 PM
Casual Pligger
 
Join Date: Feb 2006
Posts: 94
Thanks: 0
Thanked 2 Times in 2 Posts
I think it should just be done the way joomla handles it.. THere is a box for a short description, and a box for extended text. You could limit the first box to say 200 char, and then have a much higher limit on the extended text.

Just the short description box would show on the frontpage/queued stories, and if extended box had anything it it, it would show Read More (and the post url story would have full text)
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 9.9: The description is not displayed properly dano Bug Report 3 01-12-2008 12:58 AM
General Description & RSS Description sanchopanza General Help 1 12-18-2007 03:26 PM
Character limit on description field projectman General Help 5 11-02-2007 10:08 PM
Setting default meta description Biomech General Help 9 10-03-2007 01:08 PM
max chars in description field g.ciprian General Help 7 07-14-2007 10:28 AM


Search Engine Friendly URLs by vBSEO 3.2.0