Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Bug reports and fixes
 
Pages: [1]
  Print  
Author Topic: Simple poll module at Elxis 4.1  (Read 301 times)
michalis1984
Full Member
***
Offline Offline

Posts: 127


WWW
« on: May 08, 2013, 14:13:46 »

The identity setting has 10 different possible selections. Does this means that i can have "only" 10 different polls at my site?

Also, the possible answers to a question are 10. Is it easy to change it to 12?
Logged
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 7601



WWW
« Reply #1 on: May 08, 2013, 18:01:20 »

This means that you have 10 polls per module instance. You can copy the module unlimited times for more polls.

To increase answers to 12 do the following.

Open file modules/mod_simplepoll/mod_simplepoll.php
go to line 49 and change this:
for ($i=1; $i<11; $i++) {
to this:
for ($i=1; $i<13; $i++) {
go to line 141 and change this:
for ($i=1; $i<11; $i++) {
to this:
for ($i=1; $i<13; $i++) {

Open file modules/mod_simplepoll/includes/ajax.php
go to line 39 and change this:
if (($id < 1) || ($id > 10)) {
to this:
if (($id < 1) || ($id > 12)) {

Open file modules/mod_simplepoll/includes/simplepoll.js
go to line 52 and change this:
for (var i=1; i<11; i++) {
to this:
for (var i=1; i<13; i++) {

Open file modules/mod_simplepoll/mod_simplepoll.xml
go to line 33 and add below this:
<param type="text" name="answer11" default="" dir="rtl" size="60" label="ANSWER" description="" />
<param type="text" name="answer12" default="" dir="rtl" size="60" label="ANSWER" description="" />


If you need more than 12 answers change the numbers accordingly.
Logged

Pages: [1]
  Print  
 
Jump to: