Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Looks slick, thanks laugh

I'm liking the latest look of your site, congrats on the refinement thumbsup


- Allen wavey
- What Drives You?
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: Sep 2001
Posts: 672
Member
Offline
Member
Joined: Sep 2001
Posts: 672
Nice hack, polls look much better that way laugh

I'll agree with Allen here and say your site kicks some ass wink

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Offline
Spotlight Winner
Joined: Jun 2001
Posts: 2,849
Very, very nice. I'm happy to see new ideas and old faces.

Sponsored Links
Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
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?


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
The very last step, instead of

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

$Footer_Popup
THAT_PAGE


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

}
do

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

$Footer_Popup
THAT_PAGE


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

}

Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
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


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
I'll need ftp access to your board to see what's wrong

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
Fixed.

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

Sponsored Links
Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
Thanks Ian!

One question:

Is it normal that after voting there is the old pollwindow and after closing it, the whole boardpage is closing?


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2000
Posts: 5,806
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,806
Likes: 10
leave it to ian to error a chmod on a mod which took so long to write wink ...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
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.

Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
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.


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
I said to redo the second step, not remove it entirely

Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
ooops, sorry laugh


Webmaster of d-talk & Kabel-Forum.com
Joined: May 2001
Posts: 684
Code Monkey
Offline
Code Monkey
Joined: May 2001
Posts: 684
Ian, what do I have to change, that it looks like at your board?


Webmaster of d-talk & Kabel-Forum.com
Joined: Jul 2003
Posts: 6
mmg Offline
Junior Member
Offline
Junior Member
Joined: Jul 2003
Posts: 6
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?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Offline
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394
Good job, very good job! laugh (although I liked it better when the colors were by the percentage and not by the order)

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: Dec 2001
Posts: 112
Member
Offline
Member
Joined: Dec 2001
Posts: 112
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

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
you said the only place you allow polls is one forum....

do they have permission to vote in that forum?

Joined: Dec 2001
Posts: 112
Member
Offline
Member
Joined: Dec 2001
Posts: 112
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

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
ok, I'm gonna need access to that forum.

Joined: Dec 2001
Posts: 112
Member
Offline
Member
Joined: Dec 2001
Posts: 112
your accessed


Delw

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
fixed.

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

Joined: Dec 2001
Posts: 112
Member
Offline
Member
Joined: Dec 2001
Posts: 112
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

Joined: Jul 2004
Posts: 18
Junior Member
Offline
Junior Member
Joined: Jul 2004
Posts: 18
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?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
=pod and =cut go on their own lines. try that

Joined: Sep 2000
Posts: 221
Member
Offline
Member
Joined: Sep 2000
Posts: 221
Does this work on 6.7.3? When I perform the hack I see no poll, the post is just blank.


This is the designed behavior.
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
it should work fine


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,546
Posts293,800
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 243
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 23
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,806
Greg Hard 4,625
Top Posters(30 Days)
isaac 6
Top Likes Received
isaac 45
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200921.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.104s Queries: 78 (0.045s) Memory: 3.5422 MB (Peak: 3.8765 MB) Data Comp: Zlib Server Time: 2020-09-23 12:06:59 UTC
Valid HTML 5 and Valid CSS