Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 06:05:14 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149667 Posts in 21100 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: 1 [2] 3 4   Go Down
Print
Author Topic: POLL Module  (Read 32778 times)
wwwMARKLEYcouk

Offline Offline

Posts: 288


WWW
« Reply #25 on: March 07, 2006, 04:09:27 PM »

so is this a:

Yes?
No?
Not Interested?

Smiley
Logged

pcwacht
Guest
« Reply #26 on: March 07, 2006, 07:08:01 PM »

Not sure...

if there are more requests maybe I will tinker with it once more

For the meantime, there is no way to keep old polls


John
Logged
Bar

Offline Offline

Posts: 20


« Reply #27 on: March 09, 2006, 09:46:52 AM »

I want to use the poll module but i have two questions about it. I want to change the poll every week, reset it and change the items.
How does this work? And is it possible to save the results of the poll so i can make a page where the old poll can been seen?

Bar
Logged
pcwacht
Guest
« Reply #28 on: March 09, 2006, 10:47:26 AM »

1 - simple edit in admin

2 - nope

workaround,
for 1 - create new pages with new polls and use the new poll when needed
for 2, this  poll doesn't have the option to show only the results, just copy paste the poll output in a wysiwyg area

John
Logged
Bar

Offline Offline

Posts: 20


« Reply #29 on: March 09, 2006, 01:20:47 PM »

Thanks pcwacht for your answer.

Bar
Logged
vunz

Offline Offline

Posts: 3


« Reply #30 on: March 26, 2006, 10:06:23 PM »

Hi

I have a problem with this poll, maybe somebody can tell me what i do wrong?

I installed te the polls.zip in to wb.  and I made a include to my index.php to show the poll into my template. The poll is also on my page. But when i change the poll into another question it is gone?!? It is still under my menu, but is not included anymore.

Tell me what i do wrong?
Logged
tarco

Offline Offline

Posts: 1


« Reply #31 on: March 30, 2006, 10:56:46 PM »

Hi.. nice Module. Thx to the author!

Question:

i want the module to run under the menue. (is use the ROUND Template). The Menu is on the left side.
Is that possible? If yes - what have i to do exacktly? Thanx for your help!

my site: www.musichall-oppau.de

Greetz,
André


Hi,
how did you include this poll your website? What is right code, that poll is included every page.
index.php  --> <div class="poll"> <?php page_content(page_id);?></div> this not work

somebody can help me?
Logged
sluuz

Offline Offline

Posts: 1


« Reply #32 on: April 02, 2006, 11:40:35 AM »

I would like to know that too. I tried several different things, but I was unable to find the correct code to place a poll in my side menu...

http://www.jbzmeer.nl/site

EDIT: OK, i've found out what the solution was (put that long piece of code in a .php file and put <?php above it and ?> beneath it, then include this file in the file where you want your poll).

But now I have an even bigger problem. On my Home-page, it all works fine, but if I switch to another page using my main menu, I get the following error:


Fatal error: Cannot redeclare menu() (previously declared in /usr/local/home/jbz/domains/jbzmeer.nl/public_html/site/templates/greenery/menu_functions.php:44) in /usr/local/home/jbz/domains/jbzmeer.nl/public_html/site/templates/greenery/menu_functions.php on line 44

(my template is Greenery)
« Last Edit: April 02, 2006, 12:07:34 PM by sluuz » Logged
Silverlotus

Offline Offline

Posts: 2


« Reply #33 on: December 20, 2006, 01:24:09 AM »

All links to this module don't work.  Is there some place I can download it?
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7663



WWW
« Reply #34 on: December 20, 2006, 05:25:22 AM »

Hello,

so this modul seems to be outdated and because of this i think it doesn't support WB 2.6.4 without changes. So if someone post you a link, it could be you got errors while installing and using this modul.

Matthias
Logged
doc
Guest
« Reply #35 on: February 09, 2007, 05:42:28 PM »

Hi,

the latest POLL module (v1.1) is available on the external homepage of a WB developer (rsmith). The latest version fixes some issues of the previous version. Have contacted Rob to find out what the status of the module is and if we can release it on the addons repository. If someone wants to give it a try, just follow the link to Robs homepage.


Regards Christian

[EDIT 10. Feb. 2007]
Attached the latest version of the poll module from Robs homepage. Once the testing is complete and the module is found to be stable enough, it will be added to the addons repository.
« Last Edit: February 10, 2007, 04:51:41 PM by doc » Logged
evildmp

Offline Offline

Posts: 64


« Reply #36 on: February 14, 2007, 10:28:01 PM »

the latest POLL module (v1.1) is available on the external homepage of a WB developer (rsmith). The latest version fixes some issues of the previous version. Have contacted Rob to find out what the status of the module is and if we can release it on the addons repository. If someone wants to give it a try, just follow the link to Robs homepage.

I've just tried version 1.1. On my site,  after very brief testing, I find that as well as buttons the poll creates links for each option in the poll which don't work (takes the user straight back to the site's home page). This could be a peculiarity of my site/system though - for some reason, I can't call pages by page_id.

Although you can have multiple sections and therefore multiple polls, pressing the Vote button only records the choice made in that particular section; the others are ignored.

What I'm looking for is a poll with several multiple-choice questions and one Vote button at the end.

Daniele
« Last Edit: February 18, 2007, 11:48:32 PM by evildmp » Logged
doc
Guest
« Reply #37 on: February 15, 2007, 11:33:11 AM »

Hallo,

I am currently checking out some free Poll systems (GPL) which could handle multiple pools. If anybody nows a good poll script, let me know. I would try to convert it to a WB module.
Only interested in scripts released under GNU GPL.

Regards Christian
Logged
box

Offline Offline

Posts: 3


« Reply #38 on: June 04, 2007, 04:14:04 PM »

Great job on the module!

Is there a way to allow multiple responses, ie, using check boxes instead of bullets? I'm using the poll to ask visitors which movies they like and it would be nice for them to be able to select more than one at a time.

Many thanks for the great work.
« Last Edit: June 04, 2007, 10:51:15 PM by box » Logged
carl.batliner

Offline Offline

Posts: 18



WWW
« Reply #39 on: July 14, 2007, 02:32:42 PM »

Hi there

I added (uploaded) the poll module in the admin interface
Than I called it in my template, according to the codes given in the post
I know that I should modify some stuff but I did not understand what how I should modify it???

With the current version I get an error

what would I have to change?

Quote
<?php
poll_id=1;   // **** change this *****

// the rest shouldn't be altered..

$show_poll=$_REQUEST['show'];
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_polls WHERE poll_id = '$poll_id'");
$poll_data = $query_content->fetchRow();
$txt_vote = $poll_data['txt_vote'];
$txt_voted = $poll_data['txt_voted'];
$txt_picture = WB_URL."/modules/polls/".$poll_data['txt_picture'];
$txt_nopolls = $poll_data['txt_nopolls'];
$txt_results = $poll_data['txt_results'];
$poll_id = $poll_data['poll_id'];
if($query_content->numRows() > 0) {                            # If there is a poll
    $fetch_content = $query_content->fetchRow();
    $ip = $_SERVER['REMOTE_ADDR'];                             # Check for voted allready
    $data = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_polls_votes  WHERE `vote_ip` = '" . $ip . "' AND `poll_id` = '" . $poll_id . "' AND `vote_datum` > '" . time() . "'" );
    $datapoll = $data->fetchRow();

    if ((!$_POST['vote']) && (!$datapoll) && (!$show_poll)) {  # Check if form submitted and not voted yet and no request to show results!
        $options = explode(",", $poll_data['poll_keuzes']);    # Split options and count them in loop
           $aant = count($options)-1;
           $poll .= "<center>".$poll_data['poll_stelling']."</center><br />" ;
           $poll .= "<form method=\"POST\" action=\"" . $_SERVER['PHP_SELF'] . "\">";
        for($i = 0; $i <= $aant; $i++) {                       # Loop and make input radios 
            $j = $i+1;
            $poll .= "<input type=\"radio\" value=\"" . $j . "\" name=\"poll\" />" . $options[$i] . "<br />";
           }
        $poll .= "<br /><center><input type=\"submit\" class=\"button\" name=\"vote\" value=\"$txt_vote\" /></center></form>";
        $poll .= "<center><a href=\"".$_SERVER[PHP_SELF]."?show=1\">".$txt_results."</a></center>";
        echo $poll;
    } else {                                                   # Add data to database and check for a value
           if($_POST['poll']) {                                   # Option selected - Update votes
               $vote=$_POST['poll'];
               $stemmen = explode(",", $poll_data['poll_scores']);# Split the vote scores
               $vote--;                                       
               (int) $stemmen[$vote]++;                           # add one to the selected option 
               $stem = implode(",", $stemmen);                    # Remake the data and add to database
               $poll_data['poll_scores']=$stem;
               $database->query("UPDATE ".TABLE_PREFIX."mod_polls SET `poll_scores` = '" . $stem . "' WHERE `poll_id` = '" . $poll_data['poll_id'] . "'");
            $date_time = time()+($poll_data['poll_ttl']*60*60);
            $database->query("INSERT INTO ".TABLE_PREFIX."mod_polls_votes SET `vote_ip` = '" . $ip . "',`poll_id` = '" . $poll_data['poll_id'] . "', `vote_datum` = '" . $date_time . "'");
               # Make sure to show poll
            $datapoll="1" ;
           }
    }
    if(($datapoll) || ($show_poll)) {                          # If allready voted or requested show results
        $options = explode(",", $poll_data['poll_keuzes']);    # Split options and scores
        $scores = explode(",", $poll_data['poll_scores']);
        $option = count($options)-1;
        $votes = array_sum($scores);                           # Count the votes and show them
        $results .= "<center>".$poll_data['poll_stelling']."</center><br />";
        $results .= "<p>";
        for($i = 0;$i <= $option; $i++) {                      # Loop through results
            $results .= $options[$i] . "<br />";
            if ($votes>0) {
                $num = (int) ($scores[$i] / ($votes/100)) ;
            } else {
                $num=0;
            }
            $results .= "<img src=\"".$txt_picture."\" width=\"" . $num/2 . "\" height=\"10\" /> " . $num . "%";
            $results .= "<br />";
        }
        $results .= "</p>";
        $results .= $txt_voted . $votes . "<br />";
        echo $results;             
    }
} else {                                                       # No polls!
    echo $txt_nopolls;
}
?>
</div>
Logged

Keep Rocking and Rolling
andyzippo

Offline Offline

Posts: 3


« Reply #40 on: December 30, 2007, 04:22:42 PM »

Hi there.

I've downloaded version 1.1, installed it and created a test poll...i voted and then refreshed the page and agreed to send the post data again. Guess what happened...another vote was added to the answer I voted for...and this goes on for as long as i keep refreshing the page.

I use Firefox 2.0.0.11 under Ubuntu 7.10 and WebsiteBaker 2.6.7. I haven't tried it using other browsers, but this is a real problem...is there a way to fix this? I've read the posts before this and i thought that this was fixed...or did i miss something?
Logged
lausianne
WebsiteBaker Org e.V.

Offline Offline

Posts: 139


WWW
« Reply #41 on: January 04, 2008, 03:18:35 PM »

Same problem for me. It counts another vote whenever I refresh the page. Otherwise a cool module. Any idea how to fix it? Thanks!

Cheers, Ralf.


080704: Still no solution ...
« Last Edit: July 04, 2008, 05:02:03 PM by lausianne » Logged
durao

Offline Offline

Posts: 8


« Reply #42 on: April 28, 2008, 11:05:56 AM »

Hey Sad
I see no link for the zip file...
Where can I download it?

Cheers tongue
Logged
doc
Guest
« Reply #43 on: April 28, 2008, 11:11:42 AM »

Hello,

one needs to be logen into the forum to see file attachments.

Christian
Logged
durao

Offline Offline

Posts: 8


« Reply #44 on: May 22, 2008, 04:08:40 PM »

Hey Christian...
If I am posting here it's because I AM LOGGED!!!  huh
Logged
maxxis

Offline Offline

Posts: 30


« Reply #45 on: June 04, 2008, 10:29:01 AM »

Is anybody else getting :

Quote
XML Parsing Error: mismatched tag. Expected: </head>.
Location: http://localhost/ssi_intranet/pages/intranet-home.php
Line Number 34, Column 3:</style>
--^

with WB 2.7 ?
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7663



WWW
« Reply #46 on: June 04, 2008, 11:28:53 AM »

Hello,

check your template. Seems that the index.php is buggy.

Matthias
Logged
maxxis

Offline Offline

Posts: 30


« Reply #47 on: June 04, 2008, 01:30:30 PM »

Thanks

Had a look at the code and found a missing <style> tag

Still not working

XML Parsing Error: not well-formed
Location: http://localhost/ssi_intranet/
Line Number 242, Column 218:    font-weight: bold; display:inline;font-size:11px; margin-lef....

Worked fine on 2.6.x
Logged
chio
WebsiteBaker Org e.V.

Offline Offline

Posts: 2264


« Reply #48 on: June 04, 2008, 01:45:46 PM »

Does your Template have a xhtml strict DocType?
Logged

*weg*
maxxis

Offline Offline

Posts: 30


« Reply #49 on: June 04, 2008, 03:00:04 PM »

Not that I can see.

Im using:

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php page_title(); ?></title>

Logged
Pages: 1 [2] 3 4   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!