HeavyEddie
01-14-2006, 08:44 PM
This is an itty bitty hack, but resolves a small annoyance I have.
Anyway, if you have typed a description but no actual article information when writing a news article you can insert this code so it won't even give the option to Read More. Why say more when there isn't?
Find this in news.php
****// display link to article
****echo ' <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid']) . '">' . $p2_language['read_more'] . '</a>';
Replace it with this
****// display link to article
****if (strlen($article['article']) > 0)
****{
****echo ' <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid']) . '">' . $p2_language['read_more'] . '</a>';
****}
Find this in latestnews.php
************if($showreadmore)
************{
**************echo ' <a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $language['read_more'] . '</a><br />';
************}
Replace it with this
************if($showreadmore)
************{
**********if (strlen($article['article']) > 0)
**********{
******************echo ' <a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $language['read_more'] . '</a><br />';
**************}
************}
Anyway, if you have typed a description but no actual article information when writing a news article you can insert this code so it won't even give the option to Read More. Why say more when there isn't?
Find this in news.php
****// display link to article
****echo ' <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid']) . '">' . $p2_language['read_more'] . '</a>';
Replace it with this
****// display link to article
****if (strlen($article['article']) > 0)
****{
****echo ' <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid']) . '">' . $p2_language['read_more'] . '</a>';
****}
Find this in latestnews.php
************if($showreadmore)
************{
**************echo ' <a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $language['read_more'] . '</a><br />';
************}
Replace it with this
************if($showreadmore)
************{
**********if (strlen($article['article']) > 0)
**********{
******************echo ' <a href="' . RewriteLink('index.php?categoryid=' . $article['categoryid'] . '&p2_articleid=' . $article['articleid']) . '">' . $language['read_more'] . '</a><br />';
**************}
************}