[OzzModz] Dismiss Notice Improvements

[OzzModz] Dismiss Notice Improvements 2.0.0 Patch Level 1

No permission to download
Nice addon to bring more attention to the 'X' but it seams to negate the custom css display styling setting. @Ozzy47

Addon disabled:
dn1.JPG

Addon enabled:
dn2.JPG

Setting:
dn3.JPG
 
extra.less
CSS:
// Notices Color Burgandy
.custom-notice-burgandy
{
border-radius: 10px;
color: #8d0931;
}

dn4.JPG
 
I see the issue now. Change your HTML in the notice to this:
HTML:
<div style="font-size: 10px; text-align: right;"> To dismiss this notice<br /> click the top right <b>X</b>.</div>
 
  • Like
Reactions: CJ1
Well, still inoperative with or without <div style="font-size: 10px; text-align: right;"> To dismiss this notice<br /> click the top right <b>X</b>.</div>

HTML:
Hello {name}, we are always looking for <i><b>Tech Articles and Documents</b></i> that you have created or saved.  Feel free to browse our extensive collection located in the <b><u><a href="https://jeep-cj.com/community/downloads/" style="color:#FFD700;" >Downloads</a></u></b> area.<br /><br />
<div style="font-size: 10px; text-align: right;"> To dismiss this notice<br /> click the top right <b>X</b>.</div>

dn5.JPG
 
You must validate your XenForo license to see quoted content
Take your time, my little bit on the bottom right corner stopped the DMs that I was receiving about dismissible notices. beerchug.gif
 
This should help. When enabled these errors are generated. They are not generated when disabled.

Server error log
  • XF\CssRenderException: Error rendering template public:extra.less: ParseError: missing opening `{` in public:extra.less on line 1434, column 1 (on or near line 1434)
  • src/XF/CssRenderException.php:89
  • Generated by: Unknown account
  • Jan 27, 2025 at 4:38 PM

Stack trace​

1431 | -webkit-transition: opacity 0.25s ease;
1432 | transition: opacity 0.25s ease;
1433 | cursor: pointer;
*1434*| }
1435 |
1436 | .notice-content a.notice-dismiss {
1437 | opacity: 100;
------------

#0 src/XF/CssRenderer.php(435): XF\CssRenderException::createFromLessException(Object(Less_Exception_Chunk), 'public:extra.le...', '// Note that th...')
#1 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#2 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#3 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#5 src/addons/SV/RedisCache/XF/CssWriter.php(68): XF\CssWriter->run(Array, 0, 1, 'db5e62cb0808ddf...')
#6 css.php(32): SV\RedisCache\XF\CssWriter->run(Array, 0, 1, 'db5e62cb0808ddf...')
#7 {main}

-------------

Previous Less_Exception_Chunk: ParseError: missing opening `{` in anonymous-file-0.less on line 1434, column 1
1432| transition: opacity 0.25s ease;
1433| cursor: pointer;
1434| }
1435|
1436| .notice-content a.notice-dismiss {
1437| opacity: 100; - src/vendor/oyejorge/less.php/lib/Less/Parser.php:625
#0 src/vendor/oyejorge/less.php/lib/Less/Parser.php(572): Less_Parser->GetRules(NULL)
#1 src/vendor/oyejorge/less.php/lib/Less/Parser.php(413): Less_Parser->_parse()
#2 src/XF/CssRenderer.php(431): Less_Parser->parse('// Note that th...')
#3 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#4 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#5 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#7 src/addons/SV/RedisCache/XF/CssWriter.php(68): XF\CssWriter->run(Array, 0, 1, 'db5e62cb0808ddf...')
#8 css.php(32): SV\RedisCache\XF\CssWriter->run(Array, 0, 1, 'db5e62cb0808ddf...')
#9 {main}

Request state​

array(4) {
["url"] => string(106) "/community/css.php?css=public%3Aextra.less&s=0&l=1&d=1738013891&k=db5e62cb0808ddff8d2aa4783b952970c83df39b"
["referrer"] => string(144) "https://jeep-cj.com/community/admin.php?tools/run-job&only_ids=586879&_xfRedirect=https://jeep-cj.com/community/admin.php?add-ons/"
["_GET"] => array(5) {
["css"] => string(17) "public:extra.less"
["s"] => string(1) "0"
["l"] => string(1) "1"
["d"] => string(10) "1738013891"
["k"] => string(40) "db5e62cb0808ddff8d2aa4783b952970c83df39b"
}
["_POST"] => array(0) {
}
}
**************

Server error log
  • XF\CssRenderException: Error rendering template public:extra.less: ParseError: missing opening `{` in public:extra.less on line 1645, column 1 (on or near line 1645)
  • src/XF/CssRenderException.php:89
  • Generated by: Unknown account
  • Jan 27, 2025 at 4:37 PM

Stack trace​

1642 | -webkit-transition: opacity 0.25s ease;
1643 | transition: opacity 0.25s ease;
1644 | cursor: pointer;
*1645*| }
1646 |
1647 | .notice-content a.notice-dismiss {
1648 | opacity: 100;
------------

#0 src/XF/CssRenderer.php(435): XF\CssRenderException::createFromLessException(Object(Less_Exception_Chunk), 'public:extra.le...', '// Note that th...')
#1 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#2 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#3 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#5 src/addons/SV/RedisCache/XF/CssWriter.php(68): XF\CssWriter->run(Array, 4, 1, '5effbf7b7fb073f...')
#6 css.php(32): SV\RedisCache\XF\CssWriter->run(Array, 4, 1, '5effbf7b7fb073f...')
#7 {main}

-------------

Previous Less_Exception_Chunk: ParseError: missing opening `{` in anonymous-file-5813.less on line 1645, column 1
1643| transition: opacity 0.25s ease;
1644| cursor: pointer;
1645| }
1646|
1647| .notice-content a.notice-dismiss {
1648| opacity: 100; - src/vendor/oyejorge/less.php/lib/Less/Parser.php:625
#0 src/vendor/oyejorge/less.php/lib/Less/Parser.php(572): Less_Parser->GetRules(NULL)
#1 src/vendor/oyejorge/less.php/lib/Less/Parser.php(413): Less_Parser->_parse()
#2 src/XF/CssRenderer.php(431): Less_Parser->parse('// Note that th...')
#3 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#4 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#5 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#7 src/addons/SV/RedisCache/XF/CssWriter.php(68): XF\CssWriter->run(Array, 4, 1, '5effbf7b7fb073f...')
#8 css.php(32): SV\RedisCache\XF\CssWriter->run(Array, 4, 1, '5effbf7b7fb073f...')
#9 {main}

Request state​

array(4) {
["url"] => string(541) "/community/css.php?css=public%3AEWRporta.less%2Cpublic%3Aattachments.less%2Cpublic%3Acarousel.less%2Cpublic%3Acxf_advanced_footer.less%2Cpublic%3Acxf_top_navigation.less%2Cpublic%3Adbtech_donate_display_block.less%2Cpublic%3Adbtech_donate_progress.less%2Cpublic%3Anode_list.less%2Cpublic%3Anotices.less%2Cpublic%3AozzmodzDropTab.less%2Cpublic%3Arating_stars.less%2Cpublic%3Asiropu_ads_manager_ad.less%2Cpublic%3AsvESE_autocomplete.less%2Cpublic%3Atag.less%2Cpublic%3Aextra.less&s=4&l=1&d=1738013871&k=5effbf7b7fb073f825d3dab3725162aa1e045861"
["referrer"] => string(37) "https://jeep-cj.com/community/forums/"
["_GET"] => array(5) {
["css"] => string(396) "public:EWRporta.less,public:attachments.less,public:carousel.less,public:cxf_advanced_footer.less,public:cxf_top_navigation.less,public:dbtech_donate_display_block.less,public:dbtech_donate_progress.less,public:node_list.less,public:notices.less,public:ozzmodzDropTab.less,public:rating_stars.less,public:siropu_ads_manager_ad.less,public:svESE_autocomplete.less,public:tag.less,public:extra.less"
["s"] => string(1) "4"
["l"] => string(1) "1"
["d"] => string(10) "1738013871"
["k"] => string(40) "5effbf7b7fb073f825d3dab3725162aa1e045861"
}
["_POST"] => array(0) {
}
}
Delete
 
Back
Top