I'm using the fivestar comments module to allow rating of nodes through comments. Now I would like all or most of the occurrences of "Comment" to be "Review". I checked out my options for this, and it doesn't look like it can be solved by theming and I don't want to hack any code (although that would have been ton easier) so I figured I would have to create a module for this.
I've fount out two things so far, first I have to use hook_form_alter() to change any of the comment form. I researched how to do that and looked throught the comment.module source to find out exactly what I need to edit, but it isn't working. I thought this would work to change the label of the textarea in the "post new comment" form, here is my code.
function review_form_alter($form_id, $form_state, &$form){
if ($form_id == 'comment_form'){
$form['comment_filter']['comment'] = array(
'#title' => t('Review'),
);
}
}
The other thing is that the heading for that form is "Post new comment" I would like to change this to "Post new Review". I found where this is called, in comment_render, comment_form_box but I have no idea how to start to override this.
There are other things I want to change like "Login or Register to post comments" but I havent even started researching those yet.
Any help at all is greatly appreciated.
Thanks
Comments
You can continue to change
You can continue to change each of these as you find them throughout core by using module hooks or theme functions or you can create your own "language" and use the localization client (http://drupal.org/project/l10n_client) to navigate through your site and replace ANY translated string with your version as you see fit. Where you don't specify your translations the original values will continued to be used like usual. Hope this helps. -mf
Okay thanks, I'll check that
Okay thanks, I'll check that out for a quick fix. I would still like to know how to accomplish this with overrides and the like, so if anyone could give me some help or point me in the right direction it would be much appreciated.