Back to vBulletin 4.x Template Modifications

Vote Pop-Up 0.1
Mod Version: 1.00, by nosz

vB Version: 4.0.x Rating: (1 vote - 5.00 average) Installs: 8
Released: 18 Oct 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Re-usable Code Translations  

This is mainly for rsps site's i use it on mine

Ok so first goto admin CP> Styles and templates> Style Manager> Your Theme> Edit Templates > Header> BEFORE EVERYTHING IN THERE 5 LINES OF NOTHING!

And then place this code,

Code:
<!-- Vote Popup -->
<div id="bgbtm">
<script type="text/javascript"><!--
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://img197.imageshack.us/img197/4172/transa.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: 470px; margin-left: auto; margin-right: auto; display: block; background-color: "><span style="color: white; font-size: medium;"> </span> <span style="color: white; font-size: large;"><strong>Vote for whatever you want!</strong> </span>
<br>
<br>
<span style="color: red; font-size: small;"></span>
<p><a onclick="hide_voted_popup();" href="your link here" target="_new"> <img style="border-color:" title="Click to vote for your w/e u want voted for!" src="http://www.runelocus.com/serverimg.php?ID=834" border="0" alt="" /> </a><br /> <br /><span onclick="hide_vote_popup();"> <span style="cursor: pointer; font-family: Tahoma; font-size: x-small;"> <span style="font-size: xsmall;">Remind me to vote tomorrow</span> </span> </span></p>
</div>
</div>
</div>
</div>
</div>
Replace "your link here" with your voting link, and replace "whatever you want" With your Site name etc...

This is the voteing image already set

Thanks and i hope you enjoy it :P

Download

No files for download.

Screenshots

Click image for larger version
Name:	images.jpg
Views:	506
Size:	1.7 KB
ID:	123444  


vblts.ru supports vBulletin®, 2022-2024