Cant send Messages
-
Hello,
i use your plugin and i changed something in the schreikasten.php.
Now i cant send messages. can u help me?my site https://www.sparchef.de
$avatar=””;
$item=””;//Get the avatar using the specific size
if($options[‘avatar’]) {
$avatar=sk_avatar($comment->id,$av_size);
}$comment_text=sk_format_text( wp_kses( (string)$comment->text, $sk_allowed) );
$comment_text=str_replace(“<p>”, “”, $comment_text);
$comment_text=str_replace(“</p>”, “”, $comment_text);//If we have to hide this comment it’s because this is the
//section that would display the message while we ask if it’s spam.
//Then we have to set the comment part as the section that would have
//the message and the alias.
$th_alias_id = $th_text_id = “”;
if($hide) {
$th_alias_id = ” id=’th_sk_alias$rand'”;
$th_text_id = ” id=’th_sk_text$rand'”;
}/*$cp_points = “”;
if(function_exists(‘cp_displayPoints’) && $comment->user_id>=0) {
$cp_points = sprintf(” (%s)”,cp_displayPoints($comment->user_id, true, true));
}*/
$points = apply_filters(‘sk_points’, “”, $comment);//Create the comment text
$item.=”<div style=’min-height: “.$av_size.”px;’>”.”
<div class=’skwidget-comment6′>”.$avatar.” <div class=’timeshout’>(“.$comment->date.”)</div></div>
<div class=’skwidget-comment5’$th_alias_id>”.sanitize_text_field($comment->alias).$points.”</div>
<div class=’skwidget-comment4′>”.$comment_text.”</div>
<div style=’clear: both;’></div>
</div>”;if($options[‘layout’]==SK_LAYOUT_QA) {
if($replies = sk_format_replies($comment->id,$sk_canmannage,$rand)) $item.=$replies;
}//if we show avatars, use the images
$id = $comment->id;$user_id = $comment->user_id;
//Set the comment owner type
$usertype = ‘sk-user-user’;
if($user_id>0) {
$comment_user = get_userdata($user_id);
$capabilities = $comment_user->wp_capabilities; //->administrator;
if(isset($capabilities[‘author’]) && $capabilities[‘author’]==1) $usertype = ‘sk-user-author’;
if(isset($capabilities[‘editor’]) && $capabilities[‘editor’]==1) $usertype = ‘sk-user-editor’;
if(isset($capabilities[‘administrator’]) && $capabilities[‘administrator’]==1) $usertype = ‘sk-user-admin’;
}$sk_id = “id=’sk-$rand-$id'”;
$class = “class=’$divClass $usertype'”;
if($hide) {
$class = “class=’throbber-img-off’ style=’visibility: hidden;'”;
$sk_id = “id=’throbber-img$rand'”;
}if($options[‘avatar’]) {
$answer.=”\n<div $class $sk_id>
$item
</div>”;
} else { //else, it’s a list item
$answer.=”\n<li $class $sk_id>
$item
“;
}
return $answer;
}/**
* Returns the name of the owner of the comment
*
* @param int id The comment id
* @return string The name of the owner, false on error
* @access public
*/function sk_name_by_id($id)
{
global $wpdb;
$answer = false;//Get the comments to show
$table_name = $wpdb->prefix . “schreikasten”;
$sql=”SELECT alias FROM $table_name WHERE id=$id”;
$comments = $wpdb->get_results($sql);
if(is_array($comments)) {
foreach($comments as $comment) {
$answer = $comment->alias;
}
}return $answer;
}/**
* Returns the page where this comment is
*
* @param int id The comment id
* @return string The page number, false on error
* @access public
*/function sk_page_by_id($id)
{
global $wpdb;
$answer = 1;$options = get_option(‘sk_options’);
$size=$options[‘items’];//Get the comments to show
$table_name = $wpdb->prefix . “schreikasten”;
$sql=”SELECT count(*) FROM $table_name WHERE id>=$id AND status=”.SK_HAM;
if($comments = $wpdb->get_var($sql)) {
$answer = ceil($comments/$size);
}return $answer;
this and something other i changed. but i dont know what :D. plz help :/. i think i changed the something with random ?!?.
- The topic ‘Cant send Messages’ is closed to new replies.