sunlix Posted September 1, 2014 Share Posted September 1, 2014 (edited) Hi Guys, today I want to introduce my first module for ProcessWire: ProcessAbbreviate The module basically hooks the save event of pages and extract all marked up abbreviations in textareas. With the shipped CKEditor plugin comes the main improvement in supporting faster marking up abbreviations. The plugin suggest explanations based on previously extracted abbreviations. On the created setup page, all abbreviations can be managed. Also you can predefine your common used abbreviations to prime the suggestion list. The module can be found at GitHub: https://github.com/sunlix/ProcessAbbreviate Feel free to try it out. Any hints and improvements are welcome. regards, Sven Edited September 2, 2014 by sunlix 9 Link to comment Share on other sites More sharing options...
horst Posted September 2, 2014 Share Posted September 2, 2014 Hey sunlix, welcome to the forums. Really cool first post! Reading a bit through the code on Github makes me "want to try it out" (unfortunately I haven't enough time now, but will come back to this soon) Link to comment Share on other sites More sharing options...
dotnetic Posted September 7, 2014 Share Posted September 7, 2014 Installed it and got an error on windows WAMP: Compile Error: require_once(): Failed opening required '' (include_path='.;C:\php\pear') (line 968 of E:\wamp\www\pwdev\wire\core\Modules.php) i have no pear installed. After installing PEAR it works. Link to comment Share on other sites More sharing options...
sunlix Posted October 1, 2014 Author Share Posted October 1, 2014 Hi, sorry for the delay - I was off for some vacation. Which ProcessWire and PHP version did you used on your WAMP? Didn't know about some pear specials I am using, yet^^ regards Link to comment Share on other sites More sharing options...
sunlix Posted October 22, 2014 Author Share Posted October 22, 2014 Hi Guys, at this night I've pushed some changes to my master branch of ProcessAbbreviate. The following features are included in version 0.2.1 Support for the language attribute of <abbr/> Configurable auto mark up feature Bug fixes Support for the language attribute of <abbr/> I've altered the database table to save the language attribute for some kind of multi language support. This attribute is usable for screen readers to change pronunciation for the given abbreviation. Additional its usable in multi language systems for better/saver language handling. Configurable auto mark up feature Well, I would call it experimental. (It have to activate manually) I've just done some basic tests in auto marking up abbreviations. I would be happy to get some feedback if it could be more precise or so. If you have two or more abbreviations with the same abbreviation (text), the first abbreviation saved in the database will be auto marked up. So this feature will ever be a little support for marking up abbreviations, but you have to check these abbreviations on your own to be secure that the right abbreviation is marked up. Bug fixes There was a bug by uninstalling the module Abbreviate which did not delete the admin page created by installing this module. (thanks teppo) So I hope you enjoy this additions and give ProcessAbbreviate a try. Any feedback are welcome! regards, Sven 1 Link to comment Share on other sites More sharing options...
sunlix Posted March 6, 2015 Author Share Posted March 6, 2015 Ho folks, I've a new release 0.3.1 for my module ProcessAbbreviate. The following changes are included in version 0.3.1 Proper Attribute extraction on each found <abbr> Better CKEditor plugin Proper Attribute extraction on each found <abbr> The latest version has a better attribute extraction for found <abbr> tags. Now there should be no unexpected titles or language extractions any more. I've ran into a special one with the latest ProcessWire dev branch where titles were not extracted correctly cause the presence of a xml:lang attribute. Better CKEditor plugin The included CKEditor plugin got a cleaned up code and fixed by selecting your abbreviation with defined language attributes. Now the behavior should be as it should Let me know if anyone has some trouble with this release. Your feedback are welcome. regards, Sven Link to comment Share on other sites More sharing options...
sunlix Posted August 4, 2015 Author Share Posted August 4, 2015 Hi, I've published Version 0.4.1 of Abbreviate. The following changes are included. fixed #1 possible value overwriting with empty strings Better auto mark up fixed #1 possible value overwriting with empty strings It is no longer allowed to set a empty String on the language attribute if there is a value set. This fixes bug #1 in the issue tracker. For the same behavior I've edited the code line also for the abbreviation text. Better auto mark up I've removed the right word boundary check, because german abbreviation style like z.B. or usw. couldn't found automatically cause the dot character is a non word character. Is there any developer with regex knowledge you can support me in creating a better regex for the auto mark up feature? Currently it feels a little bit rudimentary and not finished yet. I use this feature by myself and it works in most cases, but I think there are certain edge cases. The new version is pushed to GitHub and will be available soon via the system updater. regards, Sven 1 Link to comment Share on other sites More sharing options...
Juergen Posted May 14, 2017 Share Posted May 14, 2017 Hello @sunlix I get the following error after activation of the automatic markup of abbreviations. My site is multilingual and I use the lates PW dev version. Maybe a namespace/file compiler problem? Best regards Link to comment Share on other sites More sharing options...
sunlix Posted May 22, 2017 Author Share Posted May 22, 2017 Hi @Juergen I've tagged version 1.0.1 to solve your error. This could be happen if composer was not used to manage modules. Link to comment Share on other sites More sharing options...
Juergen Posted May 22, 2017 Share Posted May 22, 2017 Hello @sunlix I have installed version 1.0.1 but this is where the error occurs. Link to comment Share on other sites More sharing options...
sunlix Posted May 22, 2017 Author Share Posted May 22, 2017 hmmm can you look at the top of your referenced file if this line appears? if(!class_exists('Abbreviation', false)) require_once(__DIR__ .'/Abbreviation.php'); 1 Link to comment Share on other sites More sharing options...
Juergen Posted May 22, 2017 Share Posted May 22, 2017 No, this piece of code doesnt exist in the module file. I have added it at the top after the namespace and now it works. Thanks!!!! If a problem occurs once more I will post it here. Best regards Link to comment Share on other sites More sharing options...
sunlix Posted May 22, 2017 Author Share Posted May 22, 2017 Okay, nice. I've bumped the version to 1.0.2. So you can get an "official" Release via GitHub/composer https://github.com/sunlix/ProcessAbbreviate https://packagist.org/packages/zenmotion/process-abbreviate 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now