PDA

View Full Version : Group Discussions Unknown Location


Amaury
08-06-2012, 09:48 PM
When I'm viewing deleted, moderated, or new group discussions, it gives me an unknown location in the activity instead of a Viewing Deleted and Viewing Moderated like with other deleted and moderated things. In this case, it should be Viewing Deleted Group Discussions and Viewing Moderated Group Discussions.

How can I fix this?

kh99
08-07-2012, 12:11 AM
You can add it with a couple of plugins. Look at this article: https://vborg.vbsupport.ru/showthread.php?t=228112 and scroll down to "Instructions to Add your Page to the Who's Online List (WOL):". Of course you'll use moderation.php as the file name. One thing that's not shown is that you can check the parameter values (in the online_location_process plugin) using the array $values, so that you'd want the code to be something like:

if ($filename == 'moderation.php' AND $values['do'] == 'viewdiscussions')
{
if ($values['type'] == 'deleted')
$userinfo['activity'] = 'viewdiscussions_deleted';
else if ($values['type'] == 'moderated')
$userinfo['activity'] = 'viewdiscussions_moderated';
else if ($values['type'] == 'new')
$userinfo['activity'] = 'viewdiscussions_new';
}

Amaury
08-08-2012, 02:49 AM
You can add it with a couple of plugins. Look at this article: https://vborg.vbsupport.ru/showthread.php?t=228112 and scroll down to "Instructions to Add your Page to the Who's Online List (WOL):". Of course you'll use moderation.php as the file name. One thing that's not shown is that you can check the parameter values (in the online_location_process plugin) using the array $values, so that you'd want the code to be something like:

if ($filename == 'moderation.php' AND $values['do'] == 'viewdiscussions')
{
if ($values['type'] == 'deleted')
$userinfo['activity'] = 'viewdiscussions_deleted';
else if ($values['type'] == 'moderated')
$userinfo['activity'] = 'viewdiscussions_moderated';
else if ($values['type'] == 'new')
$userinfo['activity'] = 'viewdiscussions_new';
}


Thank you.

I also just noticed I get it when confirming deletion of something:

http://i101.photobucket.com/albums/m62/AmauryGarcia/UnknownLocation.png

Amaury
01-30-2013, 11:29 PM
Okay, so I added this plugin (credit goes to Joe for helping over on the official vBulletin site), which works:

if (strpos($userinfo['location'], 'moderation.php?do=viewdiscussions') !== false)
{
$userinfo['action'] = 'Viewing Moderated Group Discussions';
$handled = true;
}

However, how do I separate it? One for deleted discussions -- Viewing Deleted Group Discussions -- and one for moderated discussions -- Viewing Moderated Group Discussions. I'm currently using Viewing Moderated Group Discussions for both.

I tried adding the deleted and moderated specifiers at the end: moderation.php?do=viewdiscussions&type=deleted and moderation.php?do=viewdiscussions&type=moderated. However, those didn't seem to do anything.

Thanks!

Amaury
02-04-2013, 09:54 PM
Anyone?