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

Reputacija:
0
Pranešimai: 32
Įstojo: 2008-06-24
|
Parsisiunèiau 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 paveikslëlyje). Jei i?eini á pagr. puslapá ir vël nueini á tà siuntiná (arba papra?èiausiai refreshini) raidës vël rodomos gerai, taèiau jei para?ai koká nors komentarà, vël visø komentarø raidës pasidaro kaip heroglifai. ?od?iu ka?kas blogai tikriausiai su paèiu java script'u, nes nebeatvaizduoja raid?iø tik tada, kai para?ai komentarà. Va image:
Code
EDIT:
Kodai susijæ su teksto koduotëmis 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 padët ir sakë ra?yt tabux, nes jis viskà pratestavæs, 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 bûti 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 eilutës, pvz:
Code if ($locale['charset'] != 'UTF-8') { $name = iconv('UTF-8', $locale['charset'], $name); }
Ir:
Code $comment = iconv('UTF-8', 'windows-1257', $comment);
Ádëk èia tuos failus a? pas save pabandysiu ásidët ir pa?iûrët. |
| |
|
|
| 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 parsisiøsk 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 raidës vël atsiranda, bet para?ius kmntr vël visos kaip heroglifai bûna. |
| |
|
|
| 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 - atëjus á tarkim nario profilá, komentaruose rodo heroglifus, jei para?ai komentarà - rodo su lt raidëm. |
| |
|
|
| 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 vël 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
|
Pakeièiau tinklalapio kalbà á Lithuanian-utf 8 ir gerai. O niekaip neámanoma pritaikyt tik prie Lithuanian? Nes dbr man dar daug kà reikës keist, jei paliksiu lit-utf8.
Nebeturit ádëjø..?
Redagavo Narysx 2009-12-13 22:16 |
| |
|