Adding Vote Pop up to Vbul Forum

Results 1 to 7 of 7
  1. #1
    Apprentice BankaiS is offline
    MemberRank
    Apr 2009 Join Date
    21Posts

    Post Adding Vote Pop up to Vbul Forum

    Originally Released by Skyger

    I will basically explain how to added to a vbul forum

    Live Demo:
    http://bankaistory.net/

    First Download
    http://www.mediafire.com/?xodzs3xndly

    2nd Upload/Place the inc folder to your Forum Root Folder

    3. Make your way to
    Admin Cp ->Styles & Templates ->Style Manager
    Choose the skin you want to add the script to
    Click the drop down menu that says All Style Options
    Choose edit Templates
    Look for where it says
    Forum Home Templates > Double Click it and wait
    After its done Loading Double click FORUMHOME
    When its done look for
    PHP Code:
    <body
    On top of <body> Copy and paste the place of your header.js file
    which would be
    PHP Code:
    <script type="text/javascript" src="/inc/header.js"></script> 
    or you can also use a link to the js file

    For example

    PHP Code:
    <script type="text/javascript" src="http://Ragezone.com/inc/header.js"></script> 
    Anyway after that look for

    PHP Code:
    <!-- main --> 
    Underneath it place this

    PHP Code:
    <script type='text/javascript'>
      var 
    voteImage = new Asset.image('Your image Link');
      var 
    voteLinks = ['Your Voting Link.'];
      var 
    voteNr 1;

      var 
    hiddenNodes = new Array();

      
    window.addEvent('load', function(){
          if(
    window.ie){
              $$(
    'select').each(function(el){
                  
    hiddenNodes.push(el);
                  
    el.setStyle('visibility''hidden');
              });
          }

          var 
    blackLayer = new Element('div', {
              
    'styles': {
                  
    'position''absolute',
                  
    'top''0px',
                  
    'left''0px',   
                  
    'width'window.getScrollWidth(),
                  
    'height'window.getScrollHeight(),
                  
    'background-color''#000000',
                  
    'opacity'0.7,
                  
    'z-index'99998
              
    }
          }).
    injectInside(document.body);
         
          var 
    voteContainer = new Element('div', {
              
    'styles': {
                  
    'position''absolute',
                  
    'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / ),
                  
    'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / ),
                  
    'width'voteImage.width,
                  
    'background-color''#000000',
                  
    'z-index'99999
              
    }
          }).
    injectInside(document.body);
         
          var 
    voteLink = new Element('a', {
              
    'href'voteLinks[voteNr 1],
              
    'target''_blank'
          
    }).injectInside(voteContainer);
          
    voteImage.setStyle('border''1px solid #FFFFFF').injectInside(voteLink);

          var 
    voteNumber = new Element('div', {
              
    'styles': {
                  
    'position''absolute',
                  
    'top''0px',
                  
    'right''0px',
                  
    'font-size'14,
                  
    'font-weight''bold',
                  
    'color''#FFFFFF',
                  
    'padding''5px'
              
    }
          }).
    setText('').injectInside(voteContainer);
         
          var 
    voteAbort = new Element('div', {
              
    'styles': {
                  
    'color''#FFFFFF',
                  
    'cursor''pointer',
                  
    'text-align''center'
              
    }
          }).
    setText('Already Voted Today. Close Window [x]').injectInside(voteContainer);
         
          
    voteAbort.addEvent('click', function(){
                        
    createCookie('xdreamermsv''xdreamermsv''10');
              if(
    window.iehiddenNodes.each(function(el){ el.setStyle('visibility'''); });
              
    blackLayer.remove();
              
    voteContainer.remove();
              
    window.removeEvents('scroll').removeEvents('resize');
              
    Garbage.trash([blackLayervoteContainer]);
          });
         
          
    voteLink.addEvent('click', function(){
                        
    createCookie('xdreamermsv''xdreamermsv''720');
              
    voteNr++;
              (function(){
                  if(
    voteNr voteLinks.length){
                      if(
    window.iehiddenNodes.each(function(el){ el.setStyle('visibility'''); });
                      
    blackLayer.remove();
                      
    voteContainer.remove();
                      
    window.removeEvents('scroll').removeEvents('resize');
                      
    Garbage.trash([blackLayervoteContainer]);
                  }else{
                      
    voteLink.href voteLinks[voteNr 1];
                      
    voteNumber.setText('Click here to vote');
                  }
              }).
    delay(10);
          });
         
          
    window.addEvent('scroll', function(){
              
    voteContainer.setStyles({
                  
    'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / ),
                  
    'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / )
              })
          });
         
          
    window.addEvent('resize', function(){
              
    blackLayer.setStyles({
                  
    'width'window.getScrollWidth(),
                  
    'height'window.getScrollHeight()
              });
              
    voteContainer.setStyles({
                  
    'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / ),
                  
    'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / )
              })
          });
      });
    </script> 

    Congratz u now have popup voting for your Forum!


  2. #2
    Account Upgraded | Title Enabled! Marizzle is offline
    MemberRank
    Sep 2008 Join Date
    348Posts

    Re: Adding Vote Pop up to Vbul Forum

    I love you. :]

  3. #3
    Member ScalloT is offline
    MemberRank
    Apr 2009 Join Date
    81Posts

    Re: Adding Vote Pop up to Vbul Forum

    Quote Originally Posted by semerjeran View Post
    I love you. :]
    Too far D:

  4. #4
    Account Upgraded | Title Enabled! ~Sex~ is offline
    MemberRank
    Oct 2008 Join Date
    CaliforniaLocation
    279Posts

    Re: Adding Vote Pop up to Vbul Forum

    oh yeah i needed this great release
    any for IPB?

  5. #5
    Account Upgraded | Title Enabled! jayypee is offline
    MemberRank
    Mar 2009 Join Date
    AustraliaLocation
    225Posts

    Re: Adding Vote Pop up to Vbul Forum

    Very nice release :)

  6. #6
    Xephizion Development Ehab is offline
    MemberRank
    Apr 2008 Join Date
    Somewhere I BelLocation
    1,935Posts

    Re: Adding Vote Pop up to Vbul Forum

    sucks~ it generates extra lag

  7. #7
    Apprentice BankaiS is offline
    MemberRank
    Apr 2009 Join Date
    21Posts

    Re: Adding Vote Pop up to Vbul Forum

    Causes no lag



Advertisement