Discussions

Ask a Question
ANSWERED

Is it possible to get the pluginId from the COYO frontend?

Hi, it would be very convenient, if the plugin adapters init method would also deliver the pluginId. Currently it seems that among some other data, one can only retrieve the tenantId and the pluginInstanceId. Is there anything that would speak up against adding the pluginId to the init response? Would be great. Our current workaround is an extra endpoint in our plugin host backend database to get the pluginId, which is needed for further requests. But we are not too sure if the mapping (tenantId, pluginInstanceId) -> (pluginId) is unique, which forces us to pick the first match in our database. Kind regards, Alex
ANSWERED

Can we defina an Icon which is shown on the "add widget" dialog?

Hi :) I would like to know, if we can somehow define the Icon which is shown on the "add widget" dialog for the Plugin. At the moment it seems the icon is always the puzzle-piece which I would like to replace. Greetings Chris
ANSWERED

Is there a way to get the Role of the current User

Hi :) We build a plugin which has a elaborate configuration. To get to the configuration page, we added a button to our app. The Problem is, that every user can see this button for now, but the plan is to display this button only to moderators and admins. I looked at the manifest file if we could get the role from the context, but all i could find were "username", "usermail" and "userlanguage". So how could we determine if a user is a "normal" user or an mod/admin. Thx in advance Chris
ANSWERED

Is it possible to pass parameters when installing a plugin?

Hello everyone! In the current version it is only possible to pass config parameters to plugin instances. But in our use case it would be great to have the possibility to pass parameters when installing a plugin in COYO (in the administration area) and then for example pass it together with the rest to the lifecycle endoint "install". Is it intended to have such a feature in the future? Or are there maybe other possibilities which we did not see? The workaround we are currently aiming for is the following: Provide an initial plugin view where the user (has to be an admin or someone who has access to the values which have to be passed) has to fill out a form at least on the first time a plugin instance gets created. Then when another plugin instance is created the user has the choice to change or not to change the parameters. Best regards Alexander
ANSWERED

How to correlate the "src" parameter to a plugin "instanceId"?

Hi! After some initial implementation we found out that the "instanceId" which is delivered on the lifecycle event "instance_add" seems to be different from the "src" parameter which is later on send by the plugin instance. It is a bit confusing because in this questions https://dev.coyoapp.com/discuss/6000b682c87152001e71e0de it is said that these should be the same. But we definitely get different ids which is leading to extra implementation work, because the requests have to be mapped to the plugin object created/persisted beforehand in the lifecyle event "instance_add". Right now we do an extra window.postMessage with sub "init" to get the "instanceId" from the "scr" parameter. Would it not be simpler if src == instanceId? COYO: 33.0.2-RELEASE manifest: 2.0.0 Best regards Alexander
ANSWERED

How can plugin hosts validate COYO instances?

Hi! As a plugin host i want to be able to deliver my plugins only to certain COYO instances (instances who pay for the plugin).So how is it possible to validate COYO instances who try to install a plugin which is provided by my own plugin host? I thought that the only way was to check the certificate which is delivered once on the lifecycle event "install". But how could this certificate be validated if i do not have it beforehand? What is the idea behind this certificate or are there any other possibilities? Best regards Alex
ANSWERED

Can one open a popup/dialog from a plugin?

Hi, we would like to open a Popup in Coyo and render some HTML into it. Is there any way to do that? For the reasons: Let's say you have a plugin that requires a whole lot of configuration. With the Plugin adapter you can react to the onEdit action, which set's the plugin in an edit state and shows the configuration options. But now imagine you Plugin to be in the sidebar, right below the navigation, where there are like 270pixels of space available to show the configuration form. That is not a whole lot. So it would be real nice to show the configuration in a Popup not inside the I-Frame but inside coyo. I know that you have to find another way, to trigger the configuration popup, as there could be a lot of popus "onEdit" if there are a lot of plugins on the page. Another way would be to allow custom configurations during the "create" process of the plugin, when you add it to the page. tl;dr: we want to show the configuration of our plugin in an popup which is not in the I-Frame but in coyo, is there any way to do that? With kind regards Chris Langenberg
ANSWERED

Is there a way to get a development Instance of Coyo

Hi, i'm Chris from Scitotec. We wan't to start implementing our Plugin for Coyo. Unfortunately we don't have access to an development Instance of Coyo to test the Plugin. Is there a docker stack we could use for us or how can we get a hold of a development instance? Best Regards Chris Langenberg
ANSWERED

Display user avatars

Image a plugin where users interact with each other. Current viewing user see's the other user's interaction. I like to display their avatars next to their names. Can you give some hints if and how that's possible? I tried the following: Fetch `/api/users` REST API and get their `imageUrls.avatar`. Replace `/api` with `/web` and place this URL into an IMG-tag inside the plugin. This works for Firefox, but Chrome denies this due to SameSite-Attribute of COYOSESSION cookie.
ANSWERED

Webhook > instanceId === Entrypoint > src ?

I wonder if the webhook's "instanceId" is the same id as the "src" query parameter that get's attached to the plugin's entrypoint url. If that's case it would be great when this gets mentioned in the webhook documentation.