This code fetches the data: $WhosOnlineModule->GetData(ArrayValue('Plugin.WhosOnline.Invisible', $UserMetaData));
This code saves the data: // Get the data $UserMetaData = $this->GetUserMeta($UserID, '%'); $ConfigArray = array( 'Plugin.WhosOnline.Invisible' => NULL );
if ($Sender->Form->AuthenticatedPostBack() === FALSE) { // Convert to using arrays if more options are added. $ConfigArray = array_merge($ConfigArray, $UserMetaData); $Sender->Form->SetData($ConfigArray); } else { $Values = $Sender->Form->FormValues(); $FrmValues = array_intersect_key($Values, $ConfigArray);
foreach($FrmValues as $MetaKey => $MetaValue) { $this->SetUserMeta($UserID, $this->TrimMetaKey($MetaKey), $MetaValue); }
$Sender->StatusMessage = T("Your changes have been saved."); }
both in plugins/WhosOnline/default.php
I am not familiar with how "UserMeta" works or what it does, but for more help, you should look into that.
Comments
$WhosOnlineModule->GetData(ArrayValue('Plugin.WhosOnline.Invisible', $UserMetaData));
This code saves the data:
// Get the data
$UserMetaData = $this->GetUserMeta($UserID, '%');
$ConfigArray = array(
'Plugin.WhosOnline.Invisible' => NULL
);
if ($Sender->Form->AuthenticatedPostBack() === FALSE) {
// Convert to using arrays if more options are added.
$ConfigArray = array_merge($ConfigArray, $UserMetaData);
$Sender->Form->SetData($ConfigArray);
}
else {
$Values = $Sender->Form->FormValues();
$FrmValues = array_intersect_key($Values, $ConfigArray);
foreach($FrmValues as $MetaKey => $MetaValue) {
$this->SetUserMeta($UserID, $this->TrimMetaKey($MetaKey), $MetaValue);
}
$Sender->StatusMessage = T("Your changes have been saved.");
}
both in plugins/WhosOnline/default.php
I am not familiar with how "UserMeta" works or what it does, but for more help, you should look into that.
/cd
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •verry thanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •