Requirements needed for field pre processor plugin

18 years 2 months ago #3632 by mikko
After thinking about this for a while, I came up with the following design idea.

The preprosessor plugin will be configured with a set of rules that will be administrated in the backend.

This goes a bit technical now. The plugin will have only one parameter that contains list of the rules. Each rule will be defined as

rulename(fields,whenToApply,parameter1,...,parameterN)

The rule name will tell the the preprosessor what to do, the fields is a comma separated list that describes the fields that should be prosessed.

When to apply describes whether the rule is applied in the frontend or backend or both and wether it applies to new registrations or only user updates. This will be implemented as binary 1=frontend, 2=backend, 4= userregistration, 8=update.

Parameters are special parameters that will be used with the preprosessor rule.

A rule could be an action e.g.

email(username;firstname;lastname,5,admin@joomlapolis.com,some text to email)

to notify the administrator of all new registrations (a bit dumb since it already exists)

Or a modification, e.g.

rsa(creditcardnumber,15,RSA-KEY)

which in this case encrypts the creditcardnumber field. After the modification the original value is replaced with the modified value for all subsequent rules.

I am also planning to implement a simple IF statement to control the flow of the actions.

A primitive plugin framework is possible. It could be implemented by having each action, modification or expression (something that the IF evaluates) in a separate file.

Now, the question is, what kinds of actions and modifications are desired for the first beta?

mikko

Please Log in to join the conversation.

18 years 2 months ago #3633 by mikko
geeffland: This is exactly what a redirect, or action type rule could do.

Please Log in to join the conversation.

18 years 2 months ago #3660 by mikko
Ok, the development of the plugin is now underway, approximately 20% done.

mikko

Please Log in to join the conversation.

18 years 2 months ago #3689 by pointri
Hi Mikko,

Sounds awesome!

This request might be a stretch, but a preprocessor that parses out words (namely, %&$%* explatives :)) for particular text fields out of an array (like the Badwords component) would be very helpful.

Here's another that's on my personal wish list, and it might take down a server or two to run on a larger site, but it'd open the door to some neat 'Web 2.0' features if a module were paired with this one. On updating a certain field, a new table with a counter tracks instances of words included within (including new ones), and accumulates them for output in modules.

Practical application: For a social web site, you have a field titled "Bands I hate the most." User 1 enters "ABBA." User 2 enters "ABBA, and anything Swedish." User 3 enters "Bee Gees, Beach Boys, The Swedish Chef, and ABBA" and so on. The cream (or the crap in this case) would float to the top, and I'd imagine anything like this would skip one or two-letter occurrences. From there, the module options are endless: bar charts, pie charts, tag matrices that look like Flickr, Delicious and others:

www.flickr.com/photos/tags/

I don't know if that's within the scope (I get out of hand sometimes), but the base from which these things can happen I'd imagine would start with a preprocessor triggered on defined events.

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

18 years 3 weeks ago #7805 by demis57
Hello!

I am really worried about CB, because my new users are registrating using some not-alowed (supposly) characters (like % $ . ´ % / ... etc).

Can this new plugin VALIDATE FIELS CUSTOMLY??

Or is there currently a pulgin that can do that?

Thanks a LOT!

Demis

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.179 seconds

Facebook Twitter LinkedIn