Editing the Comment Plugger plugin

Perhaps you have downloaded the Comment Plugger plugin but you don’t know how to style it so the commentators names won’t appear as a vertical list. Here is a way on how to edit the script without crashing it.

Step 1:
Open the comment-plugger.php file and look for the following codes:

[php]
foreach ($commenters as $commenter) {<br>
if (!empty($commenter->comment_author)) {<br>
if (!empty($commenter->comment_author_url))<br>
$output .= ‘<li><a href="’ . $commenter->comment_author_url . ‘" title="Visit ‘
. $commenter->comment_author . ‘">’ . $commenter->comment_author . ‘</a> </li>’;<br>
else<br>
$output .= ‘<li>’ . $commenter->comment_author . ‘ </li>’;<br>
}<br>
}<br>
<br>
echo $before . ‘<ul>’ . $output . ‘</ul>’;<br>
}<br>
}<br>
?>
[/php]

Step 2:
Next, replace that set of codes with this:

[php]
foreach ($commenters as $commenter) {<br>
if (!empty($commenter-&gt;comment_author)) {<br>
if (!empty($commenter-&gt;comment_author_url))<br>
$output .= ‘&lt;a href=&quot;’ . $commenter-&gt;comment_author_url . ‘&quot; title=&quot;Visit ‘ .
$commenter-&gt;comment_author . ‘&quot;&gt;’ . $commenter-&gt;comment_author . ‘&lt;/a&gt;’ . ‘, ‘;<br>
else<br>
$output .= $commenter-&gt;comment_author . ‘, ‘;<br>
}<br>
}<br>
<br>
echo $before . $output;<br>
}<br>
}<br>
?&gt;
[/php]

What we are doing here is we remove the <li> from the codes and we add a ‘,’ right after the commentator’s name. You can replace the comma with any character you like.

Step 3:
Save the file and test it out. The names should appear in horizontally.