Hi,
I have uploaded a new version 2.1 with also this new feature included:

http://community.elgg.org/pg/plugins/hoisl/read/323321/wookie-widgets-21

Once again, thanks to Scott for the help!

-Bernhard

Scott Wilson schrieb:
... incidentally I also managed to get participants and their avatars set:

$user = $_SESSION['user'];
if  (!is_null($user)){
$this->userID = $user->getGUID();
if  (!is_null($this->userID)){
$this->username = get_user($this->userID)->name;
* **$this->src = get_user($this->userID)->getIcon();*
}
}

## instantiate widget
$this->widget = $this->getWidget();
* **$this->addParticipant();*

*     public function addParticipant(){*
* **$request = $this->vars['entity']->wookie_url;*
*       ** **$request.= 'WidgetServiceServlet?';*
*       ** **$request.= 'requestid=addparticipant';*
* ** **$request.= '&api_key='.$this->vars['entity']->wookie_api_key;*
* **$request.= '&servicetype='.$this->type;*
* **$request.= '&widgetid='.$this->vars['entity']->wookie_widget_guid;*
* **$request.= '&userid='.$this->userID;*
* **$request.= '&shareddatakey='.$this->sharedDataKey;*
*        ** **$request.= '&participant_id='.$this->userID;*
*        ** **$request.= '&participant_display_name='.$this->username;*
*        ** **$request.= '&participant_thumbnail_url='.$this->src;*
* **return file_get_contents($request);  *
*     }*


On 3 Nov 2009, at 17:24, Bernhard Hoisl wrote:

Hi,
thanks for testing the plugin.

I'm not quite sure what to take for the shareddatakey. In your old Elgg plugin you took the page_owner() which is quite the user id of the logged in user. But should this key be bound to one person or to a widget instance which may be used by several persons? I didn't figured it out fully what the Moodle plugin does. Can you give me some help what to take as the shareddatakey?

Thanks,
Bernhard


The Elgg Community schrieb:

You have a new comment on your item "Wookie Widgets" from Scott Wilson. It
reads:

I gave it a go and got it working with a Wookie server on my local machine
- hurray!
Note that the shared data key should be set dynamically to the unique id
of the widget object - so the id of whatever the entity is in Elgg that
contains the widget - rather than a static value. Otherwise there will
always be one shared state across all  widgets in Elgg (i.e. all chat
widgets everywhere will participate in the same conversation, not just the
ones in the same dashboard/profile)


To reply or view the original item, click here:

   http://community.elgg.org/pg/plugins/hoisl/read/322307/wookie-widgets

To view Scott Wilson's profile, click here:

   http://community.elgg.org/pg/profile/scottwilson

You cannot reply to this email.


Reply via email to