Abywns Polls - and More to come...
Written on 09/15/05 at 12:31:36 EST by Jack Deth
Here is MiguelGomes' Rotation Hack for Abywns Polls!!!

miguelgomes wrote:
Hi Jack,

When you delete one poll, you are deleting the line of file polls.txt. Thus the randomic number does not find a valid id and produces one
poll empty in the homepage.
I created more one variable: $prefer_poll. When the number generated for srand not to find one valid id, it will substitute for this poll. I think it will correct the problem. I wait opinions.


code:
sub poll {
##########
# this sub generates complete Table-ROWS it therefore has to be included in a boxheader and boxfooter

#
    if ($polls_are_loaded ne "YES") {   load_polls();    }

    if ($_ ne "" && $existpoll{$_}) { $thispollid = "$_";    }
    elsif ($info{'pollid'} ne "" && $info{'pollid'} !=~ /\W/) {     $thispollid = $info{'pollid'}   }
    else {  

##################################################################
# polls rotator hack for polls.pl (core code) and Abwin Polls ###
# by miguelgomes
# Configs:
# 1= rotate 0 = fixes the last poll
$rotatepoll="1";
# Put the id of poll to use this. Live this blank to use rotation
$onlyonepoll="";
# put the id of poll defaut for use when encounter a invalid id
$preferpoll="1";
########################################
if ($rotatepoll="1") {

       srand;
      $max=@polls;
      @quant=(0..$max);
      $next_poll = int(rand(@quant)); # number
      
}
if ($onlyonepoll ne ""){$next_poll =$onlyonepoll;}
    $thispollid = $pollid;
 }

if ($thispollid eq ""){$thispollid="$preferpoll";}

############################# end polls rotator #################
    $thispolltitle = "$polltitle{$thispollid}";
    $thispollactive = "$pollactive{'$thispollid'}";


[]s miguelgomes

Other messages in this Thread:
 
 Re: Abywns Polls - and More to come...
Written on 09/15/05 at 12:34:31 EST by Jack Deth
I found some information on Abywns site that is VERY interesting...

If you take a look at the Main Page here you will see the Polls are now 3 blocks long...

Some nice added functionality.

in my plugins.pl I added this code to make the extra blocks under the existing Poll.


code:
#######################
sub right_top_plugins {
#######################
# These blocks are located below the poll

##################### Begin Poll Code #########################
poll_results_block();
all_polls_block_small();
##################### End Poll Code   #########################


 Re: Abywns Polls - and More to come...
Written on 09/18/05 at 11:06:42 EST by Jack Deth
You Might notice that the Polls are different...

It seems the 2 bottom Poll Blocks stay set to the current Poll, while the main Poll Block is still rotating!!!

This is actually a good thing...

Now there can be 2 polls on the site at the same time...

1 is the standard polls block.
1 will be in the "results-type" voteable block.

ABYWN is a trickster...  this stuff has been hiding here since 2002!!!

 Re: Abywns Polls - and More to come...
Written on 09/19/05 at 15:34:56 EST by Mossad
Do no what to say. If someone vote and all ppl vote that question the line of the % is expanding bad and modify the way how`s looks the right blocks.

Tellme if only at me !!!

 Re: Abywns Polls - and More to come...
Written on 09/19/05 at 20:05:40 EST by Jack Deth
First of all, I didnt understand a freaking thing you just asked me...

Dont Cry for me Romania!!!!

 Re: Abywns Polls - and More to come...
Written on 09/20/05 at 00:11:15 EST by Mossad
just go at my site and see.
if you dont undestend is becouse you`re stupid.
try like this, vote 5 times on the poll, at the same questions, and you`ll see the point

 Re: Abywns Polls - and More to come...
Written on 09/20/05 at 00:20:25 EST by Jack Deth
I have my site setup so you can only vote once.

I know what you are talking about...

its the letters being squished...

the only thing you can do is suffer...

If your right-side block was wider it wouldnt be as noticeable.

I am using longer words then you in the polls so it doesnt look as bad.

I didnt make it, I am just using them...  If you want to try and change how the layout is, go play within the poll script I sent you.

 Re: Abywns Polls - and More to come...
Written on 09/20/05 at 00:31:20 EST by Mossad guest
case close

Forums and Comments Brought to you by: www.2xlnt.com - WA
The comments are owned by the poster. We aren't responsible for its content.