Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 11, 2012, 11:06:16 AM
1 Hour
1 Day
1 Week
1 Month
Forever
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
.
149540
Posts in
21090
Topics by
7554
Members
Latest Member:
cwsoft
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
AJAX Poll
Pages: [
1
]
Go Down
Author
Topic: AJAX Poll (Read 8855 times)
Insa
Offline
Posts: 17
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
Offline
Posts: 230
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
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
Offline
Posts: 17
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
Offline
Posts: 230
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
Offline
Posts: 17
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
Offline
Posts: 353
Re: AJAX Poll
«
Reply #6 on:
November 27, 2007, 04:41:55 PM »
post code in forum....
Logged
Beppi
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
Offline
Posts: 2077
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
stories about
be part of the Tutorials-Project
visit the jQuery-Showroom
tu.sha
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
Offline
Posts: 8
Re: AJAX Poll
«
Reply #10 on:
April 28, 2008, 11:11:07 AM »
The russian link you provided is not working.
Anywhere else I can download the zip file?
Tanx!!!
Logged
Pitti
Offline
Posts: 16
Re: AJAX Poll
«
Reply #11 on:
April 28, 2008, 02:50:01 PM »
look at the signatur from tomhung
Logged
aimeeish
Offline
Posts: 28
Re: AJAX Poll
«
Reply #12 on:
April 29, 2008, 04: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
Offline
Posts: 16
Re: AJAX Poll
«
Reply #13 on:
July 24, 2008, 01: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
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 websitebaker 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
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...