Mam pewną prośbę. Czy ktoś obeznany może zajrzeć do mojego kodu archiwum, opartego na cutenewsie i podpowiedzieć w jaki sposób zmienić go tak, aby pokazywał wiadomości w kolejności czasowej? Chodzi o to, że obecnie pokazuje je pod względem ilości newsów, wygląda to tak:
Październik - 2013 (64)
Listopad - 2013 (60)
Wrzesień - 2013 (14)
Powinno być tak:
Listopad - 2013 (60)
Październik - 2013 (64)
Wrzesień - 2013 (14)
Oto kod archiwum:
<?PHP $cutepath = __FILE__; require_once("$cutepath/inc/functions.inc.php"); require_once("$cutepath/data/config.php"); if(!isset($template) or $template == "" or strtolower($template) == "arch"){ require_once("$cutepath/data/Arch.tpl"); } else{ if(file_exists("$cutepath/data/${template}.tpl")){ require_once("$cutepath/data/${template}.tpl"); } else{ die("Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); } } // Prepare requested categories die("<b>Error</b>!<br>CuteNews has detected that you use \$category = \"".htmlspecialchars($category)."\"; but you can call the categories only with their <b>ID</b> numbers and not with names<br> example:<br><blockquote><?PHP<br>\$category = \"1\";<br>include(\"path/to/show_archives.php\");<br>?></blockquote>"); } foreach($tmp_cats_arr as $key=>$value){ if($value != ""){ $requested_cats[$value] = TRUE; } } if($archive == "" or !$archive){ $news_file = "$cutepath/data/news.txt"; $comm_file = "$cutepath/data/comments.txt"; }else{ $news_file = "$cutepath/data/archives/$archive.news.arch"; $comm_file = "$cutepath/data/archives/$archive.comments.arch"; } $user_query = cute_query_string($QUERY_STRING, array("start_from", "archive", "subaction", "id", "ucat")); if($file != "." and $file != ".." and $file_arr[1] == "news"){ $arch_arr[] = $file_arr[0]; } } function datePl($format,$time=NULL) { if($time===NULL) 'Jan'=>'Styczeń', 'Feb'=>'Luty', 'Mar'=>'Marzec', 'Apr'=>'Kwiecień', 'May'=>'Maj', 'Jun'=>'Czerwiec', 'Jul'=>'Lipiec', 'Aug'=>'Sierpień', 'Sep'=>'Wrzesień', 'Oct'=>'Październik', 'Nov'=>'Listopad', 'Dec'=>'Grudzień' ); } foreach($arch_arr as $arch_file){ $last = $count-1; $first_timestamp = $first_news_arr[0]; $last_timestamp = $last_news_arr[0]; echo"<a href=\"$PHP_SELF?archive=$arch_file&subaction=list-archive&$user_query\">". datePl("M - <b>Y</b>",$last_timestamp)." <i>($count)</i></a><br /> "; } } } else{ if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or $requested_cats[$ucat] == TRUE) ){ if($subaction == "addcomment"){ $allow_add_comment = TRUE; $allow_comments = TRUE; } if($subaction == "showcomments") $allow_comments = TRUE; if(($subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes") $allow_full_story = TRUE; if($subaction == "showfull") $allow_full_story = TRUE; if($subaction == "showfull" and $config_show_comments_with_full == "yes") $allow_comments = TRUE; } else{ if($config_reverse_active == "yes"){ $reverse = TRUE; } $allow_active_news = TRUE; } require("$cutepath/inc/shows.inc.php"); } unset($template, $requested_cats, $reverse, $in_use, $archive, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives); ?> <!-- News Powered by CuteNews: http://cutephp.com/ -->
Z góry bardzo, ale to bardzo dziękuję za pomoc
Pozdrawiam
Problem udało mi się zażegnać

Za kolor przepraszam, ale chciałem, żeby było widoczne, iż problem już nieaktualny
