By Tim Hunt on Thursday, 13 April 2017
Replies 5
Likes 0
Views 1K
Votes 0
Hi there,

I'm looking into having a go at developing a few plugins/apps for EasySocial based on some useful functionality we'd like on our site. It'll be great as a learning experience for me personally too with getting to grips with Joomla development. I'm hoping though you could maybe point me in a general direction as I'm a bit vague on where I should begin with what I'd like to try out:

- Article plugins to let editors insert single ES items (eg. a video, a link, a file element) into an article as an embedded item. From looking at some of RegularLabs' plugins I'm going on the idea of a popup modal to a list of items, and then a special modal view of the relevant ES view (e.g. Videos) that returns the required value into a tag. Then a plugin that reads said tag and pulls in the required ES item. Does that sound feasible?

- I also want to try building in a little integration with our Zoom account, which has an API for creating/deleting meetings. Ideally I'd like to set up a tick box (so custom field, I'm thinking) on ES events, that when ticked and the event saved creates a Zoom scheduled meeting via the API and stores the Zoom meeting ID in the site database, which is then used to load in info like the meeting room link, and also will delete the Zoom meeting if the ES event is deleted. I'm wondering if I need to build a number of plugins for this - a custom field for the Events app and then plugins to handle the event creation/deletion.

I'm just looking to see if I'm thinking vaguely along the right lines or if these would be impossible within the boundaries of how the EasySocial API is set up...

Many thanks
Tim
Hello Tim,

I apologize for the delay of this reply as I was a little occupied with meetings the past week. Not a problem at all

Yep, I would suggest having a plugin to replace tags with the appropriate html codes using a content plugin. As for maintaining the styling of EasySocial, you only need to ensure that your plugin runs the following codes to render the css and javascripts on the respective pages,

[gist]
<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');

ES::initialize();
?>
[/gist]

In your html codes, you would need to ensure that it is wrapped by the following wrapper,

[gist]
<div id="es">
... your html codes here
</div>
[/gist]

All the css selectors in EasySocial uses the id of easysocial to ensure that there will not be any conflicts if there are similar class names.
·
Saturday, 15 April 2017 14:54
·
0 Likes
·
0 Votes
·
0 Comments
·

- Article plugins to let editors insert single ES items (eg. a video, a link, a file element) into an article as an embedded item. From looking at some of RegularLabs' plugins I'm going on the idea of a popup modal to a list of items, and then a special modal view of the relevant ES view (e.g. Videos) that returns the required value into a tag. Then a plugin that reads said tag and pulls in the required ES item. Does that sound feasible?

What you are really looking at is a content plugin that replaces embedded tags and not just a plugin for EasySocial. What you'll probably want to do is to insert specific tag codes like [esvideo]url[/esvideo] or [esfile]url[/esfile] when you write an article.

Then, in your content plugin, your plugin would need to replace these codes with proper embedded html objects for these items.


- I also want to try building in a little integration with our Zoom account, which has an API for creating/deleting meetings. Ideally I'd like to set up a tick box (so custom field, I'm thinking) on ES events, that when ticked and the event saved creates a Zoom scheduled meeting via the API and stores the Zoom meeting ID in the site database, which is then used to load in info like the meeting room link, and also will delete the Zoom meeting if the ES event is deleted. I'm wondering if I need to build a number of plugins for this - a custom field for the Events app and then plugins to handle the event creation/deletion.

This should be pretty easy if you already have knowledge in php and with the API from Zoom. You could refer to one of the existing custom field for Events in EasySocial and simply duplicate the folder. Then, modify it accordingly and look into the 2 major events:

1. onRegister (When the user enters the information of the event to create a new event) This is where you want to perform validations if needed

2. onRegisterAfterSave (After the event has been successfully created) This is where you want to ping Zoom if the particular field is checked.

One of the field that you could refer to is, /media/com_easysocial/apps/fields/event/description/description.php
·
Friday, 14 April 2017 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark

Many thanks for the speedy response, that's already a massive help. I'll take a look at the field you've suggested and see if it makes sense - I'm currently "OK" with PHP but I like to think I'm getting better as I poke around

With the content plugin, am I thinking on the right lines about creating an extra modal view for the ES views to return item IDs to insert as embedded tags (for usability really as this will be something our other editors would be using), and then like you suggest have the plugin replace those tags with the html content?

Also (sorry for yet more questions!), with loading in the html content for the item, how straightforward is it to pull through the relevant code from the existing ES views (eg. a specific Video) and still keep all the correct styling from the ES template? Or would I need to generate the layout and CSS from scratch? Ideally the item embedded in the article would be identical in appearance to how it would appear in the EasySocial stream view.

Many thanks
·
Friday, 14 April 2017 02:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

That's perfect thank you - I shall have a stab at it and see how it goes

Many thanks again
Tim
·
Saturday, 15 April 2017 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem Tim
·
Saturday, 15 April 2017 18:32
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post