I am trying to create a Your Story functionality where the users can submit their stories in form of a comment. I've made a standard page with comments functionality, however instead of 'add new comment' label, I would like to have 'submit your story'. How can I alter this label only on that particular site and keep it as it is on other pages?
A:
The easy way is to use the String Overrides module.
Based on your comment, a variation on the code below should work in your template.php file (based on some code posted on drupal.org):
function phptemplate_preprocess_node(&$vars) {
if ($vars['links'] && $vars['node']->type == 'page') {
$vars['links'] = str_replace('Add new comment', t('Submit your story'), $vars['links']);
}
}
Matt V.
2010-08-27 17:59:22
This module works globally, so iw would replace all add new comment labels even where it should stay as it is.
Vafello
2010-08-28 12:28:37