### Other ###
$enableAdminColors = true; #Enables special colors on admin pages and bookmarks marking the difference with normal user.
+$descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
+ # a simple value "xxx" (like "author") automatically associates xxx with [xxx][/xxx].
+ # a complex value "xxx"=>"yyy" (like "address") direclty associates xxx with yyy.
?>
}
}
}
+
+function addAnchor(anchorForm, where) {
+ var whereZone = document.getElementById(where);
+ whereZone.value = whereZone.value + anchorForm;
+ document.getElementById(where).focus();
+}
</tr>
<tr>
<th align="left"><?php echo T_('Description'); ?></th>
- <td><textarea name="description" rows="5" cols="63" ><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
- <td>← <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?></td>
+ <td><textarea name="description" id="description" rows="5" cols="63" ><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
+ <td>← <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?>
+ <?php if(count($GLOBALS['descriptionAnchors'])>0): ?>
+ <br /><br />
+ <?php echo T_('Suggested anchors: '); ?>
+ <?php foreach($GLOBALS['descriptionAnchors'] as $anchorName => $anchorValue): ?>
+ <?php if(is_numeric($anchorName)) {
+ $anchorName = $anchorValue;
+ $anchorValue = '['.$anchorValue.']'.'[/'.$anchorValue.']';
+ } ?>
+ <span class="anchor" title="<?php echo $anchorValue ?>" onclick="addAnchor('<?php echo $anchorValue ?>', 'description')"><?php echo $anchorName ?></span>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </td>
</tr>
<tr>
<th align="left"><?php echo T_('Tags'); ?></th>