Hi,
i will add some thoughts to the general design of the module. Aims are to make the implementation
- as much generic as possible
- as much as flexible as possible
I made some notes for these and hope you can understand it. I added an example at the end as well.
May be these notes are a good base for a discussion about the design.
---------------------
Possibility for page admin to insert css classes to which streams can be assigned:
- eg: class "user-avatar":=privatestream
- supports changing stream assignment afterwards
- cloning of existing stream possible, if required
- a) possibility for some token in class definition to transmit arguments: eg. "user-avatar-[uid]" / "page-[nid]"
- b) alternative possibility to detect these arguments from a-tags href by predefined pattern, eg "/user/[uid]"
- using this custom class approach together with b), many simple username-links can be enriched with microstream wihout any changes to css class definitions
Ajax-Requests (after onmouseover of text, which is tags by one of the classes):
- Get-request to stream-url: "heartbeat/[streamID]/micro" ... for the assigned stream
- with query parameters: css class, uid, nid (via token identified from css-class or href of first included a-tag)
- So ajax request does not conflict with any path of heartbeat core module
Default Page Request - simple heartbeat page view of the adressed stream:
- redirect of "heartbeat/[streamID]/micro" to "heartbeat/[streamID]/0/uid"... only, if uid has been identified as valid (>0)
- by default, the simple hb core approach gets applied
Panel-Page:
- a seperate panel page can be available per addressed streamID
- (with menu link: heartbeat/[streamID]/micro; can be a copy of a template page, eg. the page for heartbeat/privatestream/micro)
- where get-parameters of ajax-request are available as page arguments (uid, nid, streamID)
- Panel usage creates extreme flexibility for content to show (eg. block of addressed streamID; user infos; node infos; ...)
- ? may be ajax usage for panels-page-content is limited
Example:
Micro-classes-specification:
1) "user-avatar"
- classID: "user-avatar"
- streamID: privatestream
- argument user-ID:
* href-detection: /user/[uid]
* class-name detection: [none] - argument node-ID:
* href-detection: [none]
* class-name detection: [none] - default redirect: enabled
2) "story"
- classID: "story-"
- streamID: storystream
- argument user-ID:
* href-detection: [none]
* class-name detection: [none] - argument node-ID:
* href-detection: [none]
* class-name detection: "[classID][nid]" - default redirect: disabled (since no uid is available)
HTML with action sequence on mouseover:
<span class="user-avatar"><a href="/user/4" > MyName </a><span>
- get-query: heartbeat/privatestream/micro?uid=4,classID=user-avatar
- default redirect: heartbeat/privatestream/0/4
<span class="story-10">MyStory<span>
- get-query: heartbeat/storystream/micro?nid=10,classID=story-
- default redirect:
- panel-page existent for menu-entry "heartbeat/storystream/micro" with panes
- block view of storystream
- author information
- last comments for story....