4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 22, 2018, 11:14:22 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 5 ... 12 » »» Print
This topic has not yet been rated!
Author Topic: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!  (Read 161903 times)
ascanio
Hero Member
*****
Offline Offline

Posts: 569

Thank You
-Given: 0
-Receive: 3


View Profile WWW
« on: March 17, 2005, 09:15:30 PM »

 Hello every one,,,
 MOD Poll this MOD was made by excitex2 in spanish I just translate the instructions and the admin.php, main.php language files.

     Arrow v1.0 (March 17, 2005, 10:07)
        - First release
          5 fixed options
          Panel of control
          Modification of the name, the options and the polls.
          Visualization of results
          Graph of results.
          Poll and I return the index

     Arrow v2.0 (March 31, 2005, 12:47)
        - Second release
          Personalizable
          10 variable options
          Panel of Control
          Modify the options, title and votes.
          Add new fields of options
          Erase fields of options.
          Save and to close poll
          Record of polls
          Erase previous polls
          Visualization of results
          Graph of results.
          Poll and come back to the page of results
          Menu of previous polls
          Option to restrict the access to the poll to users not registered
          Option to put term between votes.
          Format multi-language
          Annotations of minimal options.
          Warn of errors.


   Arrow DEMO: http://www.girlsandgirls.tk/
                 
                 
                 


MOD Poll v2.0

 Arrow Files to edit :
index.php
admin/backup.php
includes/constants.php
templates/<your templates>/home.html
lang/<your language>/admin.php
lang/<your language>/main.php

 Arrow New Files :
encuestas.php
encuestas_resultados.php
encuestas_histo.php
install_encuestas.php
admin/plugins/admin_encuestas.php
templates/<your templates>/encuestas.html
templates/<your templates>/encuestas_result.html
templates/<your templates>/encuestas_histo_result.html

 Arrow Othes Files
Groups of images for the poll graph.


 Arrow Instalation :

 - Easy, 10 minutes.

1º) Download the files from here << Here >>

2º) Unzip the file

3º) Upload these files to the root :
encuestas.php
encuestas_resultados.php
encuestas_histo.php
install_encuestas.php


4º) Upload to templates/<your templates> :
encuestas.html
encuestas_result.html
encuestas_histo_result.html


5º) Upload to templates/<your templates>/images
All the images

6º) Upload to admin/plugins
admin_encuestas.php

 Arrow Note: If you don't have a folder called plugings create one and put the files there

 Arrow Modifications :

Important!! : Do Not execute install_encuestas.php until not having realized the changes and upload the new files.

7º) Open File : admin/backup.php

Find:
1
COMMENTS_TABLE,
add after
1
ENCUESTAS_TABLE,
Save changes

8º) Open Files :   includes/constants.php

Find:
1
define('COMMENTS_TABLE', $table_prefix.'comments');
Add after
1
define('ENCUESTAS_TABLE', $table_prefix.'encuestas');
Save changes

9º) Open : index.php

Find
1
require(ROOT_PATH.'includes/sessions.php');
add after
1
include(ROOT_PATH.'encuestas.php');
Save changes

10º) Open templates/<your templates>/home.html

Add

1
<tr><td class="row2"><p align="center">{opci_encuestas}</td></tr>
whereever you want to place the poll

Save changes

11º) Open lang/<your language>/admin.php

Find:


add before :
[
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//-----------------------------------------------------
//------------------- Encuestas -----------------------
//-----------------------------------------------------
$lang['maximas_opciones'] = "10";
$lang['pregunta'] = "Name of the Poll :";
$lang['cerrar'] = "Close";
$lang['nueva_opcion'] = "New option";
$lang['nuevas_opciones'] = "new options";
$lang['cerrar_encuesta'] = "Close and Save";
$lang['borrar_opciones'] = "Delete options";
$lang['borrar_opcion'] = "Detete ";
$lang['add_opciones'] = "Add new optiones";
$lang['config_opciones'] = "Edit the number of options";
$lang['actualizar_encuestas'] = "Refresh Poll";
$lang['guardar_modificacion'] = "Save";
$lang['opcion'] = "Option";
$lang['control_encuestas'] = "Poll Control";
$lang['nombre_opcion'] = "Name of the option";
$lang['borrar_total'] = "Delete previous options";
$lang['actualizar_pagina'] = "Refresh page";
$lang['texto_visitas'] = "<b>You have modified the one who can vote in the poll, please updates the page </b>";
$lang['texto_guardar_modificacion'] = "<b>You have modified the poll, please it updates the page </b>";
$lang['texto_add_opcion'] = "<b>You have added news opciónes to the poll, please it updates the page  </b>";
$lang['texto_borrar_opciones'] = "<b>You have erased an option of the poll, please it updates the page  </b>";
$lang['texto_cerrar_encuestas'] = "<b>You have closed and saved the poll, and new ones has been created,
 please check the section </br><b><font color=\"FF0000\">Can vote </font></b> y <b><font color=\"FF0000\"> Time between the votes </font>
</b>,,, update the page  </b>";
$lang['texto_borrar_total'] = "<b>You have erased a previous poll of the record, please it updates the page </b>";
$lang['texto_aviso'] = "<b><font color=\"FF0000\">select an small quantity</font>It has been edit to".
"<font color=\"FF0000\">".$lang['maximas_opciones']."</font> options </b>";
$lang['texto_aviso_minimo'] = "<b><font color=\"FF0000\">You cannot erase any more options,</font> in order to be a poll, you have to have two options.</b>";
$lang['texto_aviso_total'] = "<b><font color=\"FF0000\">You have to choose a poll.</font></b>";
$lang['texto_pregunta'] = "Insert the name of the poll";
$lang['texto_opciones'] = "Insert the option";
$lang['visitas'] = "Can vote :";
$lang['aceptar'] = "Acept";
$lang['tiempo_votos'] = "Time between polls";
$lang['hora'] = "time";
$lang['dia'] = "day";
$lang['minutos'] = "minutes";
$lang['semana'] = "week";
$lang['semanas'] = "weeks";
$lang['mes'] = "month";

12º) Open lang/<your language>/main.php

Finde


Add before :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//---------------------------------------------------------------------------
// ------------------------------- Encuestas --------------------------------
//---------------------------------------------------------------------------
$lang['hora'] = date("H:i");
$lang['dia_semana'] = array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
$lang['dia'] = date("j");
$lang['mes'] = array("December","January","February","March","April","May","June","July","August","September","October","November");
$lang['anyo'] = date("Y");
$lang['fecha'] = $lang['dia_semana'][date('w')]." - ".$lang['dia']." of ".$lang['mes'][date("n")]." of ".$lang['anyo']." at ".$lang['hora'];
$lang['autorizacion'] = "To be able to vote in the poll, you have that register first";
$lang['titulo'] = "Poll name :";
$lang['opciones'] = "Options";
$lang['recibido'] = "has recived :";
$lang['cerrado'] = "and closed the :";
$lang['comienzo'] = "This poll began :";
$lang['anteriores'] = "Previous polls :";
$lang['visualizar'] = "See polls";
$lang['puntuacion'] = "Punctuation";
$lang['porcentaje'] = "Percentage";
$lang['grafica'] = "Graph";
$lang['texto_opiniones'] = "Today, the opinions are the following ones:";
$lang['texto_total'] = "have answered a total";
$lang['texto_pregunta'] = "To the question : ";
$lang['texto_titulo'] = "Polls - Opinions";
$lang['texto_titulo_anteriores'] = "Polls - Opinions - Previous";
$lang['maximas_opciones'] = 10;
$lang['usuarios'] = "users";
$lang['encuestas'] = "Polls";
$lang['opinar'] = "Vote";
$lang['plazo_voto'] = "<p><b><font color=\"#FF0000\">No</font> You cannot submit another vote, have voted recently</b></p>";

OBSERVATIONS : This version is much more completed than the previous version, on having been more complex I have turned out to be the table of the data base forced to remake themr, in the previvious version was sequential and now it is linear to assume the record of the polls, therefore the users who have the version 1.0, they will have to erase the previous table as well as the files that do not coincide with this version, having present that, before erasing the information of the data base, from the panel of control to do a copy to hand of result of the poll and to introduce it manually in the new version, (they are not so manyr, they are 5 options and 5 polls).

Finally execute the install_encuestas.php , then go  to the panel of control and to enter the information of the form of the polls.


excitex2


* poll.zip (21.5 KB - downloaded 821 times.)
« Last Edit: March 17, 2005, 10:07:12 PM by Chris » Logged
b.o.fan
Sr. Member
****
Offline Offline

Posts: 314

Thank You
-Given: 4
-Receive: 2


View Profile WWW
« Reply #1 on: March 17, 2005, 11:50:39 PM »

great mod. but in german? or in english??

b.o.fan
Logged

www.wartenaufden15.de
i m using 1.78
ascanio
Hero Member
*****
Offline Offline

Posts: 569

Thank You
-Given: 0
-Receive: 3


View Profile WWW
« Reply #2 on: March 18, 2005, 12:39:58 AM »

The MOD has been translated to English
Logged
b.o.fan
Sr. Member
****
Offline Offline

Posts: 314

Thank You
-Given: 4
-Receive: 2


View Profile WWW
« Reply #3 on: March 18, 2005, 01:26:38 AM »

on monday i post my files with the german language!

an sometimes the english...

happy weekend   Cool Cool Cool

@ascanio
i think it would be cool, if the user can see the result of his vote in the result_encuestas.php. and somethink like a IP-barrier:?:  Wink the rest of the mod is VERY good Exclamation  Mr. Green Very Happy Mr. Green
Logged

www.wartenaufden15.de
i m using 1.78
ascanio
Hero Member
*****
Offline Offline

Posts: 569

Thank You
-Given: 0
-Receive: 3


View Profile WWW
« Reply #4 on: March 18, 2005, 11:40:03 PM »

Logged
JensF
Addicted member
******
Offline Offline

Posts: 1028

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #5 on: March 19, 2005, 12:21:18 AM »

Hi there,

thanks for this but what must i change to come to the Results after Vote.

Now i Vote and then load the index.php but i want after load the result Page...

And another

When you go to this -> http://www.terraristik-galerie.de/result_encuestas.php then you see that the Grafik is bigger by 0 Percent then by 1,75 Percent. What is wrong???

And in the ACP i have the Button Actualizar encuestas. What is the function? I see no changes when i click on it....
Logged

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-
ascanio
Hero Member
*****
Offline Offline

Posts: 569

Thank You
-Given: 0
-Receive: 3


View Profile WWW
« Reply #6 on: March 19, 2005, 02:18:22 AM »

I did not made the MOD I just translate it to english ... I don't know how to redirect the vote to results vote the Button Actualizar encuestas means Refresh Poll and what it does is to refresh the data when u have change the results in your admin panel
Logged
excitex2
Addicted member
******
Offline Offline

Posts: 1589

Thank You
-Given: 0
-Receive: 4

He desactivado la galería y el buscador


View Profile
« Reply #7 on: March 19, 2005, 02:23:29 AM »

Saludos,,, / Grüsse,,,

localizar en / suchen in : /templates/tus_templates/encuestas.html

Quote  [Expand]
<form method="post" action="">

modificar a  / verändern zu :

Quote  [Expand]
<form method="post" action="result_encuestas.php">

excitex2
Logged

Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe
JensF
Addicted member
******
Offline Offline

Posts: 1028

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #8 on: March 19, 2005, 02:38:03 AM »

Saludos,,, / Grüsse,,,

localizar en / suchen in : /templates/tus_templates/encuestas.html

Quote  [Expand]
<form method="post" action="">

modificar a  / verändern zu :

Quote  [Expand]
<form method="post" action="result_encuestas.php">

excitex2




Thanks but when i do this they count no Vote. I click Vote and come to the results but i see no Vote..... Sad
Logged

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-
syndrom
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #9 on: March 19, 2005, 05:27:12 AM »

nice mod, thanks for it! Smile
as b.o.fan said - it would be really nice when a user can only vote once (cookie and or IP).
Logged



excitex2
Addicted member
******
Offline Offline

Posts: 1589

Thank You
-Given: 0
-Receive: 4

He desactivado la galería y el buscador


View Profile
« Reply #10 on: March 19, 2005, 06:04:47 PM »

Saludos,,, / Grüsse,,,

localizar en / suchen in : encuestas.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$site_template->register_vars($register_array);
$cont=1;


if ($control == ok) {

if ($eleccion == resultado1)
{
$opci_control = 1;
}
else
if ($eleccion == resultado2)
{
$opci_control = 2;
}
else
if ($eleccion == resultado3)
{
$opci_control = 3;
}
else
if ($eleccion == resultado4)
{
$opci_control = 4;
}
else
if ($eleccion == resultado5)
{
$opci_control = 5;
}

$register_array = array();
 $sql = "UPDATE ".ENCUESTAS_TABLE."
         SET votos = votos + 1
  WHERE opci_nombre = '$opci_nombre[$opci_control]'";
$site_db->query($sql);
}

$site_template->register_vars("opci_encuestas", $opci_encuestas);
?>

modificar a  / verändern zu :

1
2
3
4
$site_template->register_vars($register_array);
$cont=1;
$site_template->register_vars("opci_encuestas", $opci_encuestas);
?>

localizar en / suchen in : result_encuestas.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$sql = "SELECT *
           FROM ".ENCUESTAS_TABLE." 
          ORDER  BY opci_nombre";
$result = $site_db->query($sql);

$encuesta_cache = array();
while ($row = $site_db->fetch_array($result)) {
$maximo = $contador;
$opci_nombre[$contador] = $row["opci_nombre"];
$opci_valor[$contador] = $row["opci_valor"];
$votos[$contador] = $row["votos"];
$total_votos = $total_votos + $votos[$contador];
$contador++;
}

modificar a  / verändern zu :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$sql = "SELECT *
           FROM ".ENCUESTAS_TABLE." 
          ORDER  BY opci_nombre";
$result = $site_db->query($sql);

$encuesta_cache = array();
while ($row = $site_db->fetch_array($result)) {
$maximo = $contador;
$opci_nombre[$contador] = $row["opci_nombre"];
$opci_valor[$contador] = $row["opci_valor"];
$votos[$contador] = $row["votos"];
$total_votos = $total_votos + $votos[$contador];
$contador++;
}


if ($control == ok) {

if ($eleccion == resultado1)
{
$opci_control = 1;
}
else
if ($eleccion == resultado2)
{
$opci_control = 2;
}
else
if ($eleccion == resultado3)
{
$opci_control = 3;
}
else
if ($eleccion == resultado4)
{
$opci_control = 4;
}
else
if ($eleccion == resultado5)
{
$opci_control = 5;
}
$register_array = array();
 $sql = "UPDATE ".ENCUESTAS_TABLE."
          SET votos = votos + 1
  WHERE opci_nombre = '$opci_nombre[$opci_control]'";
$site_db->query($sql);

$contador = 0;
$cont = 1;

$sql = "SELECT *
           FROM ".ENCUESTAS_TABLE." 
          ORDER  BY opci_nombre";
$result = $site_db->query($sql);

$encuesta_cache = array();
while ($row = $site_db->fetch_array($result)) {
$maximo = $contador;
$opci_nombre[$contador] = $row["opci_nombre"];
$opci_valor[$contador] = $row["opci_valor"];
$votos[$contador] = $row["votos"];
$total_votos2 = $total_votos2 + $votos[$contador];
$contador++;
}
$total_votos = $total_votos2;
}

excitex2
Logged

Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe
JensF
Addicted member
******
Offline Offline

Posts: 1028

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #11 on: March 19, 2005, 10:53:03 PM »

Hi,

what do this Code????

I have searched in my encuestas.php and i don´t have this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$site_template->register_vars($register_array);
$cont=1;

if ($control == ok) {
while ($contar <= $maximo) {

if ($eleccion == $contar){
$opci_control = $contar;
}
$contar++;
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
         SET votos = votos + 1
  WHERE opci_nombre = '$opci_nombre[$opci_control]'";
$site_db->query($sql);
}

$site_template->register_vars("opci_encuestas", $opci_encuestas);
?>

I have this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$site_template->register_vars($register_array);
$cont=1;

if ($control == ok) {

if ($eleccion == resultado1)
{
$opci_control = 1;
}
else
if ($eleccion == resultado2)
{
$opci_control = 2;
}
else
if ($eleccion == resultado3)
{
$opci_control = 3;
}
else
if ($eleccion == resultado4)
{
$opci_control = 4;
}
else
if ($eleccion == resultado5)
{
$opci_control = 5;
}

$register_array = array();
 $sql = "UPDATE ".ENCUESTAS_TABLE."
          SET votos = votos + 1
  WHERE opci_nombre = '$opci_nombre[$opci_control]'";
$site_db->query($sql);
}

$site_template->register_vars("opci_encuestas", $opci_encuestas);
?>
Logged

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-
excitex2
Addicted member
******
Offline Offline

Posts: 1589

Thank You
-Given: 0
-Receive: 4

He desactivado la galería y el buscador


View Profile
« Reply #12 on: March 19, 2005, 11:25:43 PM »

Regards,,

Pedón for my English, I use a translator of the net.

 I sit the mistake, the code that I have put is of the new version that is I appear of going out. Already it is corrected
 The new version has a more complete great ACP and several options more to be able to form to our needs.
 The new version goes again:
  add fields
  remove fields
  save poll
  erase poll
 Record Poll ancient
 Etc, etc,

Excitex2
Logged

Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe
JensF
Addicted member
******
Offline Offline

Posts: 1028

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #13 on: March 19, 2005, 11:34:15 PM »

Where i can find the new version??? Can i test it???
Logged

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-
excitex2
Addicted member
******
Offline Offline

Posts: 1589

Thank You
-Given: 0
-Receive: 4

He desactivado la galería y el buscador


View Profile
« Reply #14 on: March 19, 2005, 11:43:19 PM »

Regards,,,

The new version will not be ended up to the next week.

excitex2
Logged

Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe
Pages: [1] 2 3 4 5 ... 12 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.058 seconds with 19 queries.