I wanted to be able to change the text of the About author caption. Created a new variable called nodeauthor_caption and added it to settings. This was diff'd against 4.7 branch 1.1.2.3 (since 1.1.2.4 in 4.7 branch is 5.0 code). Plus, very minor indentation fix on settings hook.

Pasting it here and as attachment.

--- -	2006-12-07 17:14:06.000000000 -0800
+++ /dev/fd/63	2006-12-07 17:14:06.000000000 -0800
@@ -63,12 +63,18 @@
 		$options[$type] = $type_name; 
 	}
 
-	
 	$form['nodesettings'] = array(
-         '#type' => 'fieldset',
-         '#title' => t('Node type settings'),
-         '#collapsible' => TRUE,
-         '#collapsed' => FALSE);
+    '#type' => 'fieldset',
+    '#title' => t('Node type settings'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE);
+  $form['nodesettings']['nodeauthor_caption'] = array(
+	  '#type' => 'textfield',
+	  '#title' => t('Caption for author box'),
+	  '#default_value' => variable_get ('nodeauthor_caption', t('About author')),
+	  '#size' => 40,
+	  '#description' => t('Enter the caption you want above the about author box.'),
+  );
 	$form['nodesettings']['nodes_add_info'] = array(
 	  '#type' => 'checkboxes',
 	  '#title' => t('Content types'),
@@ -119,7 +125,7 @@
  * @ingroup themeable
  */
 function theme_authorinfo($info) {
-	return "<div class=\"nodeauthor-info\"><span>".t("About author")."</span>\n$info</div>\n";
+	return "<div class=\"nodeauthor-info\"><span>".variable_get('nodeauthor_caption', t('About author'))."</span>\n$info</div>\n";
 }
 
 
CommentFileSizeAuthor
nodeauthor_about.diff.gz544 bytesmattman

Comments

meba’s picture

Turning on localization and translating the string is enough, but it may be overhead for english users. I will consider...

meba’s picture

Status: Needs review » Closed (won't fix)

This is really an overhead. Just use locale system.