inherit
72282
0
Feb 22, 2019 7:29:04 GMT -8
Smangii
what's this?
4,772
February 2006
smangii
|
Post by Smangii on Jan 3, 2014 13:28:21 GMT -8
My coding is a little rusty... but we did something similar to this in school and it works for me!
Add this part to your layout templates/side tables/wherever!
<div id="messages_container"></div>
Add this part to your Global Footers:
The red you can change to your facts, just make sure they are separated by quotes. The green you can adjust to make it faster (less than 1000) or slower (more than 1000).
<script type="text/javascript"> // Rotating Messages var messages = ["Something One","Something Two","Something Three","Something Four"];
var number = 0; function display(){ document.getElementById('messages_container').innerHTML = messages[number]; setTimeout("display()",1000); if(number < messages.length - 1) { number++; } else { number = 0; } } display(); </script>
|
|
inherit
72282
0
Feb 22, 2019 7:29:04 GMT -8
Smangii
what's this?
4,772
February 2006
smangii
|
Post by Smangii on Jan 4, 2014 13:47:11 GMT -8
Are you sure you added this part?
<div id="messages_container"></div>
That is where the messages will appear, I can't find it on your forum.
Edit: Whoops I see it!
You are using Sidebar redux, right? Can you add JS into Sidebars?... For some reason the code is loading before, when it needs to load after... it might be because plugins are loaded after the forum and global footers.
|
|
inherit
72282
0
Feb 22, 2019 7:29:04 GMT -8
Smangii
what's this?
4,772
February 2006
smangii
|
Post by Smangii on Jan 4, 2014 21:12:08 GMT -8
Hmm no idea about JS as I'm a newb about that. So I take it it's not gonna work in the sidebar? I guess I could just put it at the bottom of the forum. And i'm using 'proboards sidebar' It works for me on my test forum using the sidebar redux plugin, you can see for yourself at www.smangiitest.proboards.comcan you provide a link to the sidebar code you're using? So I can test with it and see why it's not working with that code.
|
|