1
« on: 27 August 2011, 17:56 »
Is it possible to insert ratings in comments.php? I am using a custom theme by suffusion. The default comment form field is author, email, url, then comment box. I want the ratings to appear either above the name field or above the comment box which is below url field. I wonder if you, Lester or anyone, can help me with this as I always get a parsing error when I insert the rating coded - <?php if(function_exists('the_ratings')) { the_ratings(); } ?> in b/w the url and email field and above the comment field array...
Here is a snippet of the comments.php code in suffusion though I am not sure if this snippet of code is the one I am suppose to stick the code into.
if ('open' == $post->comment_status) :
$label_style = $suf_comment_label_styles == "plain" ? "" : " fancy ";
comment_form(apply_filters('suffusion_comment_form_fields', array(
'fields' => array(
'author' => "
<p>
<label for='author' class='$label_style'>$suf_comment_label_name</label>
<input type='text' name='author' id='author' class='textarea' value='".esc_attr($comment_author)."' size='28' tabindex='1' />". ($req ? $suf_comment_label_name_req : "")."
</p>",
'email' => "
<p>
<label for='email' class='$label_style'>$suf_comment_label_email</label>
<input type='text' name='email' id='email' value='".esc_attr($comment_author_email)."' size='28' tabindex='2' class='textarea' />". ($req ? $suf_comment_label_email_req : ""). "
</p>",
'url' => "
<p>
<label for='url' class='$label_style'>$suf_comment_label_uri</label>
<input type='text' name='url' id='url' value='".esc_attr($comment_author_url)."' size='28' tabindex='3' class='textarea' />
</p>"
),
'comment_field' => "
<p>
<label for='comment' class='textarea $label_style'>$suf_comment_label_your_comment</label>
<textarea name='comment' id='comment' cols='60' rows='10' tabindex='4' class='textarea'></textarea>
</p>",
'logged_in_as' => '<p class="logged-in-as">'.sprintf(__('Logged in as %s. ', 'suffusion'), "<a href='".admin_url('profile.php')."'>".$user_identity."</a>").
' <a href="'.wp_logout_url(apply_filters('the_permalink', get_permalink($post_id))).'">'.__('Log out', 'suffusion').'</a>.'.'</p>',
'must_log_in' => '<p class="must-log-in">'.
'<a href="'.wp_login_url(apply_filters('the_permalink', get_permalink($post_id))).'">'.__('You must be logged in to post a comment.', 'suffusion').'</a></p>',
'title_reply' => __('Leave a Reply', "suffusion"),
'title_reply_to' => __('Leave a Reply to %s', "suffusion"),
'label_submit' => __('Submit Comment', "suffusion"),
'comment_notes_before' => "<span></span>",
'comment_notes_after' => '<p class="form-allowed-tags">'.sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'suffusion'), '<code>'.allowed_tags().'</code>').'</p>',
'cancel_reply_link' => __('Cancel reply', 'suffusion'),
)));
?>
Thanks.