By Vitaliusdfox on Thursday, 13 August 2015
Posted in Technical Issues
Replies 14
Likes 0
Views 651
Votes 0
Hello. Just installed a easysocial and it's awesome! But you always wants some more. And the thing is that I have a teamspeak3 server and I want to tie it with EasySocial. So when somebody makes/delete a group in category "voice" they will trigger a php code that commands to my TS3 server to make/delete a new servergroup with similar name. And if someone join/leave a group in category "voice" they will trigger another php code to do similar job on teamspeak server.
So, where do i need to look first to insert my script? How to do it right? Can apps do this job? If i make a change in "com_easysocial\controllers\groups.php" it will be wiped on EasySocial 1.4 update? What do you recomend me to read first? Never write in php before, only Delphi but i can learn fast and bring a right guy if needed.
Hey there,

Yep, apps are suitable for this job and there is a trigger called "onBeforeDelete". Just create a group app and define this function
·
Thursday, 13 August 2015 01:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Is there any docs for it or sample? It will save me lot of time.
·
Thursday, 13 August 2015 01:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Go to http://stackideas.com/apps and click on the app generator Or view existing group apps in /media/com_easysocial/apps/group/
·
Thursday, 13 August 2015 01:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Didn't see any "app generator". Ctrl+F didn't see it too. Is it right url?
But i found /media/com_easysocial/apps/group/ and it is looks helpfull.
Thank you.
·
Thursday, 13 August 2015 01:41
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome See my screen shot here, http://screencast.com/t/naZR9Jcs
·
Thursday, 13 August 2015 01:44
·
0 Likes
·
0 Votes
·
0 Comments
·
http://rghost.ru/6JMC7Kbgc
It's different for me.
·
Thursday, 13 August 2015 01:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah okay you need to click on submit an app and accept the agreement first
·
Thursday, 13 August 2015 02:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Yahoo! Now it's here. Thank you again.
·
Thursday, 13 August 2015 02:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Yahoo! Now it's here. Thank you again.
One more question. Is it any event with group create? because in app builder i see only "Before delete the group". I need a member join/left group too.
·
Thursday, 13 August 2015 02:50
·
0 Likes
·
0 Votes
·
0 Comments
·
You can create the following methods to hook upon user's joining / leaving a group.

onJoinGroup
onLeaveGroup
·
Friday, 14 August 2015 01:42
·
0 Likes
·
0 Votes
·
0 Comments
·
So I not restricted only to "Before delete the group"? This is great! And again - thanks for your help. You helped me completly.
·
Friday, 14 August 2015 11:27
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome.
·
Monday, 17 August 2015 16:35
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm stuck. I'm just can't make it work.
1 step- maked app template in app generator.
2 step- fixed .xml manifest file added <files> part:
<?xml version="1.0" encoding="utf-8"?>
<social type="apps" group="group">
<name>Teamspeak</name>
<element>Teamspeak</element>
<author>Vitalius D'Fox</author>
<url></url>
<created>18th August, 2015</created>
<version>1.0.4</version>
<copyright>Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description><![CDATA[Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard.]]></description>
<core>false</core>
<installable>true</installable>
<system>false</system>
<widget>true</widget>
<files>
<folder>config</folder>
<folder>themes</folder>
<file>Teamspeak.php</file>
<file>Teamspeak.xml</file>
<file>index.html</file>
<file>en-GB.plg_app_group_teamspeak.ini</file>
</files>
<languages>
<language type="en-GB">en-GB.plg_app_group_teamspeak.ini</language>
</languages>
</social>

3 step- added my code in .php file.
<?php

defined('_JEXEC') or die( 'Unauthorized Access' );
require_once("libraries/TeamSpeak3/TeamSpeak3.php"); //my library with i use.
Foundry::import('admin:/includes/apps/apps');

class SocialGroupAppTeamspeak extends SocialAppItem
{
public function onUserProfileUpdate(SocialUser &$my)
{

//my code placed here. it should work from library i include.
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://user:password@ip:sqport/?server_port=9987");
$ts3_VirtualServer->clientGetByUid("+50iaWYGonuqFYFlWa12MAMp1dg=")->kick(TeamSpeak3::KICK_SERVER, "evil kick XD");

}
public function onBeforeDelete(SocialGroup &$group)
{
//my same code placed here
}
}

4 step- installed app in backend and activated it.
I think I miss something. Cause my code won't start when i do profile update or group delete. Did my library don't work or my app do nothing? And i still can't get how to add "onJoinGroup, onLeaveGroup ".
If I just add
public function onJoinGroup(SocialGroup &$group)
will it be enough to work? And what to do with group create event? Is it need to be "onBeforeCreate"?
·
Monday, 24 August 2015 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as I missed your thread earlier. I am sorry but unfortunately our support policy does not cover custom apps. If you require 1 to 1 support for your custom apps, please do contact us for a quote at https://crm.stackideas.com/index.php
·
Thursday, 03 September 2015 02:25
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post