我想向此过滤器添加一个查询,以逗号分隔的joomla类别ID(2,7):
https://docs.jreviews.com/?title=JReviews:Developers_Filters#Add_EasySocial_Message_Button
我想在某种情况下使用此joomla变量“ $ catId”来过滤类别2和7。
我的测试都落在了错误中,因此是php和joomla专家的问题。也许有人可以帮助我。
function add_easysocial_message_button($buttons, $params)
{
if ( !defined('ES_MESSAGE_FILTER') )
{
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');
ES::initialize();
ES::language()->loadSite();
define('ES_MESSAGE_FILTER', 1);
}
$listing = $params['listing'];
$easysocial = '
<button type="button" class="jrButton jrSmall"
data-es-conversations-compose=""
data-id="'.$listing['User']['user_id'].'"
data-es-provide="tooltip"
data-original-title="Contact This Member"
>
<span class="jrIconMessage"></span> Contact This Member
</button>
';
$buttons[] = $easysocial;
return $buttons;
}
Clickfwd\Hook\Filter::add('listing_detail_action_buttons', 'add_easysocial_message_button', 10);