YourAdmin
Junior Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору Fuchsia, у меня исключен администратор - а модераторам - пожалуйста. Хотя это тоже легко А вот она и публикация долгожданного хака. Файлы, которые придеться редактировать: ikonboard.cgi, topic.cgi и post.cgi Открываем наш любимый ikonboard.cgi Здесь все просто. Идем в самый конец и находим Код: print header('text/html; charset=windows-1251'); &output( -Title => $boardname, -ToPrint => $output, -Version => $versionnumber ); | Перед этим кодом добавляем Код: ############# Самая популярная тема и активный участник $filetoopen = "$ikondir" . "mostpop.cgi"; open (MOST, "$filetoopen"); @sod = <MOST>; close (MOST); foreach $mostpop (@sod) { ($forumpop, $topicpop, $topicpoptitle, $viewpop, $timepop, $memberpop) = split(/\|/, $mostpop); chomp $mostpop; } $timepop = &dateformat("$timepop"); $filetoopen = "$ikondir" . "active.cgi"; open (ACTIVE, "$filetoopen"); @active = <ACTIVE>; close (ACTIVE); foreach $act (@active) { ($actmember, $actmemberposts, $actmembertime, $actmembertopictitle, $actmemberforum, $actmembertopic) = split(/\|/, $act); chomp $act; } $actmembertime = &dateformat("$actmembertime"); $output .= qq~ <br> <table border="0" width="$tablewidth" align="center" cellpadding="0" cellspacing="0"> <tr bgcolor="$catback"><td align="left" colspan="2" style="BORDER-TOP: gray 1px solid; BORDER-RIGHT: gray 1px solid; BORDER-LEFT: gray 1px solid" align="left"> <font face="$font" color="$catfontcolor" size="2"><b> » Статистика форума<b></font> </td> </tr> <tr> <td style="BORDER-TOP: gray 1px solid; BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid" align="left"> <font size="1" face="$font"> Самая популярная тема: <a href="$threadprog?forum=$forumpop&topic=$topicpop&allpagesview=yes">$topicpoptitle</a> <br> Последним просмотрел: <a href="$profileprog?action=show&member=$memberpop">$memberpop</a></td> <td align="left" style="BORDER-TOP: gray 1px solid; BORDER-BOTTOM: gray 1px solid; BORDER-RIGHT: gray 1px solid"> <font face="$font" size="1">Просмотров: $viewpop<br> Время последнего просмотра: $timepop </td></tr> <tr> <td style="BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid" align="left"><font face="$font" size="1"> Самый активный участник: <a href="$profileprog?action=show&member=$actmember">$actmember</a><br> Последняя запись: <a href="$threadprog?forum=$actmemberforum&topic=$actmembertopic">$actmembertopictitle</a></td> <td align="left" style="BORDER-BOTTOM: gray 1px solid; BORDER-RIGHT: gray 1px solid"><font face="$font" size="1"> Всего записей: $actmemberposts<br> Время последней записи: $actmembertime </td></tr> </table>~; ############# Самая популярная тема и активный участник | Сохраняем ikonboard.cgi и можно его закрыть. Далее немного помучаемся с topic.cgi Здесь тоже все просто. Не забудьте открыть topic.cgi Находим Код: $filetoopen = "$ikondir" . "forum$inforum/list.cgi"; $filetoopen = &stripMETA($filetoopen); if (-e $filetoopen) { open(FILE, $filetoopen) or &error("$ibtxt{'3001'}&$ibtxt{'3002'}$inforum/list.cgi"); @allthreads = <FILE>; close(FILE); $totalthreadcount = @allthreads; $count = 0; foreach $line (@allthreads) { #start foreach @threads ($tempno, $trash) = split(/\|/, $line); chomp $line; push (@numbercounter, $tempno); if ($intopic eq $tempno) { ($topicid, $topictitle, $topicdescription, $threadstate, $threadposts ,$threadviews, $startedby, $startedpostdate, $lastposter, $lastpostdate) = split(/\|/,$line); $threadviews++; $keepcounter = $count; $linetokeep = "$topicid|$topictitle|$topicdescription|$threadstate|$threadposts|$threadviews|$startedby|$startedpostdate|$lastposter|$lastpostdate"; chomp $linetokeep; $processed_data .= "$linetokeep\n"; } else { $processed_data .= "$line\n"; } $count++; } if (($processed_data eq "") || ($processed_data !~ m!\|!)) { &error("Missing Data&Data as corrupted on the server. Please go back and try again"); } open(FILE, ">$filetoopen"); print FILE $processed_data; close(FILE); undef $processed_data; my $file = "$ikondir" . "forum$inforum/$intopic.pl"; open(MSG, ">$file"); print MSG $linetokeep; close(MSG); } | Добавим-ка под этим кодом Код: ############################ Самая популярная тема $filetoopen = "$ikondir" . "mostpop.cgi"; open (MOST, "$filetoopen"); @sod = <MOST>; close (MOST); foreach $mostpop (@sod) { ($forumpop, $topicpop, $topicpoptitle, $viewpop, $timepop, $memberpop) = split(/\|/, $mostpop); chomp $mostpop;} if ($threadviews >= $viewpop) { $timepop = time; $filetomake = "$ikondir" . "mostpop.cgi"; open (UP, ">$filetomake"); print UP "$inforum|$topicid|$topictitle|$threadviews|$timepop|$inmembername"; close (UP); } ############################ Самая популярная тема | Сохраняем topic.cgi и можно закрыть. А вот теперь придеться мучаться с post.cgi Открываем post.cgi (А какже еще?) Находим Код: ############### sub addnewthread ############# sub addnewthread { # start routine | В этой подпрограмме ищем Код: &getforum("$inforum"); $cleanmembername = $inmembername; $cleanmembername =~ s/ /\_/isg; $numberofposts++; $lastpostdate = "$currenttime\%\%\%$threadprog?forum=$inforum&topic=$newthreadnumber\%\%\%$intopictitle" if ($privateforum ne "yes"); chomp $lastpostdate; $filetomake = "$ikondir" . "members/$cleanmembername.cgi"; $filetomake = &stripMETA($filetomake); open(FILE, ">$filetomake"); #flock(FILE, 2); print FILE "$inmembername|$password|$membertitle|$membercode|$numberofposts|$emailaddress|$showemail|$ipaddress|$homepage|$aolname|$icqnumber|$location|$interests|$joineddate|$lastpostdate|$signature|$timedifference|$privateforums|$useravatar|$misc1|$misc2|$misc3"; close(FILE); | Под этим кодом добавляем Код: ############ Самый активный участник $filetoopen = "$ikondir" . "active.cgi"; open (ACTIVE, "$filetoopen"); @act = <ACTIVE>; close (ACTIVE); foreach $act (@act) { ($actmember, $actmemberposts, $actmembertime, $actmembertopictitle, $actmemberforum, $actmembertopic) = split(/\|/, $act); chomp $act; } if ( $numberofposts >= $actmemberposts && $membercode ne "ad") { $acttime = time; $filetomake = "$ikondir" . "active.cgi"; $filetomake = ($filetomake); open(FILE, ">$filetomake"); print FILE "$inmembername|$numberofposts|$acttime|$intopictitle|$inforum|$newthreadnumber"; close(FILE); } ############ Самый активный участник | С темами ОК, теперь с ответами. Ищем Код: ##### add the replyto the file. sub addreply { # start routine | В этой подпрограмме ищем Код: $filetomake = "$ikondir" . "members/$cleanmembername.cgi"; $filetomake = &stripMETA($filetomake); open(FILE, ">$filetomake"); #flock(FILE, 2); print FILE "$inmembername|$password|$membertitle|$membercode|$numberofposts|$emailaddress|$showemail|$ipaddress|$homepage|$aolname|$icqnumber|$location|$interests|$joineddate|$lastpostdate|$signature|$timedifference|$privateforums|$useravatar|$misc1|$misc2|$misc3"; close(FILE); $filetoopen = "$ikondir" . "data/allforums.cgi"; $filetoopen = &stripMETA($filetoopen); open(FILE, $filetoopen); #flock (FILE, 1); @allforums = <FILE>; close(FILE); | Перед этим кодом вставляем Код: ############ Самый активный участник $filetoopen = "$ikondir" . "active.cgi"; open (ACTIVE, "$filetoopen"); @act = <ACTIVE>; close (ACTIVE); foreach $act (@act) { ($actmember, $actmemberposts, $actmembertime, $actmembertopictitle, $actmemberforum, $actmembertopic) = split(/\|/, $act); chomp $act; } if ($numberofposts >= $actmemberposts && $membercode ne "ad") { $acttime = time; $filetomake = "$ikondir" . "active.cgi"; $filetomake = ($filetomake); open(FILE, ">$filetomake"); print FILE "$inmembername|$numberofposts|$acttime|$topictitle|$inforum|$intopic"; close(FILE); } ############ Самый активный участник | Если у вас установлено и голосование, то придеться и с ним помучаться. Находим Код: ############### sub addnewpoll ############# sub addnewpoll { # start routine | В этой подпрограмме ищем Код: $cleanmembername = $inmembername; $cleanmembername =~ s/ /\_/isg; $numberofposts++; $lastpostdate = "$currenttime\%\%\%$threadprog?forum=$inforum&topic=$newthreadnumber\%\%\%$intopictitle" if ($privateforum ne "yes"); chomp $lastpostdate; | Под этим кодом вставляем Код: ############ Самый активный участник $filetoopen = "$ikondir" . "active.cgi"; open (ACTIVE, "$filetoopen"); @act = <ACTIVE>; close (ACTIVE); foreach $act (@act) { ($actmember, $actmemberposts, $actmembertime, $actmembertopictitle, $actmemberforum, $actmembertopic) = split(/\|/, $act); chomp $act; } if ($nemberofposts >= $actmemberposts && $membercode ne "ad") { $acttime = time; $filetomake = "$ikondir" . "active.cgi"; $filetomake = ($filetomake); open(FILE, ">$filetomake"); print FILE "$inmembername|$numberofposts|$acttime|$intopictitle|$inforum|$newthreadnumber"; close(FILE); } ############ Самый активный участник | Теперь, создадим 2 файла. Создаем файл active.cgi Вставляем в него Код: LM|0|1024753428|IB-Хак. Самый активный участник|1|1 | Далее создаем файл mostpop.cgi Вставляем в него Код: 3|2|IB-Хак. Самая популярная тема|0|1024843986|LM | Затем, наши действия: - загружаем на сервер ikonboard.cgi; chmod 755 - загружаем на сервер topic.cgi; chmod 755 - загружаем на сервер post.cgi; chmod 755 - загружаем на сервер active.cgi; chmod 755 - загружаем на сервер mostpop.cgi; chmod 755 Вот хак и установлен. Блин, пока писал, 4 сигареты выкурил Тестируйте и пишите отзывы Если кому-то надо, то объяняю содержание файлов. active.cgi имя|посты|время|название темы|форум|тема mostpop.cgi форум|тема|название темы|просмотры|время|имя А может вы мне окупите стоимость 4 сигарет? |