Attached is a patch that would add several new components:
1) Sequences
2) Storage
Sequences work like this: they replace some given text with a number given by a function. The sequence component itself keeps track of the numbereth time in the sequence: starting at 0, going up by one each time. It then passes that number into a function selected by the user, which had been previously registered through an implementation of hook_flexifilter_sequences. Included in this are basic numbers, lower case letters, and upper case letters.
There are two storage components, a set and a get. The set component sets one variable slot to the current text as run through a set of components set in the settings. The get component gets the variable set previously in one of the variable slots, runs it through a set of components set in the settings, and returns it.
Comment | File | Size | Author |
---|---|---|---|
flexifilter_components_sequences_and_storage_01.patch | 5.18 KB | cwgordon7 |
Comments
Comment #1
corsix CreditAttribution: corsix commentedI don't think you totally understand static variables:
Static variables are just like local variables, only they are persistent across calls to the function. Giving static variables within two different functions the same name does not cause them to be the same variable. Hence, doing a storage get will always be blank, as the storage set was stored in a different variable.
Comment #2
cwgordon7 CreditAttribution: cwgordon7 commentedSequences committed; storage needs work.
Comment #3
apadernoIt's enough to change the code to:
Comment #4
kenorb CreditAttribution: kenorb commentedComment #5
kenorb CreditAttribution: kenorb commentedDrupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.