[geeklog-devel] SOCNET
Joe Mucchiello
joe at ThrowingDice.com
Sat Feb 27 12:26:34 EST 2010
At 09:25 AM 2/27/2010, Randy Kolenko wrote:
>http://wiki.geeklog.net/index.php/SoC_social_network_support
>
>There's the initial wiki page for Socnet.
>I just put it together this morning and is by no means a definitive
>final version spelling out requirements.
>Based on what I put in the requirements, I think this is a GSoC project
>that is 100% do-able in the allotted time frame. All critiques welcome.
I still think the core modifications should already be in place
before Summer starts. I've started doing a diff and it is not all
that hard. It's more an issue of tracking down all the group table
references and checking them. (Oh, and I've discovered there's no
need to modify grp_gl_core at all. Simply adding grp_owner is enough.
If grp_owner is zero, the group is maintained by the group admin
feature only. If the grp_owner is non-zero, only the user with that
uid can access the group. Thus the socnet plugin would need to ensure
that all group manipulation occurs to groups with non-zero owner records.)
>The area that is currently "lacking" in substance is the messaging --
>that is, how should an end user receive notifications that something has
>changed and how should that be managed.
I would assume the plugin would hook plugin_getuseroptions_socnet to
add a "messages" or "alerts" link. They could also hook through
templatesetvars to add "popup" text to header (through javascript) to
alert the user.
The messages would of course be stored in a table created and
maintained by the plugin. The plugin would have functions to handle alerts:
SOC_createAlert($uid_to, $uid_from, $objid, $plugin, $state =
'UNSEEN') returns list($state, $datetime_created)
SOC_displayAlert($uid_to, $uid_from, $objid, $plugin) calls
socnet_displayalert_$plugin($uid_to, $uid_from, $objid) returns text to display
SOC_markAlert($uid_to, $uid_from, $objid, $plugin, $state = 'SEEN')
returns list($state, $datetime_created)
SOC_deleteAlert($uid_to, $uid_from, $objid, $plugin) returns nothing
SOC_findAlert($uid_to, $uid_from, $objid, $plugin) returns
list($state, $datetime_created) or null if there is no such alert.
Used to do things like "You have requested friendship with {username} already."
SOC_ignorePluginAlerts($uid, $plugin) allows the user to ignore
annoying plugins
So a plugin that enhances stories or the calendar plugin could tell
you a story or event you are subscribed to has changed:
SOC_createAlert($observer_uid, $editing_uid, $sid, 'story'). When the
user clicks the menu item that says they have an alert, the story
plugin is called. If uses the $objid to get the story title and
produces the text: <a href="link to item">item title</a> has been
modified by $editing_uid. Or the socnet plugin itself could handle
friends through the API: SOC_createAlert($uid_to, $uid_from, 'friend
request', 'socnet'). Inside socnet_displayalert_socnet if they are
not friends it would generate the text <a
href="profilelink">{username}</a> wants to be your friend <a
herf="accept link">accept</a>, <a>deny</a>, <a>block user</a>. If
they are already friends if would generate "{username} became friends
with {username}". (The accept button would create a similar alert
swapping the uids.)
----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com
More information about the geeklog-devel
mailing list