Alexander Ipp
BANNED | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору HoLoD Цитата: У меня пользователи не могут править названия темы, потому что я не знаю это как сделать (не разбираюсь я в перле)((( | Окей, объясняю. Открой topic.cgi. Найди: Код: 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++; } | Ниже вставь: Код: $starternick = $startedby; | Делее найди код: Код: &getmember($inmembername); if ($membercode eq "ad" || $membercode eq "mo") { $output .= qq~ <table cellspacing=3 cellpadding=0 width=$tablewidth align=center> <tr><td> <td valign=middle nowrap align=right><font face="$font" color=$menufontcolor size=$dfontsize1> $ibtxt{'3014'} <a href="$postingsprog?action=lock&forum=$inforum&topic=$intopic">$ibtxt{'3015'}</a> | <a href="$postingsprog?action=edittopic&forum=$inforum&topic=$intopic">$ibtxt{'9999'}</a> | <a href="$postingsprog?action=unlock&forum=$inforum&topic=$intopic">$ibtxt{'3016'}</a> | <a href="$postingsprog?action=delete&forum=$inforum&topic=$intopic">$ibtxt{'3017'}</a> | <a href="$postingsprog?action=movetopic&forum=$inforum&topic=$intopic">$ibtxt{'3018'}</a> </td> </tr> </table> <p> <p> <!-- Cgi-bot End bottom page --> ~; } | И замени на: Код: &getmember($inmembername); if ($membercode eq "ad" || $membercode eq "mo") { $output .= qq~ <table cellspacing=3 cellpadding=0 width=$tablewidth align=center> <tr><td> <td valign=middle nowrap align=right><font face="$font" color=$menufontcolor size=$dfontsize1> $ibtxt{'3014'} <a href="$postingsprog?action=lock&forum=$inforum&topic=$intopic">$ibtxt{'3015'}</a> | <a href="$postingsprog?action=edittopic&forum=$inforum&topic=$intopic">$ibtxt{'9999'}</a> | <a href="$postingsprog?action=unlock&forum=$inforum&topic=$intopic">$ibtxt{'3016'}</a> | <a href="$postingsprog?action=delete&forum=$inforum&topic=$intopic">$ibtxt{'3017'}</a> | <a href="$postingsprog?action=movetopic&forum=$inforum&topic=$intopic">$ibtxt{'3018'}</a> </td> </tr> </table> <p> <p> <!-- Cgi-bot End bottom page --> ~; } elsif ($inmembername eq $starternick && $starternick ne "Guest") { $output .= qq~ <table cellspacing=3 cellpadding=0 width=$tablewidth align=center> <tr><td> <td valign=middle nowrap align=right><font face="$font" color=$menufontcolor size=$dfontsize1> $ibtxt{'3014'} <a href="$postingsprog?action=edittopic&forum=$inforum&topic=$intopic">$ibtxt{'9999'}</a> </td> </tr> </table> <p> <p>~; } | Сохрани и закрой topic.cgi. Открой postings.cgi Найди код: Код: ($topicid, $old_topictitle, $old_topicdescription, $threadstate, $threadposts ,$threadviews, $startedby, $startedpostdate, $lastposter, $lastpostdate) = split(/\|/,$in); if (($membercode eq "ad") && ($inpassword eq $password)) { $cleartoedit = "yes"; } if (($inmembmod eq "yes") && ($inpassword eq $password)) { $cleartoedit = "yes"; } | Ниже добавь: Код: &getmember("$startedby"); $starterpsw = $password; &getmember("$inmembername"); if (($inmembername) && ($startedby ne "Guest") && ($startedby eq $inmembername) && ($inpassword eq $starterpsw)) { $cleartoedit = "yes"; } | Вроде всё. Попробовал - похоже, что работает. |