vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Add-On Releases - Vote Pop-Up 0.1 (https://vborg.vbsupport.ru/showthread.php?t=252237)

nosz 10-17-2010 10:00 PM

Vote Pop-Up 0.1
 
1 Attachment(s)
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

benstillman 10-18-2010 02:49 PM

Demo?

sisterhood 10-18-2010 02:54 PM

thx great Mod installed

tafreeh 10-19-2010 03:32 AM

Demo Please

JAFRI 10-19-2010 05:07 AM

Yes, plz share any Demo ??

betts02 10-20-2010 07:02 PM

So you have to edit this template EVERY time you place a new vote up ?

warrior uw 10-21-2010 06:36 AM

Betts, i think it is for things like sites like gaming mad ect, where you can have the popup appearing to remind people to vote ect.

Can you confirm, does this rest on a daily basis, ie it will appear every 24 hours so that you can vote again the following day?

Fubergen 10-21-2010 10:03 AM

Quote:

Originally Posted by warrior uw (Post 2112289)
Betts, i think it is for things like sites like gaming mad ect, where you can have the popup appearing to remind people to vote ect.

Can you confirm, does this rest on a daily basis, ie it will appear every 24 hours so that you can vote again the following day?

it uses cookies, i dont remember how long cookies lasts, but "date.setTime(date.getTime()+(min*60*1000));"



offtopic:
Nosz, are you Dan?

runelife 10-21-2010 10:29 AM

Quote:

Originally Posted by Fubergen (Post 2112318)
it uses cookies, i dont remember how long cookies lasts, but "date.setTime(date.getTime()+(min*60*1000));"



offtopic:
Nosz, are you Dan?

No, he's not.

I'm Dan, I'll msg you to prove it.

Why was this thread posted?

The image was posted without mine or Fubergen's consent, seeing as the image was created for our website.

I'd like to request the image to be removed please, as I have not given any form of consent for that image to be posted.

Kraxell 10-21-2010 11:31 AM

installed, 5 Stars, vote 4 MOTM
search a long time for this!


All times are GMT. The time now is 01:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01094 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete