Hocam budurum sizin tema ile alakalı.
Kullandığınız temada style.ccs nin en altına aşağıdaki kodları ekleyin.
/* news table with border */
.tabnews2 {
border: 1px dashed #8AC5FF;
margin:0px;
padding:0px;
font-size: 10px;
color: #4B4B4B;
}
.tabnews2,
.taburlo2 {
background-color: #ffffff;
color: #4B4B4B;
}
Yukarıdaki kodu biraz açıklayayım.
border: 1px dashed #8AC5FF;
bu kısım çizgi renkleri için,
color: #4B4B4B;
bu kısım yazı renkleri için,
background-color: #ffffff;
bu kısım ise zemin renkleri içindir. Kendinize göre renkleri ayarlarsınız.
Bu kodu da haber.php yapıp bloklara atarsınız.
<?
/*
+--------------------------------------------------------------------------
| News List 1.0 Block for MKPortal 1.0 09.09.2005
| by visiblesoul <Don K. Colburn>
| Copyright (c) 2005 visiblesoul.net
| http://www.visiblesoul.net
+--------------------------------------------------------------------------
| This is a very simple block.
| It displays only the news title and category with minimal formatting.
+--------------------------------------------------------------------------
*/
$cutoff = 60; //satirda kac karaktere kadar gorunsun
$limit = 10; //kac adet haber listelensin
if (!$limit) {
$limit = 10;
}
$content = "";
$link_user = $mklib_board->forum_link("profile");
$query = $DB->query( "SELECT id, titolo FROM mkp_news_sections ORDER BY `id` DESC");
while( $row = $DB->fetch_row($query) ) {
$idcat = $row['id'];
$categoria[$idcat]['titolo'] = $row['titolo'];
}
$query1 = $DB->query( "SELECT id, idcategoria, titolo FROM mkp_news WHERE validate = '1' ORDER BY `id` DESC LIMIT $limit");
while( $row = $DB->fetch_row($query1) ) {
$idcategoria = $row['idcategoria'];
$titolo = stripslashes($row['titolo']);
$sezione = $categoria[$idcategoria]['titolo'];
if (strlen($titolo) > $cutoff) {
$titolo = substr( $titolo,0,($cutoff - 3) ) . "...";
$titolo = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$titolo);
}
$content .= "
<table class=\"tabnews2\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
<tbody>
<tr>
<td class=\"tdblock\" align=\"center\" width=\"5%\">
<img src=\"$this->images/ok2.gif\" align=\"middle\" alt=\"\" />
</td>
<td class=\"tdblock\" valign=\"top\" width=\"95%\">
<b>$sezione<br /><a href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\">$titolo</a></b>
</td>
</tr>
</tbody>
";
}
unset($row);
unset($idcat);
unset($categoria);
unset($query);
unset($query1);
unset($idcategoria);
unset($titolo);
unset($sezione);
?>
Hocam kategorilerin görünmesini istemiyorsanız,
<b>$sezione<br />
bu kodu silersiniz.