I have 3 plugin Videos, TheWire Links Preview Advanced and TheWire Tools.
All the plugin has a common file: mod/< plugin_name >\views\default\river\object\< plugin_name >\create.php
All the 3 files has different feature. Create file for videos creates the view to display the videos on the river activity page, whereas TheWire Links Preview Advanced pulls the title and description of any link and created the view of link and TheWire Tools has a feature of reshare which is viewed as "Source: link of the shared item" in the river activity page.
Now as I stack all the plugin, the create file of the last plugin from the list is being used to generate the preview. However the above plugins are ignored.
Is there any way in which I can used all the create file for the preview of the respective plugin.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 0 likes
Is there any way to identify the type of the river item? If that is possible then I can create another file in my custom plugin (last on the list) as follows:
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- Steve Clay@steve_clay
Steve Clay - 0 likes
You must log in to post replies.Views of the same name override, so I can see how river/object/thewire/create would conflict (the later plugin wins), but I don't know why videos would conflict.
You'll usually want a site-specific plugin (at the bottom of the list) just so you can define exactly the views you want when two plugins conflict but must be in a particular order.
Yes, you were right about videos plugin. I was just doing some testing and came to know that videos plugin is not causing any conflict.
The issue is with TheWire Links Preview Advanced and TheWire Tools (the later plugin wins).
Anyways thanks for the help.. I solved it.
Create a file with same name in my custom plugin and merged the content of both the file based on $attachment parameter. If the $attachment parameter is null then $excerpt for thewire_preview else $excerpt for thewire_tool.
You should consider sending a PR to one or both of those plugins. They might want the features, or they might want to figure out how to make their plugins collaborate more easily.