ThemeShaper Forums » Thematic

[closed]

How to filter “Post a Comment” / “# Comments” text

(5 posts)
  • Started 12 years ago by Manuel
  • Latest reply from Manuel
  • This topic is not resolved
  1. In case I want to use the comment section to act as a guestbook it would make sense to change the “Post a Comment” and “## Comments” to something like “Write something” and “## Entries”.

    Now, in my special case this filter needs to be limited to a specific category (yes, I know, a page makes more sense for a guestbook, but that ain’t working in my fucked up case of navigation mayhem).

    Example of category page as guestbook: http://ads-rantum.de/_neu/extras/gaestebuch/

    Posted 12 years ago #
  2. Hi Manuel,

    forget my last DM .. will integrate the needed filters.

    Chris

    Posted 11 years ago #
  3. Is it a bird? Is it a plane? No, it’s Superchris! :)

    Posted 11 years ago #
  4. :)

    SVN revision 558 is online.

    This is an example for your functions.php (change the (TRUE) to the needed conditional tag):

    function my_singlecomment_text($content) {
    	if (TRUE) {
    		$content = '<span>One</span> Guestbook entry';
    	}
    	return $content;
    }
    add_filter(thematic_singlecomment_text, my_singlecomment_text);
    
    function my_multiplecomments_text($content) {
    	if (TRUE) {
    		$content = '<span>%d</span> Guestbook entries';
    	}
    	return $content;
    }
    add_filter(thematic_multiplecomments_text, my_multiplecomments_text);
    
    function my_postcomment_text($content) {
    	if (TRUE) {
    		$content = 'Post a Guestbook entry';
    	}
    	return $content;
    }
    add_filter(thematic_postcomment_text, my_postcomment_text);
    
    function my_postreply_text($content) {
    	if (TRUE) {
    		$content = 'Post a Reply to entry %s';
    	}
    	return $content;
    }
    add_filter(thematic_postreply_text, my_postreply_text);
    
    function my_commentbox_text($content) {
    	if (TRUE) {
    		$content = 'Guestbook entry';
    	}
    	return $content;
    }
    add_filter(thematic_commentbox_text, my_commentbox_text);
    
    function my_commentbutton_text($content) {
    	if (TRUE) {
    		$content = 'Post Guestbook entry';
    	}
    	return $content;
    }
    add_filter(thematic_commentbutton_text, my_commentbutton_text);

    Chris

    Posted 11 years ago #
  5. Awesome! Thanks a ton, Chris! :)
    Diggin’ into it now…

    What a lovely morning, isn’t it? :D

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.