Advanced Comment Box Options

Localization / Labels

This code allows you to change the text within the HTML comment box form. IE, to change 'Comments' to say 'Guestbook', and Guestbook will be your new title hovering above your visitors' comments! You could also use this code to convert the comment box to another language. However, you cannot change the words used in the date of a comment posted, such as '5 minutes ago' currently. If you don't want English dates on your page, you may disable the date in the basic options for the comment box.


  1. This code goes ABOVE the main HTML Comment Box code!
  2. Use this code only if you have some idea what you're doing. You should probably know basic javascript.
  3. If you have issues, try removing this code from your HTML.

<!-- customize labels of -->
/* This code goes ABOVE the main HTML Comment Box code!
 replace the text in the single quotes below to customize labels.*/
hcb_user = {
    /* L10N */
    comments_header : 'Comments',
    name_label : 'Name',
    content_label: 'Enter your comment here',
    submit : 'Comment',
    logout_link : '<img title="log out" src="" alt="[logout]" class="hcb-icon hcb-door-out"/>',
    admin_link : '<img src="" alt="[login]" class="hcb-icon hcb-door-in"/>',
    no_comments_msg: 'No one has commented yet. Be the first!',
    add:'Add your comment',
    again: 'Post another comment',
    rss:'<img src="" class="hcb-icon" alt="rss"/> ',
    prev_page:'<img src="" class="hcb-icon" title="previous page" alt="[prev]"/>',
    next_page:'<img src="" class="hcb-icon" title="next page" alt="[next]"/>',
    website_label:'website (optional)',
    subscribe:'Email Me Replies',
    add_image:'Add Image',
    are_you_sure:'Do you want to flag this comment as inappropriate?',


    /* dates */
    days_ago:'days ago',
    hours_ago:'hours ago',
    minutes_ago:'minutes ago',
    within_the_last_minute:'within the last minute',

    msg_thankyou:'Thank you for commenting!',
    msg_approval:'NOTE: This comment is not published until approved',
    msg_approval_required:'Thank you for commenting! Your comment will appear once approved by a moderator.',

    err_bad_html:'Your comment contained bad html.',
    err_bad_email:'Please enter a valid email address.',
    err_too_frequent:'You must wait a few seconds between posting comments.',
    err_comment_empty:'Your comment was not posted because it was empty!',
    err_denied:'Your comment was not accepted.',
    err_unknown:'Your comment was blocked for unknown reasons, please report this.',
    err_spam:'Your comment was detected as spam.',
    err_blocked:'Your comment was blocked by site policy.',

    /* SETTINGS */
    MAX_CHARS: 8192,
    PAGE:'', /* ID of the webpage to show comments for. defaults to the webpage the user is currently visiting. */
    ON_COMMENT: function(){}, /* Function to call after commenting. */
    RELATIVE_DATES:true /* show dates in the form "X hours ago." etc. */
<!-- done customizing labels of -->

You can also put HTML, like image tags, inside these custom variables for some great looking effects!

Other Settings:

  • hcb_user.MAX_CHARS - The maximum number of characters submitted comments may contain. Can't be higher than 4096.
  • hcb_user.PAGE - The page identifier for this comment box. By default, comments are unique to each web page, but by setting this to the same string on multiple pages, your pages will display the same list of comments.
  • hcb_user.onload() - A callback that fires when the comment box finishes loading.

Pre-built advanced examples: