Jak usun?? emotki z komentarzy?
|
szpuk |
Dodany dnia 05.08.2007 23:29:37
|

Przedszkolak

Postów: 15
Data rejestracji: 07.07.2007 15:18
Złamana licencja
|
Chodzi mi o u?mieszki w komentarzach i jak by to by?o mo?liwe chcia?bym tez usun?c : b,i,u,url,size, ITD - zostawa? tylko pole do wpisu komentarza i zaraz pod nim DODAJ ODPOWIEDZ
Edytowane przez Grzes dnia 06.08.2007 09:05:17
|
|
|
|
W?cibski Go?? |
Dodany dnia 10.09.2025 13:49:14
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
dex |
Dodany dnia 05.08.2007 23:31:13
|

Pocz?tkuj?cy

Postów: 212
Data rejestracji: 16.08.2006 15:18
|
Wystarczy odznaczy? komentarze i nikt nie doda u?mieszków, chyba, ?e kolega chce mie? dost?pne komentarze, lecz wy??czone w nich u?mieszki, ale tu nikt nie b?dzie si? domy?la? co autor mia? na my?li...
EDIT:
Zainteresuj si? plikiem comments.php w katalogu administration, tam usuniesz wszystkie bbcode, czyli b, i ,u oraz jak si? nie myl? "u?mieszki"
Edytowane przez Grzes dnia 06.08.2007 09:05:49
|
|
|
|
MajsterBieda |
Dodany dnia 05.08.2007 23:40:08
|

Pocz?tkuj?cy

Postów: 222
Data rejestracji: 08.11.2004 17:25
|
dex napisa?/a:
Zainteresuj si? plikiem comments.php w katalogu administration
A mo?e lepiej plikiem maincore.php?
Edytowane przez Grzes dnia 06.08.2007 09:05:56
|
|
|
|
dex |
Dodany dnia 05.08.2007 23:42:32
|

Pocz?tkuj?cy

Postów: 212
Data rejestracji: 16.08.2006 15:18
|
Fakt, mój b??d, bo w?a?nie tam grzeba?em i by?y wszystkie te butoniki ;p
EDIT: Ku ?cis?o?ci sprawdzi?em, i... w katalogu includes/comments_include.php trzeba usun?? te u?mieszki i bbcode te?
Edytowane przez Grzes dnia 06.08.2007 09:06:02
|
|
|
|
szpuk |
Dodany dnia 05.08.2007 23:43:43
|

Przedszkolak

Postów: 15
Data rejestracji: 07.07.2007 15:18
Złamana licencja
|
Super dzieki wielkie za pomoc !!! Jezeli to nie klopot dla was to moze wiecie ktore to linie ?
Edytowane przez Grzes dnia 06.08.2007 09:06:11
|
|
|
|
dex |
Dodany dnia 05.08.2007 23:51:58
|

Pocz?tkuj?cy

Postów: 212
Data rejestracji: 16.08.2006 15:18
|
Tu masz plik comments_include.php bez u?mieszków, a usuni?cie bbcode typu b, i, u, url itp to usuniecie ca?ych linii w tym kodzie:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email:
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }
include LOCALE.LOCALESET."comments.php";
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
global $settings,$locale,$userdata,$aidlink;
if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
$flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
fallback(BASEDIR."index.php");
}
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == "1") {
$comment_name = trim(stripinput($_POST['comment_name']));
$comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
if (isNum($comment_name)) $comment_name="";
}
$comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
if ($comment_name != "" && $comment_message != "" && !preg_match("#\[url\](.*?)\[/url\]#si", $message)) {
$result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
if (!iSUPERADMIN || dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_comment']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
if (iMEMBER) $result = dbquery("UPDATE ".DB_PREFIX."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
}
}
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '".time()."', '".USER_IP."')");
}
redirect($clink);
}
tablebreak();
opentable($locale['c100']);
$result = dbquery(
"SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
WHERE comment_item_id='$cid' AND comment_type='$ctype'
ORDER BY comment_datestamp ASC"
);
if (dbrows($result) != 0) {
$i = 0;
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>\n";
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($comment_message));
echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
echo $comment_message."</td>\n</tr>\n";
$i++;
}
if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&ctype=$ctype&cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
echo "</table>\n";
} else {
echo $locale['c101']."\n";
}
closetable();
tablebreak();
opentable($locale['c102']);
if (iMEMBER || $settings['guestposts'] == "1") {
echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
if (iGUEST) {
echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
}
echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[code]', ' ');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '', ' ');\">
<br><br>
</tr>
<tr>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
} else {
echo $locale['c105']."\n";
}
closetable();
}
?>[/code]
Edytowane przez Grzes dnia 06.08.2007 09:06:20
|
|
|
|
szpuk |
Dodany dnia 05.08.2007 23:58:37
|

Przedszkolak

Postów: 15
Data rejestracji: 07.07.2007 15:18
Złamana licencja
|
moj plik wyglada tak
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright ? 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email:
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }
include LOCALE.LOCALESET."comments.php";
require_once INCLUDES."button.php";
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
global $settings,$locale,$userdata,$aidlink,$status;
if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
$flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
fallback(BASEDIR."index.php");
}
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == "1") {
$comment_name = trim(stripinput($_POST['comment_name']));
$comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
if (isNum($comment_name)) $comment_name="";
}
$comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
$comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
$result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
if (!iSUPERADMIN && dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_comment']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
}
}
if (!$flood) {
if (iADMIN or $settings[comment_accept] == 0 or $settings['guestposts'] == "1" and iGUEST and $settings[comment_accept] == 0) {
$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."')");
redirect("$clink");
} else if (iMEMBER && !iADMIN or $settings['guestposts'] == "1" and iGUEST) {
$submit_comment['comment_item_id'] = stripinput("$cid");
$submit_comment['comment_type'] = stripinput("$ctype");
$submit_comment['comment_name'] = stripinput("$comment_name");
$submit_comment['comment_message'] = stripinput("$comment_message");
$submit_comment['comment_smileys'] = stripinput("$comment_smileys");
$timmee = time();
$submit_comment['comment_datestamp'] = stripinput("$timmee");
$ipp = "".USER_IP."";
$submit_comment['comment_ip'] = stripinput("$ipp");
$result = dbquery("INSERT INTO ".DB_PREFIX."submissions (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('c', '".$userdata['user_id']."', '".time()."', '".serialize($submit_comment)."')");
redirect("$clink&status=dodano");
}
}
}
}
tablebreak();
if (isset($status)) {
if ($status == "dodano") {
$title = $locale['0000'];
$message = $locale['0001'];
}
opentable($title);
echo "<div align='center'>".$message."</div>\n";
closetable();
tablebreak();
}
opentable($locale['c100']);
$result = dbquery(
"SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
WHERE comment_item_id='$cid' AND comment_type='$ctype'
ORDER BY comment_datestamp ASC"
);
if (dbrows($result) != 0) {
$i = 0;
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>\n";
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
if ($data['comment_smileys'] == "1") {
$comment_message = parsesmileys($data['comment_message']);
} else {
$comment_message = $data['comment_message'];
}
$comment_message = nl2br(parseubb($comment_message));
echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
echo $comment_message."</td>\n</tr>\n";
$i++;
}
if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&ctype=$ctype&cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
echo "</table>\n";
} else {
echo $locale['c101']."\n";
}
closetable();
tablebreak();
opentable($locale['c102']);
if (iMEMBER || $settings['guestposts'] == "1") {
echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
if (iGUEST) {
echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
}
echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
".show_buttons(1,"comment_message")."
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
} else {
echo $locale['c105']."\n";
}
closetable();
}
?> a jak podmienilem na Twoj to calego newsa mi nie pokazywalo...
Edytowane przez Grzes dnia 06.08.2007 09:06:28
|
|
|
|
dex |
Dodany dnia 06.08.2007 00:02:16
|

Pocz?tkuj?cy

Postów: 212
Data rejestracji: 16.08.2006 15:18
|
Hmmm, samo usuni?cie:
".displaysmileys("comment_message")."
spowoduje to, ?e u?mieszki nie poka?? si? userowi, tyle, ?e mo?e je doda? "r?cznie" pisz?c :) i inne takie, wi?c je?eli tylko chcesz, aby ich nie by?o wida? jako grafiki, lecz mia?yby dzia?a?, to usu? t? jedn? linijk?, a je?eli w ogóle ma ich nie by? to zapraszam do maincore.php
Edytowane przez Grzes dnia 06.08.2007 09:06:36
|
|
|
|
szpuk |
Dodany dnia 06.08.2007 00:05:37
|

Przedszkolak

Postów: 15
Data rejestracji: 07.07.2007 15:18
Złamana licencja
|
Takie rozwiazanie to nawet lepsze! Zrobilem jak napisales i dziala. DZIEKUJE JESZCZE RAZ !!!
Edytowane przez Grzes dnia 06.08.2007 09:06:44
|
|
|