Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

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
  #2  
Old 10-18-2010, 02:49 PM
benstillman benstillman is offline
 
Join Date: Jun 2007
Location: Ohio
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo?
Reply With Quote
  #3  
Old 10-18-2010, 02:54 PM
sisterhood's Avatar
sisterhood sisterhood is offline
 
Join Date: Nov 2008
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx great Mod installed
Reply With Quote
  #4  
Old 10-19-2010, 03:32 AM
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo Please
Reply With Quote
  #5  
Old 10-19-2010, 05:07 AM
JAFRI's Avatar
JAFRI JAFRI is offline
 
Join Date: Jun 2009
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, plz share any Demo ??
Reply With Quote
  #6  
Old 10-20-2010, 07:02 PM
betts02's Avatar
betts02 betts02 is offline
 
Join Date: Jun 2009
Posts: 910
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you have to edit this template EVERY time you place a new vote up ?
Reply With Quote
  #7  
Old 10-21-2010, 06:36 AM
warrior uw warrior uw is offline
 
Join Date: Sep 2010
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 10-21-2010, 10:03 AM
Fubergen Fubergen is offline
 
Join Date: Jan 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by warrior uw View Post
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?
Reply With Quote
  #9  
Old 10-21-2010, 10:29 AM
runelife runelife is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fubergen View Post
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.
Reply With Quote
  #10  
Old 10-21-2010, 11:31 AM
Kraxell's Avatar
Kraxell Kraxell is offline
 
Join Date: Jun 2010
Location: Germany
Posts: 481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thread Tools

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:38 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.07963 seconds
  • Memory Usage 2,316KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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