Start
Help
Forum
Addons
Project
Welcome,
Guest
. Please
login
or
register
.
July 05, 2009, 02:55:52 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Willst du dem Website Baker Team beitreten?
Nähere Informationen findest du
hier
und auf unserer
Startseite
.
85291
Posts in
13125
Topics by
8214
Members
Latest Member:
Nebz
Website Baker Community Forum
English
Modules
(Moderators:
Argos
,
BerndJM
)
AJAX Poll
Pages:
[
1
]
Author
Topic: AJAX Poll (Read 6159 times)
Insa
Pending Apprentice Baker
Offline
Posts: 13
AJAX Poll
«
on:
November 02, 2007, 11:53:41 AM »
Hi!
I present new module: AJAX Poll v1.0.
All bugs pls send this topic. All translate files pls send too.
Demo:
http://www.unlabeled.ru
Download:
http://www.wb.unlabeled.ru/ajax_poll_v1.02.zip
Good reason use this module with
http://forum.websitebaker.org/index.php/topic,7574.0.html
If you want use personal template, you may change default template settings or create file ajax_poll.php in template directory and paste this default text:
P/S/ Sorry my english. From Russia with love.
Code:
<?php
/*****************************************
VARS:
[QUESTION] - Poll question
[TOTAL_COL] - Total votes
[ANSWER] - Answer
[ANSWER_ID] - ID Answer
[ANSWER_NUM] - Number answer
[COL] - Votes
[PERSENT] - Persents
TEXT LOCALE VARS:
[TEXT_QUESTION] - Text 'Question'
[TEXT_ANSWER] - Text 'Answer'
[TEXT_POLL] - Text 'Poll'
[TEXT_COL] - Text 'Votes'
[TEXT_PERSENT] - Text 'Persents'
[TEXT_TOTAL_COL] - Text 'Total votes'
[TEXT_VIEW_RESULTS] - Text 'View results'
[TEXT_RESULTS] - Text 'Results'
[TEXT_REVOTE] - Text 'Revote'
[TEXT_VOTE] - Text 'Vote'
********************************************/
/*FORM*/
$template_header
=
"
<style>
.question {
font-size: 12px;
color: #003366;
}
.answer {
font-size: 10px;\n
color: #336699;\n
}
</style>
<h2>[TEXT_POLL]</h2>
<b><div class=\"question\">[QUESTION]</div></b>
"
;
$template_loop
=
"<input type=\"radio\" name=\"ajax_poll_answer\" id=\"ajax_poll_answer_[ANSWER_NUM]\" style=\"width: 14px; height: 14px;\" value=\"[ANSWER_ID]\" onClick=\"select_answer(this.value)\" />\n<label for=\"ajax_poll_answer_[ANSWER_NUM]\" class=\"answer\">[ANSWER]</label><br />\n"
;
$template_footer
=
"<input type=\"button\" value=\"[TEXT_VOTE]\" onclick=\"vote_ajax_poll();\" style=\"width: 117px; margin-top: 5px;\" />\n"
;
/*RESULTS*/
$template_result_header
=
"<style>
.question {
font-size: 12px;
color: #003366;
}
.revote {
font-size: 11px;
color: #003366;
}
.answer {
font-size: 10px;\n
color: #336699;\n
}
</style>
<h2>[TEXT_POLL]</h2>
<b><div class=\"question\">[QUESTION]</div></b><br/>"
;
$template_result_loop
=
"<div class=\"answer\">[ANSWER_NUM].[ANSWER] ([PERSENT]%)</div>
<table width=\"[PERSENT]%\"><tr><td bgcolor=\"#999999\"></td></tr></table>"
;
$template_result_footer
=
"<div class=\"answer\">[TEXT_TOTAL_COL]: [TOTAL_COL]</div>"
;
if (
$ajax_poll_revote
){
$template_result_footer
.=
"<br/><a href=\"javascript: revote_ajax_poll();\" class=\"Revote\">[TEXT_REVOTE]</a>"
;}
?>
«
Last Edit: November 02, 2007, 11:12:50 PM by Insa
»
Logged
macsmet
Junior Baker
Offline
Posts: 111
Re: AJAX Poll
«
Reply #1 on:
November 02, 2007, 12:40:52 PM »
Hi, Working on a Dutch translation right now.
Installed it and that looks OK.
Got this error in my browser:
Parse error: syntax error, unexpected $end in .../modules/ajax_poll/view.php on line 324
Logged
Eki
Documentation Team
Junior Baker
Offline
Posts: 108
Re: AJAX Poll
«
Reply #2 on:
November 02, 2007, 01:29:26 PM »
Had a very quick look over it. I think that line 46:
Code:
if (!isset($poll_answer_id)){$poll_answer_id=$_GET['poll_answer_id'];
Should become:
Code:
if (!isset($poll_answer_id)){$poll_answer_id=$_GET['poll_answer_id'];}
(the bracket at the end)
But then there is still no output
Also one other question: The page's template can be changed via the page-settings. Why specify the template again in the Modify Page screen?
«
Last Edit: November 02, 2007, 01:31:54 PM by Eki
»
Logged
Insa
Pending Apprentice Baker
Offline
Posts: 13
Re: AJAX Poll
«
Reply #3 on:
November 02, 2007, 01:56:35 PM »
Quote from: Eki on November 02, 2007, 01:29:26 PM
Code:
if (!isset($poll_answer_id)){$poll_answer_id=$_GET['poll_answer_id'];}
I have corrected this mistake
For the given module the personal pattern, as in the module of news is used
Logged
macsmet
Junior Baker
Offline
Posts: 111
Re: AJAX Poll
«
Reply #4 on:
November 02, 2007, 02:27:06 PM »
Yes, that did it!
I tested the end date/time function but that doesn't work.
After saving the page it is not saved.
And what about vote again?
How does it work? I voted and cannot vote again on my poll.
The same for vote anonymous?
greetings,
MacSmet
«
Last Edit: November 02, 2007, 02:33:29 PM by macsmet
»
Logged
Insa
Pending Apprentice Baker
Offline
Posts: 13
Re: AJAX Poll
«
Reply #5 on:
November 02, 2007, 11:10:38 PM »
Quote from: macsmet on November 02, 2007, 02:27:06 PM
I tested the end date/time function but that doesn't work.
After saving the page it is not saved.
Thx, i fix this bug and upload new version.
Quote from: macsmet on November 02, 2007, 02:27:06 PM
And what about vote again?
How does it work? I voted and cannot vote again on my poll.
The same for vote anonymous?
If you want vote again, add next string to template results footer:
<br /><a href="javascript: revote_ajax_poll();">[TEXT_REVOTE]</a>
Logged
tomhung
Master Baker
Offline
Posts: 353
Re: AJAX Poll
«
Reply #6 on:
November 27, 2007, 04:41:55 PM »
post code in forum....
Logged
Beppi
Pending Apprentice Baker
Offline
Posts: 8
Re: AJAX Poll
«
Reply #7 on:
February 07, 2008, 07:21:02 PM »
Are there any news about this module?
I need it and it looks like sometimes it works, other times it doesn't display, and generally doesn't show as section.
Thanks.
Logged
erpe
A Baker's Baker
Offline
Posts: 1067
Re: AJAX Poll
«
Reply #8 on:
February 15, 2008, 05:33:25 PM »
I installed the module Version 1.02 today and translated it into German.
It works with 1 exception: the poll question is not be displayed.
But it seems to work in all other parts (not in the time and Date setting, I think only the "year" ist still functioning)
Is there anyone, who can help in case of displaying the Question?
Thanks for helping.
Logged
If YOU want to help children in Guatemala, please visit:
von Brauck Foundation
Looking for modules?:
All Modules And Snippets Project (AMASP)
tu.sha
Pending Apprentice Baker
Offline
Posts: 6
Re: AJAX Poll
«
Reply #9 on:
March 22, 2008, 06:23:23 PM »
and how to call it from somewhere? not from page_content(); ?
Logged
durao
Pending Apprentice Baker
Offline
Posts: 8
Re: AJAX Poll
«
Reply #10 on:
April 28, 2008, 12:11:07 PM »
The russian link you provided is not working.
Anywhere else I can download the zip file?
Tanx!!!
Logged
Pitti
Pending Apprentice Baker
Offline
Posts: 16
Re: AJAX Poll
«
Reply #11 on:
April 28, 2008, 03:50:01 PM »
look at the signatur from tomhung
Logged
aimeeish
Pending Apprentice Baker
Offline
Posts: 28
Re: AJAX Poll
«
Reply #12 on:
April 29, 2008, 05:18:57 AM »
I installed this via tomhung's sig. I got this:
XML Parsing Error: mismatched tag. Expected: </br>.
Location: ****
Line Number 34, Column 3:</td>
--^
Logged
Dreams
Pending Apprentice Baker
Offline
Posts: 16
Re: AJAX Poll
«
Reply #13 on:
July 24, 2008, 02:39:42 AM »
It was hard for me to keep up and figure all of this out, but.. I am trying to hold a pageant, and want to use a poll for part of the judging. (public participation).
Id like to find a way to use a gallery mod, where people can click on the contestants picture, and have it open to a full bio, contest pictures, and a poll (1-10) where they can rate them.
Do you know which mods I could use for this? The less work I have to do adding information, pictures etc, the better..lol
Thank you so m uch.
Logged
coldman
First-Time Baker
Offline
Posts: 1
Re: AJAX Poll
«
Reply #14 on:
March 20, 2009, 04:56:30 PM »
I have error
Code:
This page contains the following errors:
error on line 110 at column 104: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.
I'm used Website Baker Version 2.7 and this ajax_poll_v1.02.zip
I see source, but in line 110 on view.php is all ok.
Do you know what is wrong?
p.s Sorry for my English
Logged
Pages:
[
1
]
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Announcements
===> Security Announcements
=> Guest Area and Off-Topic
=> Website Showcase
-----------------------------
English
-----------------------------
=> Help/Support
===> Help/Support of WB2.7.x core
=> Website Baker Development
===> Website Baker 3
=> Documentation
=> Templates
=> Modules
===> Code Snippets
=> Languages
=> Archive
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Hilfe/Support
===> Templates, Module & Co.
===> Hilfe/Support von WB2.7.x core
=> Diskussion über WB
===> jQuery
=> Off-Topic
=> Archiv
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Help / Support
===> WB Core
===> Templates, Modules & Languages
=> WB Discussie
=> Niet-Terzake (Off Topic)
-----------------------------
French
-----------------------------
=> Help/Support
-----------------------------
Italian
-----------------------------
=> Help/Support
Loading...