Alexander Ipp
BANNED | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору HoLoD Так, хорошо что напомнил. Сделаю. Добавлено Так, вроде готово. Открыть postings.cgi. Найти: Код: pen(FILE, ">$file"); flock(FILE, 2); # New Title # New Description print FILE "$intopic|$intopictitle|$intopicdescription|$threadstate|$threadposts|$threadviews|$startedby|$startedpostdate|$lastposter|$currenttime"; close(FILE); rebuildLIST(-Forum=>"$inforum"); | Заменить на: Код: open(FILE, ">$file"); flock(FILE, 2); # New Title # New Description print FILE "$intopic|$intopictitle|$intopicdescription|$threadstate|$threadposts|$threadviews|$startedby|$startedpostdate|$lastposter|$currenttime"; close(FILE); rebuildLIST(-Forum=>"$inforum"); ### Get the new last forum poster, and post date. $filetoopen = $ikondir . "forum$inforum/list.cgi"; open(FILE, $filetoopen); flock FILE,1; @alltopics = <FILE>; close(FILE); $linetokeep = @alltopics[0]; chomp $linetokeep; ($trash, $trash, $trash, $trash, $trash, $trash, $trash, $trash, $lastforumposter, $lastforumpostdate) = split(/\|/,$linetokeep); $filetoopen = "$ikondir" . "data/allforums.cgi"; open(FILE, "$filetoopen"); flock FILE, 1; @allforums = <FILE>; close(FILE); foreach $forum (@allforums) { #start foreach @forums chomp($forum); ($tempno, $trash) = split(/\|/,$forum); if ($inforum eq $tempno) { ($forumid, $category, $categoryplace, $forumname, $forumdescription, $forummoderator ,$htmlstate ,$idmbcodestate ,$privateforum, $startnewthreads ,$lastposter ,$lastposttime, $threads, $posts, $forumgraphic) = split(/\|/,$forum); $posts = $posts - $postcount; $threads--; $processed_data .= "$forumid|$category|$categoryplace|$forumname|$forumdescription|$forummoderator|$htmlstate|$idmbcodestate|$privateforum|$startnewthreads|$lastforumposter|$lastforumpostdate|$threads|$posts|$forumgraphic\n"; } else { $processed_data .= "$forum\n"; } } if (($processed_data eq "") || ($processed_data !~ m!\|!)) { &error("Missing Data&Data as corrupted on the server. Please go back and try again"); } $filetomake = "$ikondir" . "data/allforums.cgi"; open(FILE, ">$filetomake"); flock(FILE, 2); print FILE $processed_data; close(FILE); undef $processed_data; $filetomake = "$ikondir" . "forum$inforum/lastpost.cgi"; $filetomake = ($filetomake); open(FILE, ">$filetomake"); flock(FILE, 2); print FILE "$inforum|$intopic|$intopictitle"; close(FILE); | Вроде работает. В ластпост выводится время правки и имя ласпостера, ну и название темы. Сама тема апится. |