xf_phantom
Well-known member
ATM the modqueue actions are limited to "approve" and "delete".
It would be nice, if we could define more actions via the handler. (e.g. include also softdelete + delnotice) OR even much more powerful workflows where we would need more states as "approved and not approved" (e.g. article system, where the mods approve the articles (1. level) and the team leader sees e.g. only the 1. level approved articles, and then he's able to really make them public.. So he'll not need to waste his time with viewing all the articles because the the mods would sort the trash out^^ It's just an example, which would require backend changes, but it's just an example why it would be good to be able to have this more reusable)
A way would be to define and call the actions in the modqueue handler which would also returns the template with the formfields for the specific content type in the modqueue list
maybe it's easier to understand the code
instead of the 2 hardcoded actions in the moderationqueue model
xenforo could have this
and instead of the hardcoded actions in the template moderation_queue_list
the actions would come from the handler->getAvailableActions() method.
It would be nice, if we could define more actions via the handler. (e.g. include also softdelete + delnotice) OR even much more powerful workflows where we would need more states as "approved and not approved" (e.g. article system, where the mods approve the articles (1. level) and the team leader sees e.g. only the 1. level approved articles, and then he's able to really make them public.. So he'll not need to waste his time with viewing all the articles because the the mods would sort the trash out^^ It's just an example, which would require backend changes, but it's just an example why it would be good to be able to have this more reusable)
A way would be to define and call the actions in the modqueue handler which would also returns the template with the formfields for the specific content type in the modqueue list
maybe it's easier to understand the code
instead of the 2 hardcoded actions in the moderationqueue model
PHP:
if ($change['action'] == 'approve')
{
$handler->approveModerationQueueEntry($entry['content_id'], $message, $title);
}
else if ($change['action'] == 'delete')
{
$handler->deleteModerationQueueEntry($entry['content_id']);
}
xenforo could have this
PHP:
if (in_array($handler->getAvailableActions(), $change['action']){
$handler->callAction(, $change['action'], $entry['content_id'], $message, $title);
}}
and instead of the hardcoded actions in the template moderation_queue_list
Code:
<li><label for="ctrl_{$entry.content_type}_{$entry.content_id}_action_approve">
<input type="radio" name="queue[{$entry.content_type}][{$entry.content_id}][action]" value="approve" id="ctrl_{$entry.content_type}_{$entry.content_id}_action_approve" />
{xen:phrase approve}
</label></li>
<li><label for="ctrl_{$entry.content_type}_{$entry.content_id}_action_delete">
<input type="radio" name="queue[{$entry.content_type}][{$entry.content_id}][action]" value="delete" id="ctrl_{$entry.content_type}_{$entry.content_id}_action_delete" />
{xen:phrase delete}
</label></li>
Last edited:
Upvote
3