Automatic byline is handled by the following scripts:
•InsertAutoByline: this gets called from a menu or from a toolbar icon. It reads the configuration from EdConfig.bylinesstyles, generates a menu, and prepares an array to submit to the auxiliary script that places the byline.
•sysInsertByline: this gets called from the InsertAutoByline script and performs the placement, replacement or removing of the byline.
Note: from version 1.6. 1931.x, the insertion of the byline is smarter, and it will insert the name of the user to whom is assigned article (authorRef), and if the article is not assigned, then who created the article. In previous versions it inserted the current user data.
Two bylines available in the default configuration are hard-coded in Ted.vb, EdConfig class, in the Public Shared ReadOnly Property bylinesstyles. They require three GNML styles: by01, by02 and by01a. You can replace those with your customized bylines, adding a line in the EditorialConfig, such as: <Item Name="bylinesstyles" Value="Simple,by01a,#,F##,#,Two-lines,by01,by02,FM#,#" /> All byline styles (if more than one) are in one line, with five comma delimited entries for each. The order of bylines entries is mandatory. The total number of delimited entries must be divisible by 5. The mandatory item name is bylinesstyles, and the structure of the Value statement is the following. For each byline, there are: 1.Menu label (e.g. Simple), as it will appear in the menu selector for bylines. 2.Byline tag name for the first paragraph of the byline (e.g. by01). Note: the style can contain an arbitrary formatting and embedded text. The variable styles are not supported now. 3.Byline tag name for the second paragraph of the byline (e.g. by02, or # - if the byline has no second paragraph). Note: the style can contain an arbitrary formatting and embedded text. The variable styles are not supported now. 4.Modifiers (e.g. F##), or what to insert in byline. The meaning of codes is: •F=full user name; •M=e-mail address; •D=user description, e.g. "Staff writer". All data is read from the user properties, and it's your responsibility to ensure that all users have all required fields compiled. F is used only in the first line of the byline, and M or D only in the second line (if the second paragraph is specified). 5.Byline prefix, e.g. By or # if no prefix is required. You may prefer to handle prefix in the style, as then it's easy to have different formatting for the prefix and for the byline name. Examples Simple,by01a,#,F##,# The above statement means the menu name of the byline is Simple, the style required is by01a, there's no second line in that byline, only the full name is to be used, and no prefix is specified. Two-lines,by01,by02,FM#,# The above statement means the menu name of the byline is Two-lines, the style required for the first line by01, and for the second line is by02, the full name is to be used in the first line and email address in the second line, and no prefix is specified. |
See Add the byline. |