First, a big thanks to Mark Limburg who helped code this up for me in under ten minutes. It is now saved to CVS but you can do the changes in under 5 minutes yourself.What this does is allow you to have two storytext templates. One for the home page and one that displays the entire story when the user clicks "Read More". Well, there won't be a read more link anymore because the actual headline will become the link.
So, here are Mark's instructions:
1. firstly, you do need to create a new template .. so frontstorytext.thtml is fine
2. next, open lib-common.php
3. search for 'function COM_article('
4. update that line to read: function COM_article( $A, $index='', $tpl='storytext.thtml' )
5. search underneath that for a line that contains: 'article'=>'storytext.thtml',
6. change that to: 'article'=> $tpl,
7. then save lib-common.php and close it
8. then, open index.php (this part is not in CVS)
9. find:
$display .= COM_article($A,'y');
10. replace with:
$display .= COM_article( $A, 'y', 'frontstorytext.thtml' );
11. save, and you're good to go
12. simple hack actually, and it won't break anything else
13. Lastly, in your frontstorytext.thtml file, replace
{story_title}
with
Text Formatted Code
<a href="{site_url}/article.php?story={story_id}">{story_title}</a>
The idea here is that this thtml file only contains the headline, if this is the case then your headline has to have a link since the "Read More" link is no longer there.
This is what my frontstorytext.thtml looks like:
Text Formatted Code
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" align="left" bgcolor="#e1e2e5"><span class="articleTitle"><a href="{site_url}/article.php?story={story_id}">{story_title}</a></span></td>
</td>
</tr>
</table>
I'd like to thank Dirk for sending that last bit of code to get the headline link to actually work!
knuckles