XenConcept
Well-known member
@XenConcept any possibility to add support to votes? I mean display the hidden content if the user votes.
View attachment 240116
Hello,
I take note. I will look at it.
@XenConcept any possibility to add support to votes? I mean display the hidden content if the user votes.
View attachment 240116
Hello,"Hide reply or reaction" icon is not listed in "Settings BBCode-Buttons".
See attachement
Hello,Is this the solution for "my" issue? ( #262 )
2.0.7 Patch Level 3Hello,
Sorry I forgot to post my answer.
I've reinstalled the add-on and I can't reproduce the problem.
Do you have the latest version of the add-on.
2.0.7 Patch Level 3
Sorry, I have a inofficial version of it. But before I pay for a addon, I want know.
XenConcept/HideBBCode/Listener/Listener.php
<?php
/*************************************************************************
* Hide BBCode - XenConcept (c) 2020
* All Rights Reserved.
**************************************************************************
* This file is subject to the terms and conditions defined in the Licence
* Agreement available at Try it like it buy it :)
*************************************************************************/
namespace XenConcept\HideBBCode\Listener;
use XF\Repository\Reaction;
use XF\Repository\UserGroup;
class Listener
{
protected static $_productId = 36;
public static function appPubSetup(\XF\App $app)
{
$branding = $app->offsetExists('xenconcept_branding') ? $app->xenconcept_branding : [];
$branding[] = self::$_productId;
$app->xenconcept_branding = $branding;
}
/**
* @param array $data
* -> dialog
* -> view
* -> template
* -> params
* @param \XF\Pub\Controller\AbstractController $controller
*/
public static function editorDialog(array &$data, \XF\Pub\Controller\AbstractController $controller)
{
$template = '';
switch ($data['dialog'])
{
case 'hide':
$template = 'xc_hide_bbcode_editor_dialog_hide';
break;
case 'hideReply':
$template = 'xc_hide_bbcode_editor_dialog_hide_reply';
break;
case 'hidePosts':
$template = 'xc_hide_bbcode_editor_dialog_hide_posts';
break;
case 'hideTrophy':
$template = 'xc_hide_bbcode_editor_dialog_hide_trophy';
break;
case 'hideReactScore':
$template = 'xc_hide_bbcode_editor_dialog_hide_react_score';
break;
case 'hideReplyReact':
$template = 'xc_hide_bbcode_editor_dialog_hide_reply_react';
$data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id');
break;
case 'hideReplyOrReact':
$template = 'xc_hide_bbcode_editor_dialog_hide_reply_or_react';
$data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id');
break;
case 'hideReact':
$template = 'xc_hide_bbcode_editor_dialog_hide_react';
$data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id');
break;
case 'hideShowtogroup':
$template = 'xc_hide_bbcode_editor_dialog_hide_showtogroup';
$data['params']['userGroups'] = $controller->repository('XF:UserGroup')->getUserGroupTitlePairs();
break;
case 'hideUser':
$template = 'xc_hide_bbcode_editor_dialog_hide_user';
break;
}
if (!empty($template))
{
$data['template'] = $template;
}
}
public static function editorButtonData(array &$buttons, \XF\Data\Editor $editorData)
{
$fa = 'fa-eye-slash';
$hideButtons = [
'xcHideDefault' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide')
],
'xcHidePosts' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_posts')
],
'xcHideReplyReact' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_reply_react')
],
'xcHideReply' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_reply')
],
'xcHideReact' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_react')
],
'xcHideShowToGroup' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_showtogroups')
],
'xcHideUser' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_user')
],
'xcHideTrophy' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_trophy')
],
'xcHideReactScore' => [
'fa' => $fa,
'title' => \XF::phrase('xc_hide_bbcode.hide_react_score')
],
];
$buttons = array_merge($buttons, $hideButtons);
}
}
Here my listener.php file on the server:
Code:<?php /************************************************************************* * Hide BBCode - XenConcept (c) 2020 * All Rights Reserved. ************************************************************************** * This file is subject to the terms and conditions defined in the Licence * Agreement available at Try it like it buy it :) *************************************************************************/ namespace XenConcept\HideBBCode\Listener; use XF\Repository\Reaction; use XF\Repository\UserGroup; class Listener { protected static $_productId = 36; public static function appPubSetup(\XF\App $app) { $branding = $app->offsetExists('xenconcept_branding') ? $app->xenconcept_branding : []; $branding[] = self::$_productId; $app->xenconcept_branding = $branding; } /** * @param array $data * -> dialog * -> view * -> template * -> params * @param \XF\Pub\Controller\AbstractController $controller */ public static function editorDialog(array &$data, \XF\Pub\Controller\AbstractController $controller) { $template = ''; switch ($data['dialog']) { case 'hide': $template = 'xc_hide_bbcode_editor_dialog_hide'; break; case 'hideReply': $template = 'xc_hide_bbcode_editor_dialog_hide_reply'; break; case 'hidePosts': $template = 'xc_hide_bbcode_editor_dialog_hide_posts'; break; case 'hideTrophy': $template = 'xc_hide_bbcode_editor_dialog_hide_trophy'; break; case 'hideReactScore': $template = 'xc_hide_bbcode_editor_dialog_hide_react_score'; break; case 'hideReplyReact': $template = 'xc_hide_bbcode_editor_dialog_hide_reply_react'; $data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id'); break; case 'hideReplyOrReact': $template = 'xc_hide_bbcode_editor_dialog_hide_reply_or_react'; $data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id'); break; case 'hideReact': $template = 'xc_hide_bbcode_editor_dialog_hide_react'; $data['params']['reactions'] = $controller->repository('XF:Reaction')->findReactionsForList(true)->fetch()->pluckNamed('title', 'reaction_id'); break; case 'hideShowtogroup': $template = 'xc_hide_bbcode_editor_dialog_hide_showtogroup'; $data['params']['userGroups'] = $controller->repository('XF:UserGroup')->getUserGroupTitlePairs(); break; case 'hideUser': $template = 'xc_hide_bbcode_editor_dialog_hide_user'; break; } if (!empty($template)) { $data['template'] = $template; } } public static function editorButtonData(array &$buttons, \XF\Data\Editor $editorData) { $fa = 'fa-eye-slash'; $hideButtons = [ 'xcHideDefault' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide') ], 'xcHidePosts' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_posts') ], 'xcHideReplyReact' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_reply_react') ], 'xcHideReply' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_reply') ], 'xcHideReact' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_react') ], 'xcHideShowToGroup' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_showtogroups') ], 'xcHideUser' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_user') ], 'xcHideTrophy' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_trophy') ], 'xcHideReactScore' => [ 'fa' => $fa, 'title' => \XF::phrase('xc_hide_bbcode.hide_react_score') ], ]; $buttons = array_merge($buttons, $hideButtons); } }
And I must have the setting [HIDE] = react
What ?Ok. Thx for support.
When the reply or reaction standard issue is solved, I will buy your addon.
Die Standard Aktion bei [HIDE] muss ich als Reaction einstellen können.
Es ist nur REPLY möglich.
Ich habe tausende Posts (Importiert von vB), welche ein [HIDE] haben.
Diese sollten auch mit einem React geöffnet werden können. Der HIDEREACT existiert nicht in dieser Datenbank.
The default action for [HIDE] must be set as a reaction.
Only REPLY is possible.
I have thousands of posts (imported from vB) that have a [HIDE].
These should also be open with a React. The HIDEREACT does not exist in this database.
Sorry. Do you have the "showtogroups" integrated?
We use essential cookies to make this site work, and optional cookies to enhance your experience.