2020-03-26, 11:50 PM
This won't work for regular forum announcements, but BAM announcements manager supports this explicitely if you need an announcement in your header. If you need javascript in an announcement, create a global template with the announcement's text, and name it bam_javascript_template. Put the following into the template:
Then create a normal BAM announcement, and anywhere in the announcement's text, add
This tag can be anywhere, and tells BAM to load a different template. It will allow you to put a javascript header banner on your forum.
OUGC announcement bars can do something like this as well!
<p class="{$bam_unsticky} {$class}" id="announcement-{$bcprefix}{$announcement_id}">{$announcement} [INSERT YOUR JAVASCRIPT HERE]<span class="bam_date">{$date}</span>
<span class='close_bam_announcement {$display_close}'>x</span></p>
Then create a normal BAM announcement, and anywhere in the announcement's text, add
Your announcement text [@template:bam_javascript_template]
This tag can be anywhere, and tells BAM to load a different template. It will allow you to put a javascript header banner on your forum.
OUGC announcement bars can do something like this as well!