views:

24

answers:

1

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.
This module works globally, so iw would replace all add new comment labels even where it should stay as it is.
Vafello

related questions