We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Board video on main page
Topic Started: Jun 18 2012, 05:43 PM (503 Views)
H3LLH0UND
Member Avatar
Hellish Hound
[ *  * ]
Board Address: FNBN.org
Board Software: Zetaboard
Description:
Is there a way to just have the videos on in the bottom of the board to only show on the board main page, instead of every page you go on?

This is the code im using.
Code:
 
<script type="text/javascript">
(function ($) {
var randomVideo = [];
var l = 0;
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/qqyDuFANTIQ" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/76exdtQuuuw" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/jgoxgI0BG-A" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/1mfK-LZFMjs" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/hn9Wd-g3ElM" frameborder="0" allowfullscreen></iframe>'];

var random = Math.floor(Math.random() * randomVideo.length);

document.write(randomVideo[random][0]);
})(jQuery);
</script>

Edited by H3LLH0UND, Jun 18 2012, 05:44 PM.
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Try the following:
Code:
 
if (location.href.match("/index/")) {
(function ($) {
var randomVideo = [];
var l = 0;
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/qqyDuFANTIQ" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/76exdtQuuuw" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/jgoxgI0BG-A" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/1mfK-LZFMjs" frameborder="0" allowfullscreen></iframe>'];
randomVideo[l++] = ['<iframe width="800" height="500" src="http://www.youtube.com/embed/hn9Wd-g3ElM" frameborder="0" allowfullscreen></iframe>'];

var random = Math.floor(Math.random() * randomVideo.length);

document.write(randomVideo[random][0]);
})(jQuery);
}
Offline Profile Goto Top
 
H3LLH0UND
Member Avatar
Hellish Hound
[ *  * ]
Sorry DaPizzaMan, it is not working for me. I am putting it in the board template.

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board

I am putting in that area and it does not work. Am I doing something wrong?

But I do always thank those who help. :D
Offline Profile Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
You need the script tags
Offline Profile Goto Top
 
H3LLH0UND
Member Avatar
Hellish Hound
[ *  * ]
Okay, works.

Thanks.

Please Close :)
Offline Profile Goto Top
 
Steve
Member Avatar
patriot
[ *  *  *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic