Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Vote Pop-Up 0.1 Details »»
Vote Pop-Up 0.1
Version: 1.00, by nosz nosz is offline
Developer Last Online: Jan 2016 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.0.x Rating:
Released: 10-17-2010 Last Update: Never Installs: 8
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

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

Screenshots

File Type: jpg images.jpg (1.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-21-2010, 08:11 PM
zonaenlinea's Avatar
zonaenlinea zonaenlinea is offline
 
Join Date: Dec 2009
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo ?
Reply With Quote
  #13  
Old 10-22-2010, 05:46 AM
warrior uw warrior uw is offline
 
Join Date: Sep 2010
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so what code do we have to put in, so that it re-appears every 24 hours?
Reply With Quote
  #14  
Old 10-22-2010, 08:53 AM
Kraxell's Avatar
Kraxell Kraxell is offline
 
Join Date: Jun 2010
Location: Germany
Posts: 481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@zona
when you enter a page, there will show an image, the background is dark and you have the choice to vote (click on image) or remember to vote tomorow
Reply With Quote
  #15  
Old 11-06-2010, 03:54 PM
nosz nosz is offline
 
Join Date: Oct 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It asks every 24 hours theres a demo at MKIA Scape

I write this code plus there is MANY different versions of this.
Reply With Quote
  #16  
Old 12-18-2010, 11:45 AM
tattooz tattooz is offline
 
Join Date: Aug 2010
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you click the pop up message, is that the vote or does it take you to a voting thread?
Reply With Quote
  #17  
Old 10-24-2013, 02:44 PM
avitor avitor is offline
 
Join Date: Jun 2007
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

really bad mod
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04161 seconds
  • Memory Usage 2,282KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete