#3 Kvetos
Když jsem to zjednodušil a nechal jen trimlink, tak to CODE zmizelo!!
$comment = trimlink($data['comment_message'], 30);
tady je zápis:
$result = dbquery(" SELECT comment_id, comment_item_id, comment_type, comment_message
FROM ".DB_COMMENTS."
WHERE comment_hidden='0'
ORDER BY comment_datestamp DESC
");
if (dbrows($result)) {
$output = "";
$i = 0;
while($data = dbarray($result)) {
if ($i == $displayComments) { break; }
switch ($data['comment_type'])
{
case "N":
$access = dbcount( "(news_id)", DB_NEWS,
"news_id='".$data['comment_item_id']."' AND
".groupaccess('news_visibility')." AND
(news_start='0'||news_start<=".time().") AND
(news_end='0'||news_end>=".time().") AND
news_draft='0'
");
if ($access > 0) {
$comment = trimlink($data['comment_message'], 30);
$commentStart = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='".$data['comment_item_id']."' AND comment_type='N' AND comment_id<=".$data['comment_id']);
if ($commentStart > $settings['comments_per_page']) {
$commentStart = "&c_start=".floor($commentStart / $settings['comments_per_page']) * $settings['comments_per_page'];
} else {
$commentStart = "";
}
$output .= THEME_BULLET." <a rel="nofollow" href='".BASEDIR."news.php?readmore=".$data['comment_item_id'].$commentStart."#c".$data['comment_id']."' title='".$comment."' class='side'>".$comment."</a><br />\n";
$i++;
}
Jenže mi tedko zobrazuje nekorektně odkazy na komentáře v seznamu takto nepěkně s tagy v linku:
Připojen obrázek.