full story (not summary) on index page

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2007, 12:40 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
How can I get the full story - not the summary to display on list view pages like upcoming and the index page? I was hoping to do this easily in link_summary.tpl but it looks like the full story and the summary are both displayed using the same smarty variable - $story_content and that $story_content is set to either full or summary somewhere else.

Any help greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 06-24-2007, 12:50 AM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
/libs/link_summary.php

lines 72 + 79

PHP Code:
                $link->print_summary('summary'); 
to

PHP Code:
                $link->print_summary('full'); 
Reply With Quote
  #3 (permalink)  
Old 06-24-2007, 11:03 AM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
Thanks AshDigg. That works. Now I am trying to decide for the site I'm building whether i would be better off modifying libs/link.php so that separate smarty variables are always created for the truncated summary and the full story. This would allow me to decide in link_summary.tpl on a case by case basis how i want to display the story. Is there any reason why i shouldn't do it this way? (performance, dependencies etc ?)

This is what I'm thinking of doing ...

libs/link.php
replace lines 366 to 375 with ...

Code:
$smarty->assign('story_content', $this->content);
if($this->link_summary == "")
  $smarty->assign('story_content_summary', $this->truncate_content());
else
  $smarty->assign('story_content_summary', $this->link_summary);
in link_summary.tpl
Code:
{if $pagename eq"story"}{$story_content}{else}{$story_content_summary}{/if}
The link_summary.tpl logic above could be easily modified to display the story in any way. (ie: it would be easy to show a summary on all pages with a thickbox link to display the full content.)

What do you think?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Story summary variables different on front page to actual story page innesb Questions and Comments 1 06-11-2009 06:03 AM
how to completely REMOVE links from the title in the full story page? VictorML Questions and Comments 5 09-18-2008 09:26 AM
Page Variables Yankidank Wiki Articles 1 08-13-2008 03:59 AM
In story page, only summary shown observer_24_7 Questions and Comments 7 06-25-2008 08:53 PM
How to direct story title in summary page to the original story? chris79 Questions and Comments 4 02-03-2008 07:28 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development