[cv6] Node Icons & Tools

[cv6] Node Icons & Tools 1.5.1 Release Candidate 3

No permission to download
I have an error since updating to 2.3.7 of xenforo:


Code:
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/******/...', 1267)
#1 src/XF/Template/Templater.php(1267): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s1/public/cv6_nodeicon_macros.php(209): XF\Template\Templater->method('', 'getTypeIconClas...', Array)
#3 src/XF/Template/Templater.php(921): XF\Template\Templater->{closure:internal_data/code_cache/templates/l2/s1/public/cv6_nodeicon_macros.php:201}(Object(MaZ\AUN\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l2/s1/public/poll_macros.php(24): XF\Template\Templater->callMacro('cv6_nodeicon_ma...', 'poll_icon', Array, Array)
#5 src/XF/Template/Templater.php(921): XF\Template\Templater->{closure:internal_data/code_cache/templates/l2/s1/public/poll_macros.php:12}(Object(MaZ\AUN\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l2/s1/public/poll_block.php(14): XF\Template\Templater->callMacro('poll_macros', 'poll_block', Array, Array)
#7 src/XF/Template/Templater.php(1799): XF\Template\Templater->{closure:internal_data/code_cache/templates/l2/s1/public/poll_block.php:4}(Object(MaZ\AUN\XF\Template\Templater), Array, NULL)
#8 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('poll_block', Array, true, NULL)
#9 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:poll_blo...', Array)
#10 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#11 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Poll\\Block', 'public:poll_blo...', Array)
#12 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Json->renderView('XF:Poll\\Block', 'public:poll_blo...', Array)
#13 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#16 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#17 src/XF.php(806): XF\App->run()
#18 index.php(23): XF::runApp('XF\\Pub\\App')
#19 {main}
Request state
array(4) {
  ["url"] => string(63) "/threads/*********.152397/poll/vote"
  ["referrer"] => string(74) "https://********.com/threads/********.152397/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["_xfToken"] => string(8) "********"
    ["responses"] => array(1) {
      [0] => string(4) "8384"
    }
    ["simple_display"] => string(0) ""
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(54) "/threads/**********.152397/"
  }
}
 
I changed the icons of the subforums, but when a new message is published in the subforums, the icon color does not change. Is there a solution to this problem?
1757285670014.webp
 
Before I uninstall this...

...is there a way to change the duotone colors site-wide? There are properties like --fa-primary-color, --fa-secondary-opacity, etc. that I need to adjust but since these are now done as SVG, I don't even know if that is possible. I am not going to add CSS code to every single icon on the site.
 
Before I uninstall this...

...is there a way to change the duotone colors site-wide? There are properties like --fa-primary-color, --fa-secondary-opacity, etc. that I need to adjust but since these are now done as SVG, I don't even know if that is possible. I am not going to add CSS code to every single icon on the site.

More digging and I finally uncovered this:


But this is still a problem. All forums, not just subforums, aren't taking the unread properties. (In my case, greyscale, opacity 50%.)

I changed the icons of the subforums, but when a new message is published in the subforums, the icon color does not change. Is there a solution to this problem?

If I come up with something that works, I'll share it here.
 
If I come up with something that works, I'll share it here.
And, I dug some more. This works...for me.

Anyone might need to do something similar if you have a different style. (I am modifying a style from PixelExit, so I'm unsure if this will work verbatim. If not, a variation on this will help.)

CSS:
/* extra.less edits for my PixelExit style */

// Set our duotone colors
.fa-primary { color: @xf-paletteAccent1; opacity: 1.0; }
.fa-secondary {color: @xf-paletteAccent3; opacity: 1.0; }

// Unset opacity as it was forced to a dark value for all node icons
.node .node-icon i { opacity: unset; }

// Explicitly set styling for read and unread icons
.node--unread .node-icon i { opacity: 1; }
.node--read .node-icon i { opacity: 0.5; filter: grayscale(1); }

I had a couple of problems. First, my read and unread icons were not only the same color, they also were too dark, as the opacity was set. That is why in the third line of the CSS, I had to unset the opacity. (This might be a stray change I made elsewhere that is carried over; you may not need this line.) The fourth and fifth lines are then able to style the read and unread node icons easily. The first and second lines, of course, are for my duotone color changes, based on what I'm using in my color pallete.
 
Back
Top Bottom