Hello everyone and welcome to our website.
Other Clans on top100clans.com have asked if I would be willing to share the script for the vote popup we have here on our site.
NOTE ! Make sure you change the areas for the different URLS to match yours !
Here it is:
PHP Code:
<!-- Vote Popup -->
<div id="bgbtm">
<script type="text/javascript">// <=!=[=C=D=A=T=A=[
function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating te use of another browser).
{
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer')
{
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 );
}
return rv;
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function createCookie(name,value,min) {
if (min) {
var date = new Date();
date.setTime(date.getTime()+(min*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
window.onload = function vote_popup() {
var ver = getInternetExplorerVersion();
if(navigator.appName == 'Microsoft Internet Explorer' && ver < 7.0)
{
return;
}
sgvote6 = readCookie('sgvote6');
if (sgvote6 == null) {
document.getElementById('vote_popup').style.display = "block";
}
}
function hide_vote_popup() {
createCookie('sgvote6','yes','1440');
document.getElementById('vote_popup').style.display = "none";
document.getElementById('vote_popup').innerHTML = "";
alert("We will remind you again!");
};
function hide_voted_popup() {
createCookie('sgvote6','yes','1440');
document.getElementById('vote_popup').style.display = "none";
document.getElementById('vote_popup').innerHTML = "";
alert("Thank you for Voting!");
};
// ]=]=></script>
<div id="vote_popup" style="background: transparent url(http://img212.imageshack.us/img212/9130/transbgiw4.png) repeat scroll 0% 0%; width: 100%; height: 100%; position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; color: #f0f0f0; font-size: 9px; text-align: center; z-index: 99999; display: none;">
<div style="margin-top: 300px; width: 798px; margin-left: auto; margin-right: auto; display: block;"><span style="color: white; font-size: medium;"> </span> <span style="color: white; font-size: large;"><strong>DON'T FORGET TO VOTE FOR YOUR CLAN !! CLICK ON BANNER BELOW TO VOTE !</strong> </span>
<p><a href="http://www.top100clans.com/index.php?a=in&u=YOUR USERNAME HERE" target="_new" onclick="hide_voted_popup();"> <img src="http://www.YOURDOMAIN.com/YOUR/IMAGE/PATH.jpg" border="0" title="Click to vote for YOUR CLAN HERE !" width="728" height="90" style="border-color:" /> </a> <span onclick="hide_vote_popup();"> <span style="cursor: pointer; font-family: Tahoma; font-size: medium;"> <span style="font-size: medium;">CLICK HERE TO SKIP VOTING !</span> </span> </span></p>
</div>
</div>
</div>
If you guys have any questions or need help adding this script to your site you may post your questions here.