By Paul Murray on Thursday, 23 March 2017
Posted in Groups
Likes 0
Views 627
Votes 0
Hi Stackideas

With the help of the documentation here and some Siteground help:

https://stackideas.com/docs/easysocial/administrators/cronjobs/cpanel-cronjobs

I have got the cron Job working at Siteground with the help of the following code:


(Cron DOG)
IF DOG walks [after DogBusiness] = True
DO WHILE StillBeerInFridge
drink beer LOOP
END DO WHILE
ELSE IF [after DogBusiness] = True 1 NoBeerInFridge
buy more beer - drink more beer
ELSE IF [after DogBusiness] = True 2 DrankAllBeerInFridge
buy more beer - drink more beer
END IF


Just kidding. This is the code I am using...



curl --silent -O /dev/null "http://www.finalbug.net/index.php?option=com_easysocial&cron=1"


PLAN A

As of now the only Notification/Alert that I have active is: Invited to join group which I activate in the back end here: Components>Easy Social>Alerts

As a group admin I can login at the front end and navigate to a group:

http://www.finalbug.net/groups-learn-post-production-socially-fcpx-and-more/34-fcpx-foundations

As far as I can tell I can invite some one to join a group only if I am friends with them? Is this correct?

I am guessing that something happens inside the Easy Social Component i.e. there is some kind of calculation

e.g. “otherGUY” who is friends with “Example Three” has been invited to join the group e.g. “FCPX Foundations”

*******************************************************************************************************************************************

If I log in as Example Five who has not been invited and navigate here:

http://www.finalbug.net/groups-learn-post-production-socially-fcpx-and-more/34-fcpx-foundations

I do not see the group “FCPX Foundations” which makes sense as I was not invited.

If I log in as Example Three who has been invited and navigate here:

http://www.finalbug.net/groups-learn-post-production-socially-fcpx-and-more/34-fcpx-foundations

I do see the group “FCPX Foundations” which makes sense as I was invited further there is a “Respond to Invitation” button!

So I believe that this works as it was intended to work


*******************************************************************************************************************************************

Is there some kind of wild card link that any user could click on to gain access to a group.

As of now the link in the mail being sent by ES in the mail I am generating as a friend of a user asking them to join a group is:

Accept Invitation:http://www.finalbug.net/groups-learn-post-production-socially-fcpx-and-more?controller=groups&task=respondInvitation&id=34&email=1&action=accept

Like in a hotel there is usualy a master key that open up all the rooms.

Is their a mater link that would open a closed group to any one who clicks on it.

This link could be included in a order confirmation mail from HikaShop or a Third Party Reseller!


*******************************************************************************************************************************************

PLAN B

My million dollar question is there a way to trigger an invite to join group mail when a logged in user who is not friends with the Groups admin decides to purchase a course?

This could be pressing the “Add to Cart Button” from Hika Shop or alternatively if I had a third part reseller such as Fastspring or Paddle!!!

Here is some documentation with respect to Paddle:

https://paddle.com/docs/subscriptions-event-reference#sts=Subscribing%20to%20Alerts

Eg creating an event such as “subscription_created” that triggers an invitation to a group!

I know I am clutching at straws here but in Germany we say:

“wer nicht fragt bleibt dumm” which means if you do not ask you remain stupid!

thanks

Paul
Hi there,


As far as I can tell I can invite some one to join a group only if I am friends with them? Is this correct?

Yes it is, you only can invite your friend only.

I think this is possible to achieve as if you appended/included link below on Hikashop email(purchased item), then prompted user to click on link below. It should redirect the user to the group and joined the group. Maybe you can try this method first and see how it goes.
?controller=groups&task=respondInvitation&id=17&email=1&action=accept


Please advice.
·
Thursday, 23 March 2017 11:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

Trying:

?controller=groups&task=respondInvitation&id=17&email=1&action=accept


Takes me to google.

I also tried:

http://www.finalbug.net/?controller=groups&task=respondInvitation&id=17&email=1&action=accept


Which gives me a 404 page not found.

I also tried this seeing as how my groups id is 34 but maybe the 17 in your link is not for a group but something else!?!


http://www.finalbug.net/?controller=groups&task=respondInvitation&id=34&email=1&action=accept


Please advise

Paul
·
Thursday, 23 March 2017 14:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

Yes it is. I forgot to chagend and notify your regarding that id. It should based on your current group Id and based on your current Id, it should be 34. Can you try and see how it goes.
·
Thursday, 23 March 2017 15:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

http://www.finalbug.net/?controller=groups&task=respondInvitation&id=34&email=1&action=accept


gives me a 404!

I think we are very close
·
Thursday, 23 March 2017 15:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Just checking that we are on the same page.
I have not technically invited the test users to the group.

Like in a hotel there is usually a master key that open up all the rooms.

Is their a matsr link that would open a closed group to any one who clicks on it.

This link could be included in a order confirmation mail from HikaShop or a Third Party Reseller!
·
Thursday, 23 March 2017 15:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Paul,

It seems that it is needed for the group to recognize those invited user ID as if you run those URL, it will not recognize you as the invited user ID and it will return null and no ID.

Just checking that we are on the same page.
I have not technically invited the test users to the group.

It seems that there are in need to customize more code rather than just using those links

Thanks for your understandings
·
Thursday, 23 March 2017 16:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

As far as I understand this there are at least two problems:

a) I need to be friends with some one to invite them.
b) An invitation has to be sent.

Then the link:

http://www.finalbug.net/?controller=groups&task=respondInvitation&id=34&email=1&action=accept

Would work

Just as a matter of interest where is the code that would need to be altered?
For example if I wanted to change it so that any one could invite any one to join a group even if not friends!?!
·
Thursday, 23 March 2017 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Paul,

Yeah, as the ideas is there and i agreed it would works but need some more modifications on cores files and might messed up other functions/features on whole site.

You might need to refer to path given below.

.../administrator/components/com_easysocial/includes/group/group.php
.../themes/wireframe/emails/group/invited.php


Please advice.
·
Thursday, 23 March 2017 17:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

Could you kindly point me to the place in the code where:

a) I need to be friends with some one to invite them.

thanks

Paul
·
Thursday, 23 March 2017 17:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

Actually, you can invite people that is not your friend as you can see at this path backend>components>Easysocial>Settigns>groups as shown https://screencast.com/t/9LFOsqxL

By the way, based on codes, it is required to invite those user as it will do some checking whether those user already on the group, invited or already on the group as you can see on this path
.../administrator/components/com_easysocial/includes/group/group.php
on invite() function.

Please advice.
·
Thursday, 23 March 2017 17:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

Actually, you can invite people that is not your friend as you can see at this path backend>components>Easysocial>Settigns>groups as shown https://screencast.com/t/9LFOsqxL

Well that is good news. Thanks for pointing this out. I missed this.

I am looking at the "Invite Friends" friends dialogue box now. It seems to do the following:

a) Search that a user exists
b) Allow you to make a list of existing user(s)
c) Send an invite to one or more users

Is there way that I could simulate this sending an invite with out actual pressing the button?

i.e. invite user with id "XYZ" to join a group e.g. a group with an id of 34

A script, url, line of code, action what ever it is?

Kindly advise

Paul
·
Thursday, 23 March 2017 18:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

This file will be responsible to shown those dialog box as you can see at this path .../easysocial.com/components/com_easysocial/themes/wireframe/groups/dialogs/invite.php base on "data-invite-button" and

<input type="hidden" name="task" value="invite" />
<input type="hidden" name="id" value="<?php echo $group->id;?>" />
·
Thursday, 23 March 2017 18:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

I really appreciate you taking the time to walk me through this.
I will stop now very soon...
Have to take the dog for a walk any way

Is there way that I could simulate this sending an invite with out actually pressing the "Send Invite" button?

i.e. invite user with id "XYZ" as user with id (Paul David Murray) to join a group e.g. a group with an id of 34

A script, url, line of code, action what ever it is?

Kindly advise

Paul
·
Thursday, 23 March 2017 18:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

That why i pointed out that files for you. It is required to do checking on those "json" and "javascript checking on pointed file above. It will done some checking after you clicked on the button. In case you required them, you have to fully customize those files. Thanks for your understanding
·
Thursday, 23 March 2017 19:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Warith

Ok I got it clicking the button activates a script(s) and checks the parameters.

This is more than enough to go on.

thanks for your time and have a great day

Paul
·
Thursday, 23 March 2017 19:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Have a nice day ahead too

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock this thread.
·
Thursday, 23 March 2017 19:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post