I najlepiej nie uzywaj CA Newsa tylko psNews bo jest lepszy. tyle ze ma
[cenzura] bug.
oto jak go usunac
(plik: show.php)
<?php
/* STRONA GÓÓWNA */
default:
$newsfile = file(\"$newspath/news.txt\"); $count = count($newsfile); if($config[\"stronicownie\"] != \"off\"){
if(!isset($_GET[\"npage\"])){ $npage = \"1\"; } else{ $npage = $_GET[\"npage\"]; }
$ilestron = $count/$config[\"stronicowanie\"];
$ilestron = ceil($ilestron); $begin = $count - $config[\"stronicowanie\"]*($npage-1);
if($begin>$count){ $begin = $count; }
$end = $begin - $config[\"stronicowanie\"];
if($end<0){ $end = 0; }
}
else{
$begin = $count;
$end = 0;
}
for($i=$begin-1; $i>=$end;$i--){
$news = explode(\"||\", $newsfile[$i]); if($config[\"skracanie\"] != \"off\"){
$news[2] = ps_substr($news[2], $config[\"skracanie\"], \"... [<a href=\"\".$config[\"adres\"].\"function=show_all&no=$news[0]\">więcej</a>]\");
}
$news[2] = pscode($news[2]);
if($config[\"emoty_news\"] == \"tak\"){
$news[2] = emots($news[2], $newspath);
}
$news[1
] = wordwrap($news[1], 50, \" \", 1); $news[2
] = wordwrap($news[2], 50, \" \", 1);
$data = date(\"d.m.Y, H:i\", $news[3]);
if($config[\"nimgs\"]==\"tak\"){
$img_path = \"$newspath/nimgs/$news[5]\";
if((file_exists($img_path))&&($news[5]!=\"brak\")&&($news[5]!=\"\")){ $news[2] = \"<img src=\"$img_path\" align=\"\".$config[\"nimgs_align\"].\"\" border=0> \".$news[2];
}
}
if(file_exists(\"$newspath/komentarze/$news[0]\")){ $komfile = @file(\"$newspath/komentarze/$news[0]\"); $ilekomentarzy = count($komfile); }
else{ $ilekomentarzy = 0; }
$print_center.= tplparse
(array('{TYTUL}','{NEWS}','{AUTOR}','{EMAIL}','{DATA}','{KOMENTARZE}','{ILEKOMENTARZY}'),array($news[1
],$news[2
],$userlist[$news[4
]][3
],$userlist[$news[4
]][4
],$data,$config[\"adres\"].\"function=show_all&no=$news[0]\",$ilekomentarzy),$config[\"template\"],$newspath,\"news.html\"); }
if($config[\"stronicownie\"] != \"off\"){
$print_center.= \"<br><center>\";
if($npage>1){ $prevp = $npage-1; $print_center.= \"<a href=\"\".$config[\"adres\"].\"npage=$prevp\"><<</a>\"; }
else{ $print_center.= \"<<\"; }
$print_center.= \" $npage z $ilestron \";
if($npage<$ilestron){ $nextp = $npage+1; $print_center.= \"<a href=\"\". $config[\"adres\"] .\"npage=$nextp\">>></a>\"; }
else{ $print_center.= \">>\"; }
$print_center.= \"</center><br>\";
}
break;
?>
należy dodać /* przed i */ po albo skasować te wpisy
<?php
$news[1
] = wordwrap($news[1], 50, \" \", 1); $news[2
] = wordwrap($news[2], 50, \" \", 1);
?>
inaczej będzie kroić linki i ścieżki w obrazkach, a to BARDZO
[cenzura]--
od moda:
proszę nie używać słów powszechnie uznawanych za przekleństwa.
olo