pi
pi copied to clipboard
Interaction bar
TODO
- Schema
- User action link
like:uid,<object-id>,timecheckin:uid,<object-id>,timerating:value,uid,<object-id>,timevisit:uid,<object-id>,time
- Action stats
action,<object-id>,count
- User action link
- Interaction controller in
systemmodule, or a standalone moduleinteraction- Receiver for helper
- View helper
- Stats/Count for display
- Button for action
For
- Local
- Vote/Like
- Rating
- Comment
- Check-in
- Visit
- Download
- External
- PlusOne
- Tweets
- Share
- ...
References
- http://schema.org/UserInteraction
- http://sixrevisions.com/user-interface/karma-design-pattern/
@voltan @MarcoXoops @sexnothing @linzongshu
Helper for interaction (between user and page) bar
Usage inside a phtml template
// Load helper for current request URI
$interaction = $this->interaction();
// Load for specific object
$interaction = $this->interaction(
array('module' => <module>, 'id' => <id>, 'type' => <type>)
);
// Load for current request URI with specified id and/or type
$interaction = $this->interaction(
array('id' => <id>, 'type' => <type>)
);
// Render specific actions
$interaction->render(
array('like', 'rating', 'checkin', 'visit', 'plusone', 'twitter')
);
// Render default actions
$interaction->render();
// Load/Render specific actions for specific object
$this->interaction(
array('module' => <module>, 'id' => <id>, 'type' => <type>),
array('like', 'rating', 'checkin', 'visit', 'plusone', 'twitter')
);
// Load/Render specific actions for current request URI
$this->interaction(
'',
array('like', 'rating')
);
I like this idea , Good for me :D I think interaction module is good, just it good if we can support user submits too (Article / news / any other posts)
On payamakyab.com we have user Score system, and make Score by submit / vote / favorite / send by user or other users . ( Check this page : http://www.payamakyab.com/sms/user/gorgan69 ).
hum, need to think about this