|
v7 Ajax comments - neveikia LT raids
|
| Narysx |
parašyta 2009-12-12 16:45
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Parsisiuniau ajax komentarus, tikrai geras dalykas, labai patiko, tik problema, kad nerodo LT raid?i. :/ Tarkim paspaud?iu ant siuntinio, para?au komentar ir vietoj LT raid?i ra?o heroglifus (pamatysit paveiksllyje). Jei i?eini pagr. puslap ir vl nueini t siuntin (arba papra?iausiai refreshini) raids vl rodomos gerai, taiau jei para?ai kok nors komentar, vl vis komentar raids pasidaro kaip heroglifai. ?od?iu ka?kas blogai tikriausiai su paiu java script'u, nes nebeatvaizduoja raid?i tik tada, kai para?ai komentar. Va image:
Code
EDIT:
Kodai susij su teksto koduotmis yra faile includes/comments/addcomment.php:
Code if (!iMEMBER) {
$name = urldecode($_POST['name']);
if ($locale['charset'] != 'UTF-8') { $name = iconv('UTF-8', $locale['charset'], $name); }
$name = mysql_real_escape_string($name);
}
if ($_GET['delete_comment'] == '0') {
$comment = urldecode($_POST['comment']);
$comment = iconv('UTF-8', 'windows-1257', $comment);
$comment = mysql_real_escape_string($comment);
} else { $comment = \"\"; }
Ra?iau ?it prane?im ir kitam supporte, bet ten niekas ne?inojo kaip padt ir sak ra?yt tabux, nes jis visk pratestavs, o kadangi tabux neatra?o man skype tai ra?au ia, gal pamatys mano post'. ;) Anyway, laukiu pagalbos. |
| |
|
|
| Rinas |
parašyta 2009-12-12 17:34
|
Administratorius

Reputacija:
0
Pranešimai: 204
Įstojo: 2009-06-10
|
O kokia koduote naudoji savo tinklapyje, paprast ar UTF-8? |
| |
|
|
| Narysx |
parašyta 2009-12-12 20:00
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
MySQL connection collation: utf8_general_ci |
| |
|
|
| Rinas |
parašyta 2009-12-13 07:40
|
Administratorius

Reputacija:
0
Pranešimai: 204
Įstojo: 2009-06-10
|
Ne mysql, o tinklapio kalba. Gali bti Lithuanian arba Lithuanian-utf-8 ar pan. |
| |
|
|
| Narysx |
parašyta 2009-12-13 12:00
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Lithuanian. ;) |
| |
|
|
| Rinas |
parašyta 2009-12-13 13:48
|
Administratorius

Reputacija:
0
Pranešimai: 204
Įstojo: 2009-06-10
|
O jei pabadytum i?vis i?trint ten kur su koduote susija eiluts, pvz:
Code if ($locale['charset'] != 'UTF-8') { $name = iconv('UTF-8', $locale['charset'], $name); }
Ir:
Code $comment = iconv('UTF-8', 'windows-1257', $comment);
dk ia tuos failus a? pas save pabandysiu sidt ir pa?irt. |
| |
|
|
| Narysx |
parašyta 2009-12-13 13:56
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Vistiek tas pats... Prisegu.
http://www.failai.lt/sw3y1m4ke5lc/Ajax_Comments_7_v.1.0.rar.htm
Redagavo Narysx 2009-12-13 13:57 |
| |
|
|
| tabux |
parašyta 2009-12-13 15:33
|

S.Administratorius

Reputacija:
0
Pranešimai: 1009
Įstojo: 2008-10-16
|
keisk addcomment.php kod ?iuo (arba parsisisk i? naujo):
Code
/*-------------------------------------------------------+
| Ajax Comments mSF For PHP-Fusion 7.xx v.1.0
| Copyright 2008-2009 Powered by .:MeF:.
| URL: http://x-iweb.ru/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once \"../../maincore.php\";
require_once INCLUDES.\"comments/show_comments.php\";
$cid = stripinput($_POST['id']);
$ctype = stripinput($_POST['ctype']);
$cdb = stripinput($_POST['cdb']);
$ccol = stripinput($_POST['ccol']);
$clink = stripinput($_POST['clink']);
if (!iMEMBER) {
$name = urldecode($_POST['name']);
if ($locale['charset'] != 'UTF-8') { $name = iconv('UTF-8', $locale['charset'], $name); }
$name = mysql_real_escape_string($name);
}
if ($_GET['delete_comment'] == '0') {
$comment = urldecode($_POST['comment']);
$comment = iconv('UTF-8', $locale['charset'], $comment);
$comment = mysql_real_escape_string($comment);
} else { $comment = \"\"; }
if ((iMEMBER || $settings['guestposts'] == \"1\") && isset($comment)) {
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == \"1\") {
$comment_name = trim(stripinput($name));
$comment_name = preg_replace(\"(^[0-9]*)\", \"\", $comment_name);
if (isnum($comment_name)) { $comment_name = \"\"; }
include_once INCLUDES.\"securimage/securimage.php\";
$securimage = new Securimage();
if (!isset($_POST['com_captcha_code']) || $securimage->check($_POST['com_captcha_code']) == false) {
show_comments($ctype, $cdb, $ccol, $cid, $clink);
echo \"Neteisingai ivestas saugos kodas. \";
die; }
}
$comment_message = trim(stripinput(censorwords($comment)));
if ($_GET['delete_comment'] == '1') {
if ((iADMIN && checkrights(\"C\")) || (iMEMBER && dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_id='\".$_POST['comment_id'].\"' AND comment_name='\".$userdata['user_id'].\"'\"))) {
$result = dbquery(\"DELETE FROM \".DB_COMMENTS.\" WHERE comment_id='\".$_POST['comment_id'].\"' AND comment_type = '\".$ctype.\"'\");
}
} else {
if (!dbcount(\"(\".$ccol.\")\", $cdb, $ccol.\"='\".$cid.\"'\")) { redirect(BASEDIR.\"index.php\"); }
if ($comment_name && $comment_message) {
require_once INCLUDES.\"flood_include.php\";
if (!flood_control(\"comment_datestamp\", DB_COMMENTS, \"comment_ip='\".USER_IP.\"'\")) {
$result = dbquery(\"INSERT INTO \".DB_COMMENTS.\" (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '\".time().\"', '\".USER_IP.\"')\");
}
}
}
$c_start = (ceil(dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_item_id='\".$cid.\"' AND comment_type='\".$ctype.\"'\") / 10) - 1) * 10;
}
show_comments($ctype, $cdb, $ccol, $cid, $clink);
?>
Redagavo tabux 2009-12-13 15:37 |
| |
|
|
| Narysx |
parašyta 2009-12-13 15:42
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Tai, kad visvien tas pats. :S Para?ai komentar ir nerodo LT raid?i. eini i? naujo t puslap kur rodo komentarus, lt raids vl atsiranda, bet para?ius kmntr vl visos kaip heroglifai bna. |
| |
|
|
| tabux |
parašyta 2009-12-13 15:51
|

S.Administratorius

Reputacija:
0
Pranešimai: 1009
Įstojo: 2008-10-16
|
koks tinklalapio adresas? |
| |
|
|
| Narysx |
parašyta 2009-12-13 15:53
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Para?ysiu pm, nes dar nenoriu vie?int... |
| |
|
|
| tabux |
parašyta 2009-12-13 16:17
|

S.Administratorius

Reputacija:
0
Pranešimai: 1009
Įstojo: 2008-10-16
|
bandyk ?itaip...
Code
/*-------------------------------------------------------+
| Ajax Comments mSF For PHP-Fusion 7.xx v.1.0
| Copyright 2008-2009 Powered by .:MeF:.
| URL: http://x-iweb.ru/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once \"../../maincore.php\";
require_once INCLUDES.\"comments/show_comments.php\";
$cid = stripinput($_POST['id']);
$ctype = stripinput($_POST['ctype']);
$cdb = stripinput($_POST['cdb']);
$ccol = stripinput($_POST['ccol']);
$clink = stripinput($_POST['clink']);
if (!iMEMBER) {
$name = stripinput($_POST['name']);
//if ($locale['charset'] != 'UTF-8') { $name = iconv('UTF-8', $locale['charset'], $name); }
$name = mysql_real_escape_string($name);
}
if ($_GET['delete_comment'] == '0') {
$comment = urldecode($_POST['comment']);
//$comment = iconv('UTF-8', $locale['charset'], $comment);
$comment = mysql_real_escape_string($comment);
} else { $comment = \"\"; }
if ((iMEMBER || $settings['guestposts'] == \"1\") && isset($comment)) {
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == \"1\") {
$comment_name = trim(stripinput($name));
$comment_name = preg_replace(\"(^[0-9]*)\", \"\", $comment_name);
if (isnum($comment_name)) { $comment_name = \"\"; }
include_once INCLUDES.\"securimage/securimage.php\";
$securimage = new Securimage();
if (!isset($_POST['com_captcha_code']) || $securimage->check($_POST['com_captcha_code']) == false) {
show_comments($ctype, $cdb, $ccol, $cid, $clink);
echo \"Neteisingai ivestas saugos kodas. \";
die; }
}
$comment_message = trim(stripinput(censorwords($comment)));
if ($_GET['delete_comment'] == '1') {
if ((iADMIN && checkrights(\"C\")) || (iMEMBER && dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_id='\".$_POST['comment_id'].\"' AND comment_name='\".$userdata['user_id'].\"'\"))) {
$result = dbquery(\"DELETE FROM \".DB_COMMENTS.\" WHERE comment_id='\".$_POST['comment_id'].\"' AND comment_type = '\".$ctype.\"'\");
}
} else {
if (!dbcount(\"(\".$ccol.\")\", $cdb, $ccol.\"='\".$cid.\"'\")) { redirect(BASEDIR.\"index.php\"); }
if ($comment_name && $comment_message) {
require_once INCLUDES.\"flood_include.php\";
if (!flood_control(\"comment_datestamp\", DB_COMMENTS, \"comment_ip='\".USER_IP.\"'\")) {
$result = dbquery(\"INSERT INTO \".DB_COMMENTS.\" (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '\".time().\"', '\".USER_IP.\"')\");
}
}
}
$c_start = (ceil(dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_item_id='\".$cid.\"' AND comment_type='\".$ctype.\"'\") / 10) - 1) * 10;
}
show_comments($ctype, $cdb, $ccol, $cid, $clink);
?>
|
| |
|
|
| Narysx |
parašyta 2009-12-13 16:20
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Dabar atvirk?iai - atjus tarkim nario profil, komentaruose rodo heroglifus, jei para?ai komentar - rodo su lt raidm. |
| |
|
|
| tabux |
parašyta 2009-12-13 16:43
|

S.Administratorius

Reputacija:
0
Pranešimai: 1009
Įstojo: 2008-10-16
|
na tai senus komentarus i?sitrink ir viskas.. |
| |
|
|
| Narysx |
parašyta 2009-12-13 17:00
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Juk ?inau... Vistiek. Para?ai naujus, i? prad?i rodo gerai, ateini i? naujo ir vl blogai. |
| |
|
|
| zilvinas951 |
parašyta 2009-12-13 17:01
|

Pradinukas

Reputacija:
0
Pranešimai: 31
Įstojo: 2009-06-23
|
man viskas veike kai as dariau |
| |
|
|
| Narysx |
parašyta 2009-12-13 17:04
|
Pradinukas

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Pakeiiau tinklalapio kalb Lithuanian-utf 8 ir gerai. O niekaip nemanoma pritaikyt tik prie Lithuanian? Nes dbr man dar daug k reiks keist, jei paliksiu lit-utf8.
Nebeturit dj..?
Redagavo Narysx 2009-12-13 22:16 |
| |
|