https://www.ads-software.com/extend/plugins/comments-for-me/
]]>Any help would be greatly appreciated.
]]>I’m currently developing a more useful author.php page using the Domtabs javascript to provide three tabbed sections – author bio, latest blogs and latest comments for each author.
I’ve almost go it sorted except for the latest author comments. The code I’m using pulls in all the comments made by the author and displays the entire comment. What I want to do is to just display the comment excerpt and I only want to display the latest 10 comments.
In the code below I’ve tried to call comment_excerpt in place of comment_content but this does not work – do I need to do an additional call in my functions file?
I’ve tried to use a loop on the output of author comments to restrict it to just 10 comments but it did not work. Adding a count to the output is my normal way of restricting output. Is there a way to only pull in the latest 10 comments elsewhere.
I think the problem I’m having is conflicts with the domtab javascript because I don’t see why doing the above does not work.
You can see what I’m trying to do here https://wildlifenews.co.uk/author/kevin/
The code for the author comments I’m using is:
<a name="comments" id="comments">Latest comments</a>
<?
if(get_query_var('author_name')) :
$curauth = get_userdatabylogin(get_query_var('author_name'));
else :
$curauth = get_userdata(get_query_var('author'));
endif;
$querystr = "
SELECT comment_ID, comment_post_ID, post_title, comment_content
FROM $wpdb->comments, $wpdb->posts
WHERE user_id = $curauth->ID
AND comment_post_id = ID
AND comment_approved = 1
ORDER BY comment_ID DESC
";
$comments_array = $wpdb->get_results($querystr, OBJECT);
if ($comments_array): ?>
<ul>
<? foreach ($comments_array as $comment):
setup_postdata($comment);
echo "<li><a href='". get_bloginfo('url') ."/?p=".$comment->comment_post_ID."'>Comment on ". $comment->post_title. "</a><br />". $comment->comment_content . "</li>";
endforeach; ?>
</ul>
<? endif; ?>
</div>
</div>
Any help would be appreciated
thanks
Kevin
For example, if the post author wants to comment without being logged in to WordPress. If their WordPress email address is [email protected] and they leave a comment on the post (while not logged in) with the email address [email protected].
For contributors who are not given permission to log in..
]]>I’d like to update my author pages to include all their comments. Seems like an obvious idea but I can’t find anything in the Codex that explicitly says how to do it. Only list stories for a given author.
]]>So, when some of authors go to Comments they should see just comments on their posts.
I found similar solution for edit posts, and those people give some solution for edit comments, but this is for new version of vordpress, and because I use some combination of plugins I can not upgrade…
I’m using wordpress 2.6.2.
I can hide all comments for user under some level but that isn’t solution. This I can do in /wp-admin/edit-comments.php so I was thinking maybe I can change something here to get results as I need.
This is original + code to hide comments for user under admin level:
<?php
get_currentuserinfo() ;
global $user_level;
if ($user_level > 9) {
$comments_per_page = apply_filters('comments_per_page', 20, $comment_status);
if ( isset( $_GET['apage'] ) )
$page = abs( (int) $_GET['apage'] );
else
$page = 1;
$start = $offset = ( $page - 1 ) * $comments_per_page;
list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra
$comments = array_slice($_comments, 0, $comments_per_page);
$extra_comments = array_slice($_comments, $comments_per_page);
$page_links = paginate_links( array(
'base' => add_query_arg( 'apage', '%#%' ),
'format' => '',
'total' => ceil($total / $comments_per_page),
'current' => $page
));
}
?>
I would appreciate any help.
Thanks in advance.
Andrija
As always-Thanks in Advance
]]>1. I’m using Smart YouTube’s plugin so that my imported shortcodes from WP.com will work on my older posts. I see that the plugin option page has a field for styling the videos, but I can’t figure out how to center them. I’ve tried setting the margin to auto, etc, but no luck. Any ideas?
2. My CSS defines a different background color for the author’s comments, but none of my old comments that I imported are recognized as my own. New comments are, but not the older ones. Is there a way to force it to recognize me as the author on my old comments?
Thanks!
]]>I have now found a problem! In my comments template, I’m using: <?php if ($comment->user_id) to assign a css class to be able to highlight author comments. The problem is that it seems all my imported comments weren’t assigned any user id at all, or at least that’s what I’m suspecting, since none of my author comments from my old blog now are highlighted!
Any suggestions on solutions for this?
By the way, I’m using version 2.6.3 at the moment.
// Jens.
]]>