By Andy on Sunday, 04 January 2015
Likes 0
Views 1K
Votes 0
I'm trying to work out what PHP code I'd need to make a stream entry on a closed group page.... I know the user would be logged in.

There's a RSForm Module on the Group page which is capable of triggering any custom PHP code when it's completed.... so knowing that the Group page would be open, and the User logged in when the form was completed, I'm trying to get the right EasySocial PHP code to add to the activity stream of that group... "User XYZ added a ZZZ record"...

(User XYZ would be the logged in user, 'added a record' would just be my custom text with 'ZZZ' being a variable I can introduce with PHP $something).

Sorry I did try and work this out from the documentation... but got lost by this first sentence as I don't have my own extension nor do I know what CRUD is!?!
Creating a stream record should be done within your own extension. Ideally, it should be placed in a central location where CRUD happens.
Hello Andy,

I'm sorry but it is a bit complicated to do so and it is out of our support scope.
·
Tuesday, 06 January 2015 10:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andy,

Basically to create a stream you need to at least have the following:

1. An application within EasySocial to process these stream items.

2. Within your own extension, add the necessary code to log down the actions. See, http://docs.stackideas.com/developers/stream/creating_a_stream
·
Sunday, 04 January 2015 14:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Mark. I wondered if I could use the inbuilt ES application that powers the 'Share What's New' box.... I know my user is logged in and on the Group page when they trigger my PHP code... so I was hoping I could use PHP to emulate if they typed some basic text into the 'Share What's New' box.... Is that going to be possible or are things more complex than that?
·
Monday, 05 January 2015 00:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andy,

Not really sure if I understand you here but if you are wanting to display the stream, you need to create an app to process these stream items that you have just added.
·
Monday, 05 January 2015 12:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry for bad explanation. Putting it another way:

I have a custom module on an EasySocial Group page which can accept PHP code. The module is basically an input form and only shows if the user is logged in.

If the user submits the module form, I want to be able to add an activity to that Group stream.... "User XYZ just submitted the form on this page" kind of thing.

So the end effect would be exactly the same as if the user had typed some text into the EasySocial "Share What's New" box at the top of the Group page they are viewing.
·
Monday, 05 January 2015 21:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Understood. No problem Guys. Thanks.
·
Tuesday, 06 January 2015 20:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Andy,

You're welcome.
If you have anymore question, please don't hesitate to ask us and please create a new ticket. I will mark this ticket as closed.

Thanks again and have a wonderful day.
·
Wednesday, 07 January 2015 00:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post