Please Log in or Create an account to join the conversation.
I assume you're including your PHP file in a Code action with Method of PHP? If so you access the auto action with $autoaction. So to get the id you'd use $autoaction->id or the getter function $autoaction->getId(). $action gives you the action itself, which is a different object and is the processing of an auto action.1) how could I get the autoaction id ?
I tried $action->id but it does not seem to work
Joomla system messages do not output during ajax exists. Generally you'd just echo whatever text/HTML you want displayed, but will depend on what trigger you're trying to use.2) when using my autoaction, how can I output a system info message upon completion when editing a field by ajax ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
There's no real support for that. Best I can suggest is just trying echoing out a message. The ajax edit display is meant to just mimic normal profile edit and profile view so the message would ideally need to extend either of those instead of on onAfterUserUpdate.I am using a website field with onAfterUserUpdate
The idea is to trigger the php code when the field has been changed or updated by ajax, then display a success message once the code is finished with a return.
You shouldn't have any issues accessing the auto action id from PHP with either of the following.I need the autoaction id to use and already existing code and adapt it depending on the trigger and the variables used.
It's outside the scope of CB Gallery. I actually completely regret even implementing support for linked external media, but it's too late to undo that. Sharing websites is really something CB Activity should be used for as it has everything it needs to properly parse a URLs metadata and display it.Pity though, because it's really websites assets as media that needs to be displayed in the same area as CB Gallery items. For instance it can be up to 10 websites that need to be displayed in an album with files and videos on the same subject. That's kind of the same thing as displaying outside videos or outside files linked
Please Log in or Create an account to join the conversation.
What trigger would you suggest to act both on the field change and the ajax display ? onAfterUserProfileSaved ?The ajax edit display is meant to just mimic normal profile edit and profile view so the message would ideally need to extend either of those instead of on onAfterUserUpdate.
Yes but how could I set a private activity display set for specific users and visible only to them and their connections, so that these users would be able to manage a list of their preferred websites/links just as if it was media assets ? CB Gallery mechanism seemed really good for this kind of use and display.Sharing websites is really something CB Activity should be used for as it has everything it needs to properly parse a URLs metadata and display it.
Please Log in or Create an account to join the conversation.
I would probably completely separate the two logics. Handle whatever saving behavior you need on onAfterUserUpdate then display logic on onAftergetFieldRow. When acting on onAftergetFieldRow check if [get_function] is "ajax_save" and that will let you know it's an ajax edit.What trigger would you suggest to act both on the field change and the ajax display ? onAfterUserProfileSaved ?
That's easily doable. Create a Activity field in CB > Field Management then use CB Privacy or CB Conditional to restrict access to the field (e.g. only connections and profile owner can see it). If you want to customize what features that stream has edit the Profile Field stream in CB Activity > Streams > Activity or create a new stream with a field specific asset of profile.[user_id].field.[field_id] then customize all of its settings and select that stream in your activity field. Under Create be sure to set Create Access to Owner Only as well so only the profile owner can make posts.Yes but how could I set a private activity display set for specific users and visible only to them and their connections, so that these users would be able to manage a list of their preferred websites/links just as if it was media assets ? CB Gallery mechanism seemed really good for this kind of use and display.
I would just use CB Field Groups with a web address field then. You'd just act on normal profile update triggers and can itinerate through the JSON structure of the field group field and do whatever you like with that data.The idea was that these users would be able to manage, edit, add or remove a list of websites easily, and then I could set my code autoaction on each item of this list.
Please Log in or Create an account to join the conversation.