SimonV
Well-known member
I'm trying to teach myself this stuff so its slow going, most things I've figured out from other posts here or looked at how other add-ons do things. But I'm stuck on what I want to do next.
I want to exclude nodes from including a template via a hook, I have my listener setup and working and my template includes just fine in the hook "thread_view_pagenav_before".
I also have an admin option with an array callback that gets my nodes and stores them just fine. Now I'm stuck at how to use that stored admin option array of node ids to exclude my template being included.
I figured it out to if I wanted to include certain usergroups with a similar setup I could do something along the line of :
But I'm completely stuck with the node id type scenario.
Thanks in advance for any assistance.
I want to exclude nodes from including a template via a hook, I have my listener setup and working and my template includes just fine in the hook "thread_view_pagenav_before".
I also have an admin option with an array callback that gets my nodes and stores them just fine. Now I'm stuck at how to use that stored admin option array of node ids to exclude my template being included.
I figured it out to if I wanted to include certain usergroups with a similar setup I could do something along the line of :
PHP:
$visitor = XenForo_Visitor::getInstance();
$xenoptions = XenForo_Application::get('options');
$user_group_id = $xenoptions->adminoptionid;
if($visitor->isMemberOf($user_group_id))
{
.
.
.
But I'm completely stuck with the node id type scenario.
Thanks in advance for any assistance.