1+ # Cantemo iframe plugin
12
2- # TODO:
3- - ✅ Create buttons with javascript
4- - ✅ Get user role from cantemo
5- - ✅ Get item id from cantemo
6- - ✅ Create a startManualRule function which takes a process_id
7- - ✅ Create buttons based on config file.
8- - ✅ Clean up names (no myplugin)
9- -[ ]
10- <br />
3+ This Cantemo plugin embeds an external tool as an ` <iframe> ` in the media item
4+ view. It hooks into ` MediaViewItemTechMetadataTop ` and renders the iframe with
5+ the current item's ID appended as a query parameter, e.g.:
116
12- ## METADATA
13- - ✅ generate different buttons depending on item type (maby through metadat, different itemtypes have different metadata)
7+ ```
8+ https://tools.bcc.media/cantemo/?id=VX-2
9+ ```
1410
15- < br />
11+ ## Changing the target URL
1612
17- ## BUGS
18- - when portal window is in mobile view you can´t click the buttons
13+ Edit the ` src ` of the iframe in
14+ [ ` templates/manual_rule_button_plugin.html ` ] ( templates/manual_rule_button_plugin.html ) .
15+ ` {{ item_id }} ` is the Cantemo item id (e.g. ` VX-2 ` ) supplied by the plugin
16+ context.
1917
20- <br />
18+ ## Install
19+
20+ Run ` install.sh ` as root on the Cantemo host. It copies the plugin into
21+ ` /opt/cantemo/portal/portal/plugins/ ` , runs ` syncdata ` , and restarts portal.
2122
2223## The args object
2324
24- The args object on ` IPluginBlock.return_str ` .
25+ The ` args ` object on ` IPluginBlock.return_string ` (hook
26+ ` MediaViewItemTechMetadataTop ` ):
2527
2628``` json
27- [ // This is a tuple
29+ [
2830 [
2931 " pluginblock" ,
3032 " MediaViewItemTechMetadataTop"
3133 ],
32- { // This is a dict
34+ {
3335 "item" : " <<non-serializable: VSItem>>" ,
3436 "user" : " <<non-serializable: SimpleLazyObject>>" ,
3537 "request" : " <<non-serializable: Request>>" ,
@@ -44,5 +46,3 @@ The args object on `IPluginBlock.return_str`.
4446 }
4547]
4648```
47-
48- User groups: {{user_groups}}
0 commit comments