6
Regarding extending the title text I find this in news_top.php:
function b_news_top_show($options) {
global $xoopsDB;
$myts =& MyTextSanitizer::getInstance();
$block = array();
$sql = "SELECT storyid, title, published, expired, counter FROM ".$xoopsDB->prefix("stories")." WHERE published < ".time()." AND published > 0 AND (expired = 0 OR expired > ".time().") ORDER BY ".$options[0]." DESC";
$result = $xoopsDB->query($sql,$options[1],0);
while ( $myrow = $xoopsDB->fetchArray($result) ) {
$news = array();
$title = $myts->makeTboxData4Show($myrow["title"]);
if ( !XOOPS_USE_MULTIBYTES ) {
if (strlen($myrow['title']) >= $options[2]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
}
}
$news['title'] = $title;
$news['id'] = $myrow['storyid'];
if ( $options[0] == "published" ) {
$news['date'] = formatTimestamp($myrow['published'],"s");
} elseif ( $options[0] == "counter" ) {
$news['hits'] = $myrow['counter'];
}
$block['stories'][] = $news;
}
return $block;
}
Is this what I need to messing with? I can hard code a number into the:
"if (strlen($myrow['title']) >= $options[2]) {"
but is this the best thing to do?
JMAss