Jump to content

Module: ProcessAbbreviate


sunlix
 Share

Recommended Posts

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 by sunlix
  • Like 9
Link to comment
Share on other sites

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

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

  • 4 weeks later...
  • 3 weeks later...

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

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

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 :D

Let me know if anyone has some trouble with this release. :)

Your feedback are welcome. :)

regards,

Sven

Link to comment
Share on other sites

  • 4 months later...

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

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...