[Help] Vote script - Vote Later

DWBaHu0

New Member
Joined
May 5, 2008
Messages
71
Reaction score
16
Търся скрипт за вотване, самоче не какъвто линк да отворя в сайта ми и да излиза постоянно,ами искам да има бутонче кадето да го скрии за 10мин и след 10мин ако е още в сайта да излезе отново...
Този вот го голедах някаде... май в Frienz Network, има го и в KozMu, надявам се че ме разбрахте :D
 
  • Like
Reactions: gringusta
<script type='text/javascript'>
var voteImage = new Asset.image('пътят на изображението');
var voteLinks = ['линкчето на твоят сървър за гласуване'];
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 ) / 2 ),
'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 ),
'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': '#996600',
'cursor': 'pointer',
'text-align': 'center'
}
}).setText('Remind me in 10 minutes.').injectInside(voteContainer);

voteAbort.addEvent('click', function(){
createCookie('vote', 'vote', '10');
if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
blackLayer.remove();
voteContainer.remove();
window.removeEvents('scroll').removeEvents('resize');
Garbage.trash([blackLayer, voteContainer]);
});

voteLink.addEvent('click', function(){
createCookie('vote', 'vote', '720');
voteNr++;
(function(){
if(voteNr > voteLinks.length){
if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
blackLayer.remove();
voteContainer.remove();
window.removeEvents('scroll').removeEvents('resize');
Garbage.trash([blackLayer, voteContainer]);
}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 ) / 2 ),
'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
})
});

window.addEvent('resize', function(){
blackLayer.setStyles({
'width': window.getScrollWidth(),
'height': window.getScrollHeight()
});
voteContainer.setStyles({
'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / 2 ),
'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
})
});
});
</script>


слага се в body
 
  • Like
Reactions: gringusta
try this one :

Code:
<SCRIPT language=JavaScript type=text/javascript>
<!--
var detStatus=confirm("Please vote for Mu-Morgan - Season II and you can Win use the button OK");
if (detStatus)
window.location = "http://www.xtremetop100.com/in.php?site=1132251672";

//-->

</SCRIPT>
 
Code:
<script type="text/javascript">
	window.addEvent('load', function(){
		var Tips1 = new Tips($$('.Tips1'), {
			maxTitleChars: 50
		});
		$('nav').getElements('li').each(function(el){
			el.onmouseover = function(){ el.addClass('sfhover'); };
			el.onmouseout = function(){ el.removeClass('sfhover'); };
		});
	});
</script>
<script type='text/javascript'>
  var voteImage = new Asset.image('http://i34.tinypic.com/10miged.png');
  var voteLinks = ['http://www.xtremetop100.com/in.php?site=1132248646'];
  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 ) / 2 ),
              'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 ),
              '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('Remind me in 10 minutes.').injectInside(voteContainer);
      
      voteAbort.addEvent('click', function(){
					createCookie('vote', 'vote', '10');
          if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
          blackLayer.remove();
          voteContainer.remove();
          window.removeEvents('scroll').removeEvents('resize');
          Garbage.trash([blackLayer, voteContainer]);
      });
      
      voteLink.addEvent('click', function(){
					createCookie('vote', 'vote', '720');
          voteNr++;
          (function(){
              if(voteNr > voteLinks.length){
                  if(window.ie) hiddenNodes.each(function(el){ el.setStyle('visibility', ''); });
                  blackLayer.remove();
                  voteContainer.remove();
                  window.removeEvents('scroll').removeEvents('resize');
                  Garbage.trash([blackLayer, voteContainer]);
              }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 ) / 2 ),
              'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
          })
      });
      
      window.addEvent('resize', function(){
          blackLayer.setStyles({
              'width': window.getScrollWidth(),
              'height': window.getScrollHeight()
          });
          voteContainer.setStyles({
              'top': ( window.getScrollTop() + ( window.getHeight() - voteImage.height ) / 2 ),
              'left': ( window.getScrollLeft() + ( window.getWidth() - voteImage.width ) / 2 )
          })
      });
  });
  </script>

пробвай този :)
 
А къде се слага самият script???в index.php??
 
Добър е този последния скрипт :)):yes: