Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Requirements needed for field pre processor plugin

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
18 years 11 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 or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
18 years 11 months ago #3633 by mikko
geeffland: This is exactly what a redirect, or action type rule could do.

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
18 years 11 months ago #3660 by mikko
Ok, the development of the plugin is now underway, approximately 20% done.

mikko

Please Log in or Create an account to join the conversation.

  • pointri
  • pointri
  • OFFLINE
  • Posts: 118
  • Thanks: 0
  • Karma: 27
18 years 11 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 or Create an account to join the conversation.

  • demis57
  • demis57
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
18 years 9 months 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum