1
votes

I am working in social engine and developing a plugin and widget in social engine. Say this plugin is about car so I want that on listing of my all cars, users can like the car.

I have seen in code that request is sent on activity/index/like with action_id as param. This is the id which is liked by user. Now what I have understood that each of your car entry must be present in engine4_activity_actions table.

Again as for as I have understood the following fields are important in that table

type | subject_type | subject_id | object_type | object_id

I think I can put mycar in type column, user in subject_type, user_id in subject_id But what is object_type and object_id?

First I need to know either my understanding is rite or not? If yes then what I put in above two columns, Or then what is the correct way to accomplish this task?

1

1 Answers

0
votes

In the table engine4_activity_actions, the type is used to express the action type, for example "like_car" (you have to define it in the engine4_activity_actionTypes table).

subject_type: user
subject_id: user_id
object_type: mycar
object_id: car_id

Hope this helps you much.