==================== ISBN-13 improvements ==================== :authors: Vidar Langseid :Version: 0.1 This spesifications address certain limitations in the ISBN-13 implemenation in eZ publish. Some improvents could also be applied to the ISBN-10 implemenation but such improvements are not evaluated and addressedin this specification since ISBN-10 now is obseleted by the book industry. Changes to the ISBN datatype on the class level =============================================== When adding new ISBN datatypes to a class, "ISBN-13 format" should be enabled by default Change to the ISBN datatype on the object level =============================================== Autoconverting from ISBN-10 to ISBN-13 -------------------------------------- If user enters a ISBN number in ISBN-10 format AND "ISBN-13 format" is enabled for the attribute, the system should automaticly convert it to ISBN-13 Entring ISBN-13 values with or without hyphens '-' -------------------------------------------------- Current implementation accepts hyphens everywhere. This should be changed. When entering ISBN-13 numbers, user may choose if he wants to include the hypens or not. If hypens are given by the user, the system must ensure(validate) that they are placed at the correct places. For ISBN-13 numbers, hypens should be places as follows: 978-82-573-0904-6 Request for comment: It might also be possbile that the simplified format should be supported: 978-8257309046 ISBN-13 numbers stored in database ---------------------------------- In current implementation, ISBN-13 numbers are stored in database in the same way as user entered them (with or without hypens). This must be changed The number should be stored in the database with the hypens at the correct place. For instance: 978-82-573-0904-6 Storing the ISBN-13 number without hypens or with hypens at different possitions should NOT happend. Request for comment: If there are arguemts for storing the number without hyphens, this should be evaluated. Viewing ISBN-13 numbers with or without hypens ---------------------------------------------- As stated previously in this spec, ISBN-13 numbers should be stored with hypens in the database. However it must be possible and convenient to view the ISBN-13 number both with and without hypens from a template. This template code should display the ISBN-13 number with hypens: {$attribute.data_text} This template code should display the ISBN-13 number without hypens: {$attribute.content.value_no_hypens} Request for comment: Any name better than attribute.content.value_no_hypens are welcome Request for comment: Maybe ISBN-13 numbers without hypens should be constructed using a template operator instead? like for instance: {$attribute.data_text|str_replace( "-", "")} Script to convert ISBN-10 data to ISBN-13 ========================================= A script should be made to convert ISBN-10 to ISBN-13 convert2isbn13.php [--class-id=CLASSID] [--attribute-id=ATTRIBUTEID] [--all-classes] CLASSID and ATTRIBUTEID may be either be numeric number or attribute identifier (string) If only --class-id paramter is given, all ISBN attributes in that class will be converted. If --attribute-id is given, that attribute will be converted to ISBN-13 If both --class-id and --attribute-id is given, the script should check that attribute-id is truely a attribute in the class spesified by class-id. If only --attribute-id is given and this is given as identfier(string) and not number, the script should ensure that multiple attributes with the same identifier does not exists in the system. If --all-classes is given, all ISBN attributes in database will be converted After converting an attribute, script must ensure that "ISBN-13 format" is enabled for the attribute at the class level. If the script is run on a attribute which is already converted to ISBN-13, it should ensure that hypens are stored at the correct place. Earlier versions of eZ publish don't ensure this so running this script would be mandatory when users using ISBN-13 are upgrading their eZ publish installation.