Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Plik readarticle.php, ~52 linijka kodu:
if ($data['article_allow_comments']) showcomments("A","articles","article_id",$article_id,FUSION_SELF."?article_id=$article_id");
zamień na:
if ($data['article_allow_comments']) showcomments("A","articles","article_id",$article_id,FUSION_SELF."?article_id=$article_id",$data['user_id']);
Plik includes/comments_include.php, ~19 linijka kodu:
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
zamień na:
function showcomments($ctype,$cdb,$ccol,$cid,$clink,$cuser=0) {
~49 linijka kodu:
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
zamień na:
if (!$flood) {
$result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
if ($cuser != 0 && $cuser != $comment_name) {
$lol = dbquery("INSERT INTO ".DB_PREFIX."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('".$cuser."','$comment_name','Skomentowałem Twój artykuł!','Witaj!\nDodałem komentarz do Twojego artykułu [[url=".BASEDIR."readarticle.php?article_id=$cid]LINK[/url]]!','y','0','".time()."','0')");
}
}
-----------------------------------------------------------------------------------------------
Poniżej informowanie dla artykułów, newsów i fotek.
W includes/comments_include.php szukamy:
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
i zamieniamy na:
function showcomments($ctype,$cdb,$ccol,$cid,$clink,$cuser=0) {
Szukamy:
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
i zamieniamy na:
if (!$flood) {
$result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
if($cuser != 0 && isNum($comment_name) && $comment_name != $userdata['user_id']) {
if($ctype == "N") {
$wiadomosc = dbquery("INSERT INTO ".DB_PREFIX."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('".$cuser."','$comment_name','Skomentowałem Twój news!','Witaj!\nDodałem komentarz do Twojego newsa [url=".$settings['siteurl']."news.php?readmore=$cid][LINK][/url]!','y','0','".time()."','0')");
} elseif ($ctype == "A") {
$wiadomosc = dbquery("INSERT INTO ".DB_PREFIX."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('".$cuser."','$comment_name','Skomentowałem Twój artykuł!','Witaj!\nDodałem komentarz do Twojego artykułu [url=".$settings['siteurl']."readarticle.php?article_id=$cid][LINK][/url]!','y','0','".time()."','0')");
} elseif ($ctype == "P") {
$wiadomosc = dbquery("INSERT INTO ".DB_PREFIX."messages (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('".$cuser."','$comment_name','Skomentowałem Twóją fotografię!','Witaj!\nDodałem komentarz do Twojej fotografii [url=".$settings['siteurl']."photogallery.php?photo_id=$cid][LINK][/url]!','y','0','".time()."','0')");
}
}
}
W news.php szukamy:
if ($data['news_allow_comments']) showcomments("N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore");
i zamieniamy na:
if ($data['news_allow_comments']) showcomments("N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore",$data['user_id']);
W readarticle.php szukamy:
if ($data['article_allow_comments']) showcomments("A","articles","article_id",$article_id,FUSION_SELF."?article_id=$article_id");
i zamieniamy na:
if ($data['article_allow_comments']) showcomments("A","articles","article_id",$article_id,FUSION_SELF."?article_id=$article_id", $data['user_id']);
W photogallery.php szukamy:
if ($data['photo_allow_comments'] == "1") showcomments("P","photos","photo_id",$photo_id,FUSION_SELF."?photo_id=$photo_id");
i zamieniamy na:
if ($data['photo_allow_comments'] == "1") showcomments("P","photos","photo_id",$photo_id,FUSION_SELF."?photo_id=$photo_id", $data['user_id']);
Sprawdzone, działa.
Edytowane przez bartek124 dnia 07.08.2008 13:50:37
Nie pomagam na komunikatorach oraz PW!
|