Closed (won't fix)
Project:
Nodeauthor information
Version:
4.7.x-1.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2006 at 01:26 UTC
Updated:
27 Apr 2008 at 07:43 UTC
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";
}
| Comment | File | Size | Author |
|---|---|---|---|
| nodeauthor_about.diff.gz | 544 bytes | mattman |
Comments
Comment #1
meba commentedTurning on localization and translating the string is enough, but it may be overhead for english users. I will consider...
Comment #2
meba commentedThis is really an overhead. Just use locale system.