-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Filter: Add to storage #9
Comments
Would be kind of nice – but I have no idea how to create an event filter. Personally I think, that Symphony's event system is quite complicated and only half-backed. How should the event data be added to the storage? Under an |
Maybe you are thinking too complicated. You don't need the actual event data, do you? Why not create en event filter to simply add POST data (if available) to the storage? |
And why a filter? Coundn't that be an event? (Don't we already have this? I admit that I haven't tested it…) |
The good thing about using an event filter is that you'd know the data context (your event). But I see use cases for both, an event filter and a general POST to storage event. |
Yeah, it would definitely need to be a filter, it would have to be added to another event as that is what we're after; Posting data from an event into the session. I've done event filters before (stopforumspam) so could tackle this at some point soon.
Yes, like:
etc |
The more we can provide for this extension, the more it will be loved IMO. You two have already got the core of it working really well. |
Well, the most important thing is to keep this extension focussed. But I'm with you that a simple event filter would be a useful addition. |
Adding event data to the storage would be rather simple. Are there any information online how to create an event filter? |
Not that I am aware of. But you might use the ETM's event filter logic as a blueprint. It resides in the extension driver. |
I just created a <group id="events">
<item id="contact">
<item id="name">John Doe</item>
<item id="mail">[email protected]</item>
</item>
</group> The first |
Sorry, I am in a hurry. I can think about it tomorrow. |
Aww, I really wanted to do that one! lol You got it all done before I even got home! When I discussed this on the Symphony tracker, I was aiming more at having the xml intact in the session and just reloaded into the page but with an attribute of |
I just pushed a few updates to the branch fixing bugs and adding a drop filter: |
I am still testing this, but I have one or two questions.
|
|
The thing is that the parameter is rather useless to filter other datasources. And I don't see any reason to create this global namespace. It's up to the developer to know what will happen. So I would prefer:
|
How would you drop these individual namespaces? |
I see, you are simply dropping the complete Hmmm, OK, but still you can't use the param for filtering. I will have to think a bit more. Why have you added a drop-type event filter at all? Any use case? |
If we put the drop filter aside for a minute, wouldn't the following be better?
|
Scratch the filtering argument, you can't filter on that parameter output at all. Sorry, I should try and wake up. |
I dislike systems that let me do but not undo something. This is why I wanted to have a filter to remove the content as well.
I understand that the parameter output offers more data but I'm not sure if this is a necessity. As mentioned above, this would introduce the conceptual flaw that two different parts of the extension would interfere with each other: the action might pollute the filter results or vice versa. |
Regarding dropping via the filter: it would of course be possible to also drop specific namespaces. The extension could loop over all existing events and check for those having the |
Then you shouldn't use events at all. There is no undo in event logic. :-) Regarding the parameter output, you are right (see above).
That might be cool, but would increase complexity, espcially to handle errors. One example: What happens if an So, as long as there is no necessity to implement this, I think that your current solution is the best. So I say leave it as it is. |
How should we name the filters? Suggestion:
|
If an add filter has been removed, I'd no longer display the drop filter in the backend but won't remove it from the event files until they are resaved. This is a known behaviour across the system in my experience. Regarding the actual dropping action of the filter: if nothing has been added to the storage by an add filter, nothing will be dropped – the extension would still execute a drop action that will not alter the storage at all. No harm. |
I like you suggestions. |
I still think that your proposal might be more complex than it looks now. [EDIT]: Removed nonsense. |
Just for the record: This is more like |
We'd need the following:
And so on … |
The code could be copied from ETM by the way. |
Yes, I already changed my above comment. :-)
So do you want to implement it? |
Honestly, at the moment I don't have a single use case for the event filters... Do you have one? |
Yes: passing event data to a success page the user has been redirected to, so you can display a summary. |
I'll be offline for an hour or two now – will have a look at this again later. |
The example is not bad. :-) In this case, how would you delete the data from the storage?
No prob. |
By attaching the drop filter to the success page. |
So on the first success page you display the data, then there is a second success page which drops the data from the storage? |
Yeah, kind of: I was actually thinking of something like a When I was walking downtown, I have been thinking about your idea of not using an Ich denke heute Abend noch mal darüber nach. Wir sind alle etwas angeschlagen: Max ist seit Anfang des Monats in der Kita und wir müssen uns alle noch an die dort vorherrschenden Bazillen und Viren gewöhnen. Logisches Denken fällt auf jeden Fall etwas schwer heute :/ |
Nevermind, there is no hurry at all. |
Hello. I have one question. I want to store submited value to storage for use as ds-parameter... Ex. User posted coupon code... he submitted value from input (input val attribute). This val must be stored in ds-storage for fiter another one datasourse (coupons).
------- current output
------- but i need (for filter other datasource)
How can I make it? |
As explained in the README:
So outputting values is not a feature of the Storage extension. If you need that, I am afraid that you will have to create a custom data source, getting your hands dirty with PHP. BTW, please open a separate issue next time. Your problem is not related to this thread! |
How awesome would that be?
The text was updated successfully, but these errors were encountered: