UBB.Dev
Modification Name: Polls... The Way They Were Meant To Be

Author(s): Ian Spence

Description: Makes polls appear in your topic, not in a popup.

Also allows for polls to be called via js, allowing for Poll Content Islands laugh

Demo: http://www.alforadmin.com

Requirements: UBB.classic 6.7

Download Link: https://www.ubbdev.com/ubb/upload/00020028/Poll-TWTWMTBI.zip

Credits: LK for the poll beautification mod, and CC for a lot of help with code

The script can be called the following way.

Code
<script language="Javascript1.1" type="text/javascript" src="http://yourdomain.com/cgi-bin/poll_ssi.cgi?poll=[pollid]"></script>
Replace [pollid] with the pollid, which can be found by viewing the source code of the topic containing the poll
Looks slick, thanks laugh

I'm liking the latest look of your site, congrats on the refinement thumbsup
laugh Thanks. And thank you for not complaining when I stole your blockquote css.

A note to people who want to preview this, log on with UBBDEV / UBBDEV or you'll only be told you can vote tipsy
Nice hack, polls look much better that way laugh

I'll agree with Allen here and say your site kicks some ass wink
Very, very nice. I'm happy to see new ideas and old faces.
Hello,

I get this error:

Ein Fehler ist aufgetreten:

Can't find string terminator "THAT_PAGE" anywhere before EOF at NonCGIPath/Templates/public_polls.pl line 1045.

Can someone send me the hacked files?
The very last step, instead of

Code
------
Find:
------

$Footer_Popup
THAT_PAGE


------
Replace With:
------

}
do

Code
------
Find:
------

$Footer_Popup
THAT_PAGE


------
Add After:
------

}
Hi Ian,

I have changed it, but now I can not see anything...

http://www.d-talk.tv/ubb/ultimatebb.php/ubb/get_topic/f/4/t/000027.html
I'll need ftp access to your board to see what's wrong
Fixed.

A note to everyone, CHMOD the poll_ssi.cgi to 755, not 777
Thanks Ian!

One question:

Is it normal that after voting there is the old pollwindow and after closing it, the whole boardpage is closing?
leave it to ian to error a chmod on a mod which took so long to write wink ...
I finally figured out how to do the Transition with the Thank you page.

Please redo the second step of public_polls.pl.

Then do the new steps,

Code
------
Find:
------

sub PollThankForVote {
my $pollid = shift;


------
Add After:
------

if($in{refer}) {
my $pickle;
my $title;

$in{refer} = $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} ne "";

if($in{refer} ne '') {
$pickle = $in{refer};
} else {
$pickle = $ULTIMATEBB{FORM};
}

if($in{title} ne '') {
$title = $in{title};
} else {
$title = $vars_config{BBName};
}

&Transition($pickle, "Thank you for voting.", $title);

} else {

------
Find:
------

$string .= qq(</center>);
} # end if
&StandardHTMLPopup($string);

------
Add After:
------

}
Zip updated.
Sorry,

Now I get this error:

(RequireCodeNoINC) NonCGIPath/Templates/public_polls.pl: Unmatched right curly bracket at NonCGIPath/Templates/public_polls.pl line 826, at end of line
syntax error at NonCGIPath/Templates/public_polls.pl line 826, near "}"
Compilation failed in require at CGIPath/ubb_lib.cgi line 941.
I said to redo the second step, not remove it entirely
ooops, sorry laugh
Ian, what do I have to change, that it looks like at your board?
Thanks for the nice mod. When looking at the poll on my site,it is inside the 1st post in the thread. I noticed the poll on your site is above the 1st post. Do have have a modified version or did I mess up the install?
I have a modified version which was actually a PITA to get to work correctly. The version in this mod appears inside the first post
Good job, very good job! laugh (although I liked it better when the colors were by the percentage and not by the order)
well unless you had 6 choices, and they all had a different amount of votes, so much so that none of the percent ranges had more than one choice in it, you'd never see all the images.

I'm an equal opportunity image shower
WE have been using this mod for about 3-4 weeks now and its great, however I get some members that get this error msg


Quote
quote:
Error:
Sorry, you do not have permission to vote in this poll.
I looked in there profiles and everything seems fine, can anyone shed any light on this? Like I said just a few people so far have said something

Delw
you said the only place you allow polls is one forum....

do they have permission to vote in that forum?
Yes the have access to that forum, I even rebuilt all the member files.

That was the first thing I checked was the access.


Delw
ok, I'm gonna need access to that forum.
your accessed


Delw
fixed.

was not a bug with this mod, so no need to update
Thanks Ian

next time I guess I will read the junior member a little better. I was thinking it was members under 21 of age.

Thanks Again
Delw
Hi everyone,
I followed the steps to this mod and I am getting this error when I click to post the poll:
An error has occurred:

(RequireCodeNoINC) NonCGIPath/Templates/public_topic_page.pl: syntax error at NonCGIPath/Templates/public_topic_page.pl line 513, near ";="


I went over the install instructions twice and can't get rid of this error. Any ideas on what I am doing wrong?
=pod and =cut go on their own lines. try that
Does this work on 6.7.3? When I perform the hack I see no poll, the post is just blank.
it should work fine
© UBB.Developers