Need to parse "You Says" into correct "You Say" (1 post)

  1. nate451
    Posted 7 years ago #

    I love this plugin; thanks for creating it! My only significant complaint is that whenever the commenter name is "You" (as it always is for a logged-in admin), the text "Says" doesn't change to "You Say".

    I've fixed this for myself by changing this code to:

    if(purl && pnme) {
    		var name = '<a href="' + purl + '">' + pnme + '</a>';
    		var verb = "Says";
    	} else if(!purl && pnme) {
    		var name = pnme;
    		var verb = "Says";
    	} else if(purl && !pnme) {
    		var name = '<a href="' + purl + '">You</a>';
    		var verb = "Say";
    	} else {
    		var name = "You";
    		var verb = "Say";

    ...Added this line to the preview section:

    $previewFormat = str_replace("%4", "' + verb + '", $previewFormat);

    And changed $previewFormat to:

    $previewFormat = '
    		<ol class="commentlist" style="clear: both; margin-top: 3em;">
    			<li id="comment-preview" class="alt" style="overflow: hidden;">
    				<img src="%3" alt="" class="gravatar" style="float: left; margin-right: 10px;"/>
    				<cite>%1</cite> %4:
    				<br />

    This is an almost certainly inelegant solution; I don't really code. So I'd love to see this built in to an update of the core plugin. Thanks!


Topic Closed

This topic has been closed to new replies.

About this Topic