Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
entities [2011/05/04 22:28] tower |
entities [2012/11/21 09:50] (current) tower [Configuring HTML entities] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Configuring HTML entities ===== | ||
+ | {{tag>entities}} | ||
+ | For an explanation of HTML entities, see the [[:configuration#html_entities|configuration]] page. | ||
+ | |||
+ | |||
+ | ==== Adding Entities to the Entities Defintions Array. ==== | ||
+ | |||
+ | |||
+ | You create an Entity definition file with the format illustrated below, and then run the php script ents_seri.php. You do this in the directory fckg/action/entities. | ||
+ | |||
+ | |||
+ | Name your definitions file add.ent | ||
+ | |||
+ | |||
+ | Then at the command line type: | ||
+ | |||
+ | |||
+ | <code> | ||
+ | php ents_seri.php | ||
+ | </code> | ||
+ | |||
+ | |||
+ | Alternatively, you can give your entity definition file any name you want and feed the file name to the script at the command line: | ||
+ | |||
+ | |||
+ | <code> | ||
+ | php ents_seri.php your_entity_file | ||
+ | </code> | ||
+ | |||
+ | |||
+ | This creates a new entities file called ent.ser, which must then be copied to the fckg/action subdirectory. You would be wise to first back up the original ent.ser before over-writing it. | ||
+ | |||
+ | |||
+ | There are two definition files in the action/entities: ents.data and fcked-ents.data. These are required and must not be removed from the directory. To find the specifications for your additional entities consult the following web site: [[http://htmlhelp.com/reference/html40/entities/|http://htmlhelp.com/reference/html40/entities/]] | ||
+ | |||
+ | |||
+ | ==== Format of the entities definition file ==== | ||
+ | |||
+ | |||
+ | The definition file has the following format: | ||
+ | |||
+ | |||
+ | character\\ entity numeric code \\ entity character code | ||
+ | |||
+ | |||
+ | character \\ entity numeric code \\ entity character code | ||
+ | |||
+ | |||
+ | etc. | ||
+ | |||
+ | |||
+ | There is one empty line between each definition. Here is an actual example. | ||
+ | |||
+ | |||
+ | <\\ &''#60''; \\ &''lt''; | ||
+ | |||
+ | |||
+ | ¢\\ &''#162'';\\ &''cent''; \\ | ||
+ | |||
+ | |||
+ | £ \\ &''#163'';\\ &''pound''; | ||