4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: ascanio 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/
(http://members.cox.net/jaime/poll1.jpg)
(http://members.cox.net/jaime/poll2.jpg)
(http://members.cox.net/jaime/poll3.jpg)
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 >> (http://personal.telefonica.terra.es/web/excitex3/encuestas_v_2.zip)
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:
COMMENTS_TABLE,
add after
ENCUESTAS_TABLE,
Save changes
8º) Open Files : includes/constants.php
Find:
define('COMMENTS_TABLE', $table_prefix.'comments');
Add after
define('ENCUESTAS_TABLE', $table_prefix.'encuestas');
Save changes
9º) Open : index.php
Find
require(ROOT_PATH.'includes/sessions.php');
add after
include(ROOT_PATH.'encuestas.php');
Save changes
10º) Open templates/<your templates>/home.html
Add
<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 :
[//-----------------------------------------------------
//------------------- 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 :
//---------------------------------------------------------------------------
// ------------------------------- 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
-
great mod. but in german? or in english??
b.o.fan
-
The MOD has been translated to English
-
on monday i post my files with the german language!
an sometimes the english...
happy weekend 8) 8) 8)
@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:?: ;-) the rest of the mod is VERY good :!: :mrgreen: :D :mrgreen:
-
(http://69.56.196.226/~ascanio/poll2.jpg)
-
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....
-
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
-
Saludos,,, / Grüsse,,,
localizar en / suchen in : /templates/tus_templates/encuestas.html
<form method="post" action="">
modificar a / verändern zu :
<form method="post" action="result_encuestas.php">
excitex2
-
Saludos,,, / Grüsse,,,
localizar en / suchen in : /templates/tus_templates/encuestas.html
<form method="post" action="">
modificar a / verändern zu :
<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..... :(
-
nice mod, thanks for it! :)
as b.o.fan said - it would be really nice when a user can only vote once (cookie and or IP).
-
Saludos,,, / Grüsse,,,
localizar en / suchen in : encuestas.php
$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 :
$site_template->register_vars($register_array);
$cont=1;
$site_template->register_vars("opci_encuestas", $opci_encuestas);
?>
localizar en / suchen in : result_encuestas.php
$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 :
$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
-
Hi,
what do this Code????
I have searched in my encuestas.php and i don´t have this
$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
$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);
?>
-
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
-
Where i can find the new version??? Can i test it???
-
Regards,,,
The new version will not be ended up to the next week.
excitex2
-
Regards,,,
The new version will not be ended up to the next week.
excitex2
OK, i can wait..... ;)
-
Hi,
my Question. Does anyone work on the Version 2 of this Mod????
I´m very interested of this...
-
Hi,
my Question. Does anyone work on the Version 2 of this Mod????
I´m very interested of this...
Hi I update the first post ;) now is the new version I hope you like it
-
Hi,
i tested it and i think it works. But i have a Question.
When i click on an Option at the Poll i come to the Result Site. But i don´t see my vote. Now when i reload the site i see it.
When a User Vote they say "I have vote but i don´t see my Vote" :( Not good....
And now see the Table.
The Words Optionen and Grafik are in the middle and the words Stimmen and Prozent are on Top
http://www.terraristik-galerie.de/encuestas_resultados.php
-
why not change all files.
So they are in english instead of spanish. the urls are getting to messy
-
Regards,,,
The MOD is put in the INTERNATIONAL/ ESPAÑOL CASTELLANO forum, because I do not speak english and it might not solve the problems that go out.
MOD Enuestas / Poll version 2.0 : http://www.4homepages.de/forum/index.php?topic=7162.msg31542#msg31542
Other users realize the translation of the MOD to the english to install it here
Excitex2
-
why not change all files.
So they are in english instead of spanish. the urls are getting to messy
I just translate the MOD, I don´t have enoght knowlege oh PHP to solve all the questions. I u want u are free to translate all the files
-
why not change all files.
So they are in english instead of spanish. the urls are getting to messy
I just translate the MOD, I don´t have enoght knowlege oh PHP to solve all the questions. I u want u are free to translate all the files
hehe thanks :P
It would take some time. I'll maybe do it. But can't tell atm. (school and other stuff got first priority)
-
Regards,,,
In a previous post I announced that would put the MOD translated into the English.
The problem is that I do not speak English, I have used for the translation a translator of the net.
Please, you correct my mistakes in the translation.
Thank you.
MOD Encuestas / Poll versión 2.0.
Files to modifying :
index.php
admin/backup.php
includes/constants.php
templates/your_templates/home.html
lang/Your_language/admin.php
lang/Your_language/main.php
New files :
encuestas.php
encuestas_resultados.php
encuestas_histo.php
install_encuestas.php
admin/plugins/admin_encuestas.php
templates/default/encuestas.html
templates/default/encuestas_result.html
templates/default/encuestas_histo_result.html
Complementary files
Group of images for the graph of results.
Instalation :
1º)To unload the new files and the images << HERE >> (http://personal.telefonica.terra.es/web/excitex3/encuestas_v_2.zip)
2º)Open the file ZIP
3º) Upload to the principal directory the files
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 36 images
6º)Upload to admin/plugins
admin_encuestas.php
NOTICES: in case the folder "PLUGINS" does not exist in yours directory,, to create and to realize by the point 6 º
Modifications :
Very importantly : Not execute install_encuestas.php Until everything has not realized the changes and raised the new files.
7º)Open : admin/backup.php
locate
COMMENTS_TABLE,
add later
ENCUESTAS_TABLE,
Save change
8º) Open : includes/constants.php
locate
define('COMMENTS_TABLE', $table_prefix.'comments');
add later
define('ENCUESTAS_TABLE', $table_prefix.'encuestas');
Save change
9º) Open : index.php
locate
require(ROOT_PATH.'includes/sessions.php');
add later
include(ROOT_PATH.'encuestas.php');
Save change
10º) Open templates/your_templates/home.html
Add
<tr><td class="row2"><p align="center">{opci_encuestas}</td></tr>
Where you wish that the form of the poll is visualized.
Save change.
11º) Open :lang/Your_language/admin.php
locate
?>
add before :
//-----------------------------------------------------
//------------------- Encuestas -----------------------
//-----------------------------------------------------
$lang['maximas_opciones'] = "10";
$lang['pregunta'] = "Name Poll :";
$lang['cerrar'] = "Close";
$lang['nueva_opcion'] = "new option";
$lang['nuevas_opciones'] = "new options";
$lang['cerrar_encuesta'] = "Close / Salve poll";
$lang['borrar_opciones'] = "erase options";
$lang['borrar_opcion'] = "To erase the ";
$lang['add_opciones'] = "Add new options";
$lang['config_opciones'] = "Config number of options";
$lang['actualizar_encuestas'] = "To update poll";
$lang['guardar_modificacion'] = "Save modification";
$lang['opcion'] = "Option";
$lang['control_encuestas'] = "Control of poll";
$lang['nombre_opcion'] = "Name of the option";
$lang['borrar_total'] = "Erase poll previus";
$lang['actualizar_pagina'] = "To update page";
$lang['texto_visitas'] = "<b>You have modified who can vote in the survey,,, please it 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 new 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 save the poll,,, and the new one has been created,,
please it updates the page </br><b><font color=\"FF0000\">They can vote </font></b> and <b><font color=\"FF0000\"> Time between votings </font>
</b>,,, please it updates 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\">It selects a minor quantity </font>A maximum has been config of".
"<font color=\"FF0000\">".$lang['maximas_opciones']."</font> optios </b>";
$lang['texto_aviso_minimo'] = "<b><font color=\"FF0000\">You cannot erase any more options,,,</font> In order that it is a poll,,, since minimum has to have two options .</b>";
$lang['texto_aviso_total'] = "<b><font color=\"FF0000\">You have to choose a poll .</font></b>";
$lang['texto_pregunta'] = "It inserts the name of the poll";
$lang['texto_opciones'] = "Inserts the option";
$lang['visitas'] = "They can vote :";
$lang['aceptar'] = "Accept";
$lang['tiempo_votos'] = "Time between votings";
$lang['hora'] = "Hour";
$lang['dia'] = "Day";
$lang['minutos'] = "Minutes";
$lang['semana'] = "Week";
$lang['semanas'] = "Weeks";
$lang['mes'] = "Month";
12º) Open lang/Your_language/main.php
locate
?>
add before :
//---------------------------------------------------------------------------
// ------------------------------- 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']." to them ".$lang['hora'];
$lang['autorizacion'] = "To be able to vote in the survey, you have that register first";
$lang['titulo'] = "Name poll :";
$lang['opciones'] = "Options";
$lang['recibido'] = "has received :";
$lang['cerrado'] = "And was closed :";
$lang['comienzo'] = "This poll began :";
$lang['anteriores'] = "Previous polls :";
$lang['visualizar'] = "To see polls";
$lang['puntuacion'] = "Punctuation";
$lang['porcentaje'] = "Percentage";
$lang['grafica'] = "Graph";
$lang['texto_opiniones'] = "Up today, the opinions are the following ones :";
$lang['texto_total'] = "They have answered a whole of ";
$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'] = "Opinion";
$lang['plazo_voto'] = "<p><b><font color=\"#FF0000\">Not</font> you can express another vote, have voted recently</b></p>";
OBSERVACIONES : This version is much more complete than the previous version, to the being mas complex I have met obliged to modify the table of the data base, before was sequential and now is linear to assume the record of the surveys, therefore the users who have the version 1.0, they will have to erase the previous table like that 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 them result of the survey and to introduce it manually in the new version (they are not so many people either they are 5 options and 5 votings) .
Finally to execute install_encuestas.php,,,, To go later to the panel of control and to enter the information of the form of the surveys.
excitex2
-
This is very crazy, but if I try modify the poll in the admin this does not succeed.
If I want adapt on for example close and Save and I see changing nothing when i pressed on the close button.
In fact everything what I want change in the bottom table are not passed on and remain therefore unaltered.
And i dont see this sentences below when i change something:
$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 </b>";
-
Hi, have you try after making a change press the buttom that says Refresh page?
-
There is no button that refresh the page?
See the printscreen in my attachment!
(I have only change the language in dutch)
It is possible to vote.
But the votes are not registered in the database so all results remain on 0 (zero)
-
The buttom appears just when u make a change on the poll:
(http://members.cox.net/jaime/refresh.jpg)
-
That button is not on my page 8O
But its also in script:
//////////////////////////////////////////////////////////////
// Rutina de borrado total de registros de la base de datos //
//////////////////////////////////////////////////////////////
if ($control == liquidar_encuesta) {
if ($borrado_total>=1){
$sql = "DELETE FROM ".ENCUESTAS_TABLE."
WHERE orden = '$borrado_total'";
$site_db->query($sql);
echo <<<FINAL
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_borrar_total <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL;
}
else
{
echo <<<AVISO_TOTAL
<p></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<p>$texto_aviso_total</p>
</td>
</tr>
</table>
AVISO_TOTAL;
}
}
So what is the problem??
I have only change the language!
-
PM too excitex, he is the one who make this MOD
-
Ok thanks, but you dont have an explanation?
-
not really, i don't know too much of php adn for me is working fine, sorry
-
Great job excitex2 , the MOD is working perfectly ... :D
thank you for this great tool ... :D
here a german version of ( hier eine deutsche Version von ) :
- lang/Your_language/admin.php
- lang/Your_language/main.php
- admin/plugin/admin_encuestas.php
admin.php
//-----------------------------------------------------
//--- Umfrage : Poll v2.0 ---
//-----------------------------------------------------
$lang['maximas_opciones'] = "10";
$lang['pregunta'] = "Name der Umfrage :";
$lang['cerrar'] = "Schließen";
$lang['nueva_opcion'] = "Neue Option";
$lang['nuevas_opciones'] = "Neue Optionen";
$lang['cerrar_encuesta'] = "Schließen / Sichern";
$lang['borrar_opciones'] = "Löschen von Optionen";
$lang['borrar_opcion'] = "Löschen der ";
$lang['add_opciones'] = "Neue Option hinzufügen";
$lang['config_opciones'] = "Ändern der Anzahl der Optionen";
$lang['actualizar_encuestas'] = "Aktualisieren der Umfrage";
$lang['guardar_modificacion'] = "Speichern der Änderung";
$lang['opcion'] = "Option";
$lang['control_encuestas'] = "Einstellung der Umfrage";
$lang['nombre_opcion'] = "Name der Option";
$lang['borrar_total'] = "Löschen vorheriger Umfragen";
$lang['actualizar_pagina'] = "Aktualisieren der Seite";
$lang['texto_visitas'] = "<b>Du hast in der Übersicht - Wer kann abstimmen - geändert : Bitte aktualisiere die Seite </b>";
$lang['texto_guardar_modificacion'] = "<b>Du hast die Umfrage geändert : Bitte aktualisiere die Seite </b>";
$lang['texto_add_opcion'] = "<b>Du hast neue Optionen der Umfrage hinzugefügt : Bitte aktualisiere die Seite </b>";
$lang['texto_borrar_opciones'] = "<b>Du hast eine Option der Umfrage gelöscht : Bitte aktualisiere die Seite </b>";
$lang['texto_cerrar_encuestas'] = "<b>Du hast die Umfrage geschlossen und gesichert und eine neue erstellt : Bitte aktualisiere </br><b><font color=\"FF0000\">Sie können Abstimmen</font></b> und <b><font color=\"FF0000\">Zeit zwischen den Abstimmungen</font>
</b>Bitte aktualisiere die Seite</b>";
$lang['texto_borrar_total'] = "<b>Du hast eine vorherige Umfrage gelöscht : Bitte aktualisiere die Seite</b>";
$lang['texto_aviso'] = "<b><font color=\"FF0000\">Es ist eine zu geringe Anzahl gewählt. </font>Ein Maximum wurde eingestellt".
"<font color=\"FF0000\">".$lang['maximas_opciones']."</font> Optionen </b>";
$lang['texto_aviso_minimo'] = "<b><font color=\"FF0000\">Du kannst nicht mehr Optionen löschen. <font> Es handelt sich um eine Abstimmung, zwei Optionen muss man zum wählen haben .</b>";
$lang['texto_aviso_total'] = "<b><font color=\"FF0000\">Du musst eine Umfrage wählen .</font></b>";
$lang['texto_pregunta'] = "Es setzt den Namen der Umfrage";
$lang['texto_opciones'] = "Setze die Option";
$lang['visitas'] = "Wer kann abstimmen :";
$lang['aceptar'] = "Akzeptieren";
$lang['tiempo_votos'] = "Zeit zwischen Abstimmungen :";
$lang['hora'] = "Stunde";
$lang['dia'] = "Tag";
$lang['minutos'] = "Minuten";
$lang['semana'] = "Woche";
$lang['semanas'] = "Wochen";
$lang['mes'] = "Monat";
main.php
//---------------------------------------------------------------------------
// --- Umfrage : Poll v2,0 ---
//---------------------------------------------------------------------------
$lang['hora'] = date("H:i");
$lang['dia_semana'] = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend");
$lang['dia'] = date("j");
$lang['mes'] = array("Dezember", "Januar", "Februar", "März", "April", "Mai", "Juni", "July", "August", "September", "Oktober", "November");
$lang['anyo'] = date("Y");
$lang['fecha'] = $lang['dia_semana'][date('w')]." - ".$lang['dia']." - ".$lang['mes'][date("n")]." von ".$lang['anyo']." - ".$lang['hora'];
$lang['autorizacion'] = "Um absimmen zu können, musst du dich vorher registiert haben";
$lang['titulo'] = "Umfrage :";
$lang['opciones'] = "Optionen";
$lang['recibido'] = "Es wurden abgegeben :";
$lang['cerrado'] = "Und wurde geschlossen :";
$lang['comienzo'] = "Diese Umfrage begann :";
$lang['anteriores'] = "Vorherige Umfragen :";
$lang['visualizar'] = "Ergebnis";
$lang['puntuacion'] = "Stimmen";
$lang['porcentaje'] = "Prozentsatz";
$lang['grafica'] = "Diagramm";
$lang['texto_opiniones'] = "Bis zum heutigen Tag waren die Meinungen hierzu wie folgt :";
$lang['texto_total'] = "Haben insgesamt geantwortet : ";
$lang['texto_pregunta'] = "Auf die Frage : ";
$lang['texto_titulo'] = "Umfrage - Ergebnisse";
$lang['texto_titulo_anteriores'] = "Zurückliegende Umfragen";
$lang['maximas_opciones'] = 10;
$lang['usuarios'] = "Besucher";
$lang['encuestas'] = "Umfrage";
$lang['opinar'] = "Vote";
$lang['plazo_voto'] = "<p><b><font color=\"#FF0000\">Nein</font> - kein Abstimmen möglich - du hast gerade gewählt !</b></p>";
admin_encuestas.php
finde :
$hora = date("H:i");
$dia_semana = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
$dia = date("j");
$mes = array("Diciembre","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre");
$anyo = date("Y");
$fecha = $dia_semana[date('w')]." - ".$dia." de ".$mes[date("n")]." del ".$anyo." a las ".$hora;
und ersetze durch :
$hora = date("H:i");
$dia_semana = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Sonnabend");
$dia = date("j");
$mes = array("Dezember", "Januar", "Februar", "März", "April", "Mai", "Juni", "July", "August", "September", "Oktober", "November");
$anyo = date("Y");
$fecha = $dia_semana[date('w')]." - ".$dia." - ".$mes[date("n")]." - ".$anyo." - ".$hora;
PS : Ein Spitzen-MOD mit sehr guten ACP-Einstellungsmöglichkeiten, Auswahlmöglichkeiten zurückliegender Umfragen auf der Website und vom Layout sehr gut vorbereitet zur Einarbeitung in das eigene Layout ... bin begeistert ... :D
mawenzi
-
So i dont have the button to save the settings (you can read it a few message ago)
This is the script of admin_encuestas.php (only change the language):
<?php // PLUGIN_TITLE: Poll Control
$root_path = (eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
show_admin_header();
#Insertamos valores en las variables de trabajo
$contador = 1;
$cont = 1;
$puntuacion = $lang['field_rating'];
$pregunta = $lang['pregunta'];
$cerrar = $lang['cerrar'];
$nueva_opcion = $lang['nueva_opcion'];
$nuevas_opciones = $lang['nuevas_opciones'];
$cerrar_encuestas = $lang['cerrar_encuesta'];
$borrar_opciones = $lang['borrar_opciones'];
$add_opciones = $lang['add_opciones'];
$config_opciones = $lang['config_opciones'];
$actualizar_encuestas = $lang['actualizar_encuestas'];
$guardar_modificacion = $lang['guardar_modificacion'];
$opcion = $lang['opcion'];
$control_encuestas = $lang['control_encuestas'];
$borrar = $lang['delete'];
$agregar = $lang['add'];
$borrar_opcion = $lang['borrar_opcion'];
$nombre_opcion = $lang['nombre_opcion'];
$hora = date("H:i");
$dia_semana = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
$dia = date("j");
$mes = array("Diciembre","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre");
$anyo = date("Y");
$fecha = $dia_semana[date('w')]." - ".$dia." de ".$mes[date("n")]." del ".$anyo." a las ".$hora;
$borrar_total = $lang['borrar_total'];
$actualizar_pagina = $lang['actualizar_pagina'];
$texto_visitas = $lang['texto_visitas'];
$texto_guardar_modificacion = $lang['texto_guardar_modificacion'];
$texto_add_opcion = $lang['texto_add_opcion'];
$texto_borrar_opciones = $lang['texto_borrar_opciones'];
$texto_cerrar_encuestas = $lang['texto_cerrar_encuestas'];
$texto_borrar_total = $lang['texto_borrar_total'];
$texto_aviso = $lang['texto_aviso'];
$maximas_opciones = $lang['maximas_opciones'];
$texto_aviso_minimo = $lang['texto_aviso_minimo'];
$texto_aviso_total = $lang['texto_aviso_total'];
$texto_pregunta = $lang['texto_pregunta'];
$texto_opciones = $lang['texto_opciones'];
$visitantes = $lang['visitas'];
$usuarios_registrados = $lang['userlevel_registered'];
$todos = $lang['all'];
$aceptar = $lang['aceptar'];
$tiempo_votos = $lang['tiempo_votos'];
$hora = $lang['hora'];
$dias = $lang['dia'];
$minutos = $lang['minutos'];
$semana = $lang['semana'];
$semanas = $lang['semanas'];
$mes = $lang['mes'];
//////////////////////////////////////////////////////////////
/////////////// Presentacion de la encuesta //////////////////
//////////////////////////////////////////////////////////////
#Creamos 1ª parte de la plantilla de presentación de resultados y abrimos el formulario
echo <<<ESQUEMA
<form method="post" action="admin_encuestas.php">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="tableborder">
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tableheader">
<td colspan="2"><b><span class="tableheader">$control_encuestas</span></b></a>
</td>
</tr>
ESQUEMA;
#Realizamos lectura de la base de datos
$sql = "SELECT *
FROM ".ENCUESTAS_TABLE."
ORDER BY orden";
$result = $site_db->query($sql);
$encuesta_cache = array();
#Pasamos valores de la lectura a las variables
while ($row = $site_db->fetch_array($result)) {
$orden[$contador] = $row["orden"];
$nombre[$contador] = $row["nombre"];
$fecha_inicio[$contador] = $row["fecha_inicio"];
$fecha_cierre[$contador] = $row["fecha_cierre"];
$visitante[$contador] = $row["visitante"];
$plazo_votacion[$contador] = $row["plazo_votacion"];
$valor[1][$contador] = $row["opcion_1"];
$votos[1][$contador] = $row["votos_1"];
$valor[2][$contador] = $row["opcion_2"];
$votos[2][$contador] = $row["votos_2"];
$valor[3][$contador] = $row["opcion_3"];
$votos[3][$contador] = $row["votos_3"];
$valor[4][$contador] = $row["opcion_4"];
$votos[4][$contador] = $row["votos_4"];
$valor[5][$contador] = $row["opcion_5"];
$votos[5][$contador] = $row["votos_5"];
$valor[6][$contador] = $row["opcion_6"];
$votos[6][$contador] = $row["votos_6"];
$valor[7][$contador] = $row["opcion_7"];
$votos[7][$contador] = $row["votos_7"];
$valor[8][$contador] = $row["opcion_8"];
$votos[8][$contador] = $row["votos_8"];
$valor[9][$contador] = $row["opcion_9"];
$votos[9][$contador] = $row["votos_9"];
$valor[10][$contador] = $row["opcion_10"];
$votos[10][$contador] = $row["votos_10"];
$ultimo_registro = $contador;
$contador++;
}
//#Pasamos valores de la lectura a las variables
#Seleccionamos el título o pregunta de la encuesta y creamos la plantilla
echo <<<ESQUEMA1
<tr class="tablerow">
<td><p class="rowtitle">$pregunta</p></td>
<td><p><input type="text" size="59" name="nombre_de_la_encuesta" value="$nombre[$ultimo_registro]"></p></td>
</tr>
ESQUEMA1;
#Realizamos bucle para leer las 10 opciones y las 10 votaciones
while ($cont <= $maximas_opciones){
#Controlamos los class de las tablas
if ( $lin == 1){
$linea = "tablerow";
$lin = 0;
}//cerramos el condicional '( $lin == 1)'
else
{
$linea = "tablerow2";
$lin = 1;
} //cerramos el 'else'
#Pasamos valores a las variables que admite este tipo de código HTML echo <<<bla,bla
$valores[$cont] = $valor[$cont][$ultimo_registro];
$votaciones[$cont] = $votos[$cont][$ultimo_registro];
#Verificamos que sólo se impriman los campos que tengan valores insertados
if ($valores[$cont] !=""){
#Calculamos cuantas opciones hay ya insertadas
$total_opciones++;
#Creamos el cuerpo principaL de la plantilla e insertamos la totalidad de los registros
echo <<<ESQUEMA2
<tr class="$linea">
<td><p class=$linea><b>$cont ª $opcion</b></p></td>
<td><p><input type="text" size="30" name="valor_es[$cont]" value="$valores[$cont]">
<b>$puntuacion :</b> <input type="text" size="4" name="votacion[$cont]" value=$votaciones[$cont]></p></td>
</tr>
ESQUEMA2;
}//cerramos el condicional 'if'
$cont++;
}//cerramos el bucle 'while ($cont <= $maximas_opciones)'
#Confeccionamos el final de la plantilla e insertamos los botones de guardar y actulalizar cerramos el form y tablas
echo <<<ESQUEMA3
<td colspan="2" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align = "center"> <input type="submit" value="$guardar_modificacion" class="button">
<!-- Creamos la variable de control para la modificación de registros en la base de datos -->
<input type="hidden" name = "control" value="modificar"></td><td width="50%" align = "center"></form>
<form method="post" action="admin_encuestas.php"><input type="submit" value=" $actualizar_encuestas " class="button">
</td></tr>
</form>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
ESQUEMA3;
//////////////////////////////////////////////////////////////
//////////////////// CONFIGURAR ENCUESTAS ////////////////////
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
//////////////////// Añadir nuevas opciones////////////////////
//////////////////////////////////////////////////////////////
#Iniciamos plantilla para las configuraciones de opiniones , iniciamos el formulario y creamos un select con 8 opciones
echo <<<ESQUEMA4
<br></br>
<!-- creamos el formulario para añadir nuevas opciones -->
<form method="post" action="admin_encuestas.php">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="tableborder">
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tableheader">
<td colspan="2"><b><span class="tableheader">$config_opciones</span></b></a>
</td>
</tr>
<tr class="tablerow2">
<td >
<p class="tablerow2"><b>$add_opciones :</b></td>
<td >$agregar <SELECT name=insercion>
<option value=1>1 $nueva_opcion</option>
<option value=2>2 $nuevas_opciones</option>
<option value=3>3 $nuevas_opciones</option>
<option value=4>4 $nuevas_opciones</option>
<option value=5>5 $nuevas_opciones</option>
<option value=6>6 $nuevas_opciones</option>
<option value=7>7 $nuevas_opciones</option>
<option value=8>8 $nuevas_opciones</option>
</select>
<!-- Damos valor a la variable control para ejecutar la rutina de insertar registros en la base de datos -->
<input type="hidden" name = "control" value="insertar_opcion">
<input type="submit" value="$agregar" class="button"></td></form>
</tr>
ESQUEMA4;
//////////////////////////////////////////////////////////////
/////////////////////// Borrar opciones///////////////////////
//////////////////////////////////////////////////////////////
echo <<<ESQUEMA5
<!-- Creamos el formulario para el borrado de registros en la base de datos -->
<tr class="tablerow"><form method="post" action="admin_encuestas.php">
<td >
<p class="tablerow"><b>$borrar_opciones :</b></td>
<td >$borrar_opcion : <SELECT name=borrado>
ESQUEMA5;
#Confeccionamos el select para la elección de borrado de opciones
FOR ($opciones_a_borrar=1;$opciones_a_borrar<=$maximas_opciones;$opciones_a_borrar++){
if ($valores[$opciones_a_borrar] !=""){
echo "\n";
echo <<<ESQUEMA6
<option value=$opciones_a_borrar>$opciones_a_borrar ª $opcion</option>
ESQUEMA6;
}
}
echo <<<ESQUEMA7
</select>
<!-- Damos valor a la variable de control y cerramos el form -->
<input type="hidden" name = "control" value="delete_opcion">
<input type="submit" value="$borrar" class="button">
</td></form>
</tr>
ESQUEMA7;
//////////////////////////////////////////////////////////////
////////////////// Cerrar y Guardar encuestas ////////////////
//////////////////////////////////////////////////////////////
echo <<<ESQUEMA8
<!-- Creamos el formulario para el cerrar y guardar la encuesta en la base de datos -->
<tr class="tablerow2">
<form method="post" action="admin_encuestas.php">
<td >
<p class="tablerow2"><b>$cerrar_encuestas :</b></td>
<input type="hidden" name = "control" value="cerrar_guardar">
<td><input type="text" size="59" name="encuesta" value="$nombre[$ultimo_registro]">
<input type="submit" value="$cerrar" class="button"></td>
</tr></form>
ESQUEMA8;
//////////////////////////////////////////////////////////////
///////////////// Borrar encuestas antiguas //////////////////
//////////////////////////////////////////////////////////////
echo <<<ESQUEMA9
<!-- Creamos el formulario para el borrado difinitivo de registros en la base de datos -->
<tr class="tablerow">
<form method="post" action="admin_encuestas.php">
<td >
<p class="tablerow"><b>$borrar_total :</b></td>
<td><SELECT name=borrado_total>
ESQUEMA9;
#Realizamos lectura de la base de datos
$sql3 = "SELECT *
FROM ".ENCUESTAS_TABLE."
ORDER BY orden";
$resultado = $site_db->query($sql3);
$encuesta_cache2 = array();
#Pasamos valores de la lectura a las variables
while ($row = $site_db->fetch_array($resultado)) {
$orden_encuesta[$lectura] = $row["orden"];
$nombre_encuesta[$lectura] = $row["nombre"];
$fecha_cierre_encuesta[$lectura] = $row["fecha_cierre"];
if ($fecha_cierre_encuesta[$lectura] != ""){
echo <<<ESQUEMA10
<option value=$orden_encuesta[$lectura]> $nombre_encuesta[$lectura] - $fecha_cierre_encuesta[$lectura] </option>
ESQUEMA10;
}
$lectura++;
}// Cerramos el bucle "while ($row = $site_db->fetch_array($result2))"
echo <<<ESQUEMA11
</select>
<input type="hidden" name = "control" value="liquidar_encuesta">
<input type="submit" value="$borrar" class="button"></td></form>
</tr>
ESQUEMA11;
//////////////////////////////////////////////////////////////
////////////// Tipo de visitante que pueden votar ////////////
//////////////////////////////////////////////////////////////
echo <<<ESQUEMA12
<tr class="tablerow2">
<form method="post" action="admin_encuestas.php">
<td><p class="tablerow2"><b>$visitantes</b></td>
<td><SELECT name=visitas>
ESQUEMA12;
if ($visitante[$ultimo_registro] == 0){
echo <<<ESQUEMA13
<option value="0" selected="selected"> $todos</option>
<option value="1"> $usuarios_registrados</option>
ESQUEMA13;
}
else {
echo <<<ESQUEMA14
<option value="1" selected="selected"> $usuarios_registrados</option>
<option value="0" > $todos</option>
ESQUEMA14;
}
echo <<<ESQUEMA15
</select>
<input type="hidden" name = "control" value="quien_puede_votar">
<input type="submit" value="$aceptar" class="button">
</td></form>
</tr>
ESQUEMA15;
//////////////////////////////////////////////////////////////
/////////////////// Tiempo entre votaciones //////////////////
//////////////////////////////////////////////////////////////
$eleccion = $plazo_votacion[$ultimo_registro];
switch ($eleccion) {
case "0":
$seleccion0 = "selected=\"selected\"";
break;
case "1800":
$seleccion30 = "selected=\"selected\"";
break;
case "3600":
$seleccion1h = "selected=\"selected\"";
break;
case "86400":
$seleccion1d = "selected=\"selected\"";
break;
case "604800":
$seleccion1s = "selected=\"selected\"";
break;
case "1209600":
$seleccion2s = "selected=\"selected\"";
break;
case "1934400":
$seleccion3s = "selected=\"selected\"";
break;
case "2592000":
$seleccion1m = "selected=\"selected\"";
break;
}
echo <<<ESQUEMA16
<tr class="tablerow">
<form method="post" action="admin_encuestas.php">
<td><p class="tablerow"><b>$tiempo_votos</b></td>
<td><SELECT name=tiempo_votaciones>
<option value="0" $seleccion0> 0 $minutos</option>
<option value="1800" $seleccion30> 30 $minutos</option>
<option value="3600" $seleccion1h> 1 $hora</option>
<option value="86400" $seleccion1d> 1 $dias</option>
<option value="604800" $seleccion1s> 1 $semana</option>
<option value="1209600" $seleccion2s> 2 $semanas</option>
<option value="1934400" $seleccion3s> 3 $semanas</option>
<option value="2592000" $seleccion1m> 1 $mes</option>
</select>
<input type="hidden" name = "control" value="tiempo_entre_votos">
<input type="submit" value="$aceptar" class="button">
</td></form>
</tr>
ESQUEMA16;
//////////////////////////////////////////////////////////////
/////////////// FINALIZACION DE LAS TABLAS //////////////////
//////////////////////////////////////////////////////////////
echo <<<ESQUEMAFINAL
</table>
</td>
</tr>
</table>
<p></p>
ESQUEMAFINAL;
//////////////////////////////////////////////////////////////
// Rutinas de modificación de registros de la base de datos //
//////////////////////////////////////////////////////////////
if ($control == modificar) {
for ($verif=1;$verif<=$maximas_opciones;$verif++){
$nuevo = $valor_es[$verif];
$controlar = $nuevo[0];
if ($controlar == " "){
$controlar = ltrim($nuevo, " ");
$valor_es[$verif] = $controlar;
}
if ($valor_es[$verif] == ""){
$votacion[$verif] = 0;
}
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre_de_la_encuesta', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha_cierre[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
echo <<<FINAL
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_guardar_modificacion <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL;
}
//////////////////////////////////////////////////////////////
// Rutinas de insertar nuevos registros en la base de datos //
//////////////////////////////////////////////////////////////
if ($control == insertar_opcion) {
if (($total_opciones+$insercion)<=$maximas_opciones){
$final = 1;
FOR ($comienzo=1;$comienzo<=$maximas_opciones;$comienzo++){
if ($valor[$comienzo][$ultimo_registro] != ""){
$valor_es[$comienzo] = $valor[$comienzo][$ultimo_registro];
$votacion[$comienzo] = $votos[$comienzo][$ultimo_registro];
}
else {
if ($final<=$insercion){
$valor_es[$comienzo] = $texto_opciones;
$votacion[$comienzo] = '0';
$final++;
}
}
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha_cierre[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
echo <<<FINAL2
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p> $texto_add_opcion <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL2;
}
else
{
echo <<<AVISOS
<p></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<p>$texto_aviso</p>
</td>
</tr>
</table>
AVISOS;
}
}
////////////////////////////////////////////////////////
// Rutina de borrado de registros de la base de datos //
////////////////////////////////////////////////////////
if ($control == delete_opcion) {
if ($total_opciones>=3){
$acabar = 1;
FOR ($principio=1;$principio<=$maximas_opciones;$principio++){
if ($principio != $borrado){
$valor_es[$principio] = $valor[$principio][$ultimo_registro];
$votacion[$principio] = $votos[$principio][$ultimo_registro];
}// Cerramos el condicional "if ($principio != $borrado)"
else {
$valor_es[$principio] = "";
$votacion[$principio] = '0';
}//Cerramos el " else "
}// Cerramos el bucle "FOR ($principio=1;$principio<=$maximas_opciones;$principio++){"
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha_cierre[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
echo <<<FINAL3
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_borrar_opciones <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL3;
}// Cerramos el condicional "if (($total_opciones>=2)"
else
{
echo <<<AVISO_MINIMO
<P></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<p>$texto_aviso_minimo</p>
</td>
</tr>
</table>
AVISO_MINIMO;
}// Cerramos el " else "
}// Cerramos el condicional "if ($control == delete_opcion)"
////////////////////////////////////////////////////////
// Rutina de cerrar y guardar la encuesta //
////////////////////////////////////////////////////////
if ($control == cerrar_guardar) {
FOR ($inicio=1;$inicio<=$maximas_opciones;$inicio++){
$valor_es[$inicio] = $valor[$inicio][$ultimo_registro];
$votacion[$inicio] = $votos[$inicio][$ultimo_registro];
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
//setcookie("Encuestas");// Borramos cookie de control de votaciones
$sql5 = "INSERT INTO ".ENCUESTAS_TABLE."
(orden, nombre, visitante, plazo_votacion, fecha_inicio, fecha_cierre, opcion_1, votos_1, opcion_2, votos_2, opcion_3, votos_3, opcion_4, votos_4,
opcion_5, votos_5, opcion_6, votos_6, opcion_7, votos_7, opcion_8,votos_8, opcion_9, votos_9, opcion_10, votos_10)
VALUES ('','$texto_pregunta', '0', '0', '$fecha', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)";
$site_db->query($sql5);
echo <<<FINAL5
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_cerrar_encuestas <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL5;
}
//////////////////////////////////////////////////////////////
// Rutina de borrado total de registros de la base de datos //
//////////////////////////////////////////////////////////////
if ($control == liquidar_encuesta) {
if ($borrado_total>=1){
$sql = "DELETE FROM ".ENCUESTAS_TABLE."
WHERE orden = '$borrado_total'";
$site_db->query($sql);
echo <<<FINAL
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_borrar_total <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINAL;
}
else
{
echo <<<AVISO_TOTAL
<p></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<p>$texto_aviso_total</p>
</td>
</tr>
</table>
AVISO_TOTAL;
}
}
//////////////////////////////////////////////////////////////
////////////// Rutina para quien puede votar en la encuesta //////////////
//////////////////////////////////////////////////////////////
if ($control == quien_puede_votar) {
FOR ($iniciando=1;$iniciando<=$maximas_opciones;$iniciando++){
$valor_es[$iniciando] = $valor[$iniciando][$ultimo_registro];
$votacion[$iniciando] = $votos[$iniciando][$ultimo_registro];
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitas',
plazo_votacion = '$plazo_votacion[$ultimo_registro]', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha_cierre[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
echo <<<FINALVISITAS
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_visitas <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINALVISITAS;
}
//////////////////////////////////////////////////////////////
////////////// Rutina para tiempo entre votaciones//////////////
//////////////////////////////////////////////////////////////
if ($control == tiempo_entre_votos) {
FOR ($iniciado=1;$iniciado<=$maximas_opciones;$iniciado++){
$valor_es[$iniciado] = $valor[$iniciado][$ultimo_registro];
$votacion[$iniciado] = $votos[$iniciado][$ultimo_registro];
}
$register_array = array();
$sql = "UPDATE ".ENCUESTAS_TABLE."
SET orden = '$orden[$ultimo_registro]', nombre = '$nombre[$ultimo_registro]', visitante = '$visitante[$ultimo_registro]',
plazo_votacion = '$tiempo_votaciones', fecha_inicio = '$fecha_inicio[$ultimo_registro]', fecha_cierre = '$fecha_cierre[$ultimo_registro]',
opcion_1 = '$valor_es[1]', votos_1 = '$votacion[1]',
opcion_2 = '$valor_es[2]', votos_2 = '$votacion[2]',
opcion_3 = '$valor_es[3]', votos_3 = '$votacion[3]',
opcion_4 = '$valor_es[4]', votos_4 = '$votacion[4]',
opcion_5 = '$valor_es[5]', votos_5 = '$votacion[5]',
opcion_6 = '$valor_es[6]', votos_6 = '$votacion[6]',
opcion_7 = '$valor_es[7]', votos_7 = '$votacion[7]',
opcion_8 = '$valor_es[8]', votos_8 = '$votacion[8]',
opcion_9 = '$valor_es[9]', votos_9 = '$votacion[9]',
opcion_10 = '$valor_es[10]', votos_10 = '$votacion[10]'
WHERE orden = '$orden[$ultimo_registro]'";
$site_db->query($sql);
echo <<<FINALVISITAS
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="center">
<form method="post" action="admin_encuestas.php">
<p>$texto_visitas <input type="submit" value=" $actualizar_pagina " class="button">
</p>
</form>
</td>
</tr>
</table>
FINALVISITAS;
}
?>
Why i am the only one who dont have that button!!
-
@ lachendepaul
my suggestion :
- delete the Poll (encuestas) table from the database
- install the MOD again without any change
- and finally execute the install_encuestas.php
- if the MOD works for you - then change your language
( was also necessary with me (like my suggestion), I had forgotten to copy a file on the server ... but now everything works in the best way )
mawenzi
-
It does not work still at this moment.
I miss still my SAVE button.
I the database has removed and reinstall.
I have entirely removed script and also again reinstall.
I have not adapted the language right now!!
Some what I have had adapt is:
$root_path = (eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../../" : "./../";
This because he dont saw the rootpath.
So i dont have the save button right now!
Who haves the same problem?
Who haves an answer to fix this??
-
it is not a save bottum it is a refresh button, nobody has get this problem so i think u miss something in the instalation
-
Why? because everything works fine of the script!
But i cant refresh, so the same question still there..
-
Can you send me the admin page??
I find 2 versions in the script.. (one in the attachement, one in the message with a link)
-
what admin page?
-
@ lachendepaul
do you save the admin_encuestas.php in in folder /admin/plugins/ ... :?:
I will send you my admin_encuestas.php via PM.
mawenzi
-
I copy your page and it still doesnt work! (admin_encuestas.php)
That is the only page for the admin! So what can i do now?
-
And when i vote i see this in encuestas_resultados.php
-
atachment
-
Regards,,,
I use a translator of the net.
.
You have had to commit some mistake in the installation, or, there has been a mistake in the exhaust of the ZIP.
I suggest him to unload again the ZIP and install again the MOD.
Excitex2
-
I have 5 times reinstall the script!
Do you have a good zip for me, so i know it works fine!
-
@ lachendepaul
here my downloaded encuestas_v_2.zip.
mawenzi
-
Thanks, i will try it next week!
-
Regards lachendepaul ,,,
Thanks, i will try it next week!
You have changed the templates of the v1 into those of the v2 ??
If you have not realized this change the MOD it will not work.
Excitex2
-
I've never change a version of a template.
I've download a template with the name blue and change it to my choice.
But how can i change my version of my template?
Or how can i change the script to make it working?
Thank you very much for your time for me..
-
Ok thanks for your help.
I've tried it for 7 times, and it still dont work.
I am busy for 2 weeks and now it is over, i dont want it anymore.
Only change i must do is:
$root_path = (eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../../" : "./../";
Thanks for your help,
I will try to make a poll by myself!
-
Hello
I've instaled the 4images gallery and all mods i need on a linux machine running apache. But now i have transfered my instalation to windows machine running IIS 5 and am having problems with the Poll v2 (encustas).
On the page when i vote there are no results shown, but when i try to acces the admin plugin i got Fatal error: main(): Failed opening required './../admin/admin_global.php' (include_path='.;c:\php4\pear') in ... I fixed that by adding additional ../ to the end of the $root_path.
That worked fot that part so i can acces the admin part. But i cannot do anything in admin. I get no errors, no messages to update the the poll.
Help please!!
Thank you.
-
Change this in your file:
$root_path = (eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../../" : "./../";
Its on the 5 or 6 line..
-
HI
I've tried you suggestion but it does not work. The folders are in c:\inetpub\wwwroot\slike\admin..
Still nothing show on the page and in the admin page (page id displayed but nothing can be changed).
I even tried with clean install of 4images and poll v2.
THX
-
I had the same error, so that was my problem.
There is a old and a new version of PHP_SELF i think.
Your server use PHP 5 i quess?
-
Actualy no. I am using latest of the 4 fork, 4.3.11 (i also tried with exactly the same version as on linux box. 4.3.4). No luck.
-
can you give me the first rules of the admin file?
-
admin/index.php:
define('IN_CP', 1);
define('ROOT_PATH', './../');
require('admin_global.php');
admin_global.php:
if (!defined('ROOT_PATH')) {
die("Security violation");
}
define('GET_CACHES', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
include(ROOT_PATH.'admin/admin_functions.php');
admin/plugins/admin_encuestas.php
<?php // PLUGIN_TITLE: Control de encuestas
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
show_admin_header();
Those are the settings from my linux box. Here it worls. On my windows box does not work. Did also try your suggestion $root_path = (eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../../" : "./../";
Did not work either.
Thanks for all your help trying to figure this one out.
-
ascanio thanks for this mod :D
all OK with V1.71
-
you don't have to thanks me, thanks to excitec2 I just translate it into english becuase i thought it is a grat mod to share :):)
-
it is agreat mod, thanks for that, but i cannot use it now sadly
-
Hi!
i cannot save the modified options in the ACP?
Any idea? What i have to change in code?
-
sounds like the database wasnt updated.
-
the table is installed to the database. i can see it.
but not saving the modified options.
any more ideas?
-
do u see the refresh buton on the bottom of the page when u do a modification?
-
Yes i can see the refresh button and i think i know what it means.
But i input some settings in the poll setting form of the ACP and it will not save them to the database.
i think there is not any connection to the database.
Do u have an idea what settings in the code i have to make?
My system:
winXP prof SP1
newest PHP i think Hardened-PHP Version 4.3.11/0.2.6 (phpinfo)
MySQL 4.0.16
PhpMyAdmin 2.5.4
Thanks for quick helping.
-
Hi!
i cannot save the modified options in the ACP?
Any idea? What i have to change in code?
I had the same problem I changed the chmod value of the admin_encuestas.php file to 755 and now it works fine.
-
:cry:
No success with changing the chmod value. in FlashXP it shows me -r-w-r- rights for the admin_encuestas.php
Any other solutions for me?
-
Could someone please help me with this MOD :?:
It is not working for me :!:
I have changed to an ISP who allows to configure chmod to 777.
But it is still not working. The message after installing the mod was without errors. everything ok. i also checked twice the code. No mistakes to find for me.
What i am doing wrong?
In the Admin Control Panel i cant save/write the modified poll settings to the database. WHY???
Any ideas?
-
I'll wait until everything is translated and some people actually get the mod working fine before I use it..
-
Hi all!
My URL: www.industrie-gravuren.de/galerie
My problem is:
I can see my poll mod on all HTML pages like "PORTRAIT", "ANFAHRT", "DATEN+VORLAGEN" etc.
BUT i can not see the poll on php generated pages like the "NEWS ARCHIVE", "SEARCH", "LIGHTBOX", "POLL RESULT", "CONTROL CENTER", etc.
i used the same code like in the HTML files like {opci_encuestas}
WHY I CAN NOT SEE MY POLL
Thanks for help.
-
Hellow,
Thank`s for this mod, it`s working perfect , but I have problem with template. Where is my template in index page: http://www.satela.lt/~rnorvilas/1.JPG and when I go to look polls: http://www.satela.lt/~rnorvilas/2.JPG . I have problem with user navigations and overall header. How I can to fix it?
Thank`s Tom,
-
Hola tengo un problema con la encuesta segui los pasos ke estaban explicados en el foro.
y cuando intento accesar al panel de control me da este error
Parse error: parse error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM or '(' in /home/venezuel/public_html/galeria/lang/spanish/admin.php on line 498
Revisé la linea 498 en el archivo referido y todo en esta como debe ser.
ke podrá ser?
-
Hi, there is antiflood system on that mod?
poll must work one time when you push button,
other time --> the buttons must be blocked
BAD mod without antiflood system!
-
Maybe who know better poll for 4images?
-
Hi,
is there a way to open an old Poll???
I have closed a Poll but i will it open now...
-
Kann mich auch täuschen aber probier doch mal:
eine neu poll starten und den alten Bewertungsstand manuell eintragen und dann weiter laufen lassen.
anschließend könntest Du die alte poll ja löschen.
müßte glaube ich funktionieren. :roll:
-
Jo, so ging es natürlich auch :) Manchmal kommt man auf die einfachsten Sachen nicht....
-
I've installed it and works fine but i've two questions :
1) i've put this => include(ROOT_PATH.'encuestas.php'); in all php pages, but in some pages this give a error, but just on my pms.php , give a error on page_header.php line 444 .
2) How can i modify the dropdown form (polls history) ?
Cheers ;)
-
i've got one problem ... this isn't showing results and give me this :
DB Error: Bad SQL Query: UPDATE 4images_encuestas SET orden = '1', nombre = 'You've start listening music on....', visitante = '0', plazo_votacion = '0', fecha_inicio = 'Sunday - 13 of November of 2005 at 19:37', fecha_cierre = '', opcion_1 = '80's', votos_1 = '1', opcion_2 = '90's', votos_2 = '0', opcion_3 = '2000's', votos_3 = '0', opcion_4 = '', votos_4 = '0', opcion_5 = '', votos_5 = '0', opcion_6 = '', votos_6 = '0', opcion_7 = '', votos_7 = '0', opcion_8 = '', votos_8 = '0', opcion_9 = '', votos_9 = '0', opcion_10 = '', votos_10 = '0' WHERE orden = '1'
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 've start listening music on....', visitante = '0', plazo_votac
Warning: Cannot modify header information - headers already sent by (output started at /home/blacktra/public_html/includes/db_mysql.php:188) in /home/blacktra/public_html/encuestas_resultados.php on line 405
how can i fix it ?
-
opcion_1 = '80's', opcion_2 = '90's' & opcion_3 = '2000's' this is the Problem...
please don´t use 80's
-
@beseech
Please post the Error Msg for us...
-
aahhh i see , this get error when we use ' on words .... now working fine :mrgreen:
-
Whatever I do, it does not count any votes nor can I save the settings in the admin panel.
I've tried it all... from erasing and reinstalling the DB table to completely reinstalling the mod several times. (also tried the spanish original)
I do not get any errors or whatever.... it just does not store anything in the tables when hitting "vote" in a poll or any of the "save", "accept", "add", "delete" or "refresh poll" buttons in the ACP-tool.
Anyone a clue what this could be?
-
A question: How can I change the navigation text on my page, without killing the mod?
It looks like this: Home / encuestas_result --> Is it possible like this: Home / Umfragen Resultate
:?: :?: :?:
cheers
-
... du meist im Clickstream ... ?
in Zeile ca. 11 der "encuestas_resultados.php" ändere wie folgt :
$txt_clickstream = "Umfrage-Ergebnisse";
mawenzi
-
:mrgreen: Danke, hab gleich noch was gelernt! Dein Code gibts zwar bei mir nicht, habs aber an anderer Stelle in anderem Code gefunden und geändert.
Danke nochmals :mrgreen:
-
isn't possible create a option to users (reg. only) to leave comment(s) about poll question or results, some similar at default comments styles used on details.php ??
:?:
-
Hi everyone,
nice mod. Installation was fine, but now I have the same Problem:
the table is installed to the database. i can see it.
but not saving the modified options.
any more ideas?
i can't save the modified options in the ACP?
Has anybody an idea?
Thanks.
-
Hello
My question: How can I deactivate the poll-script, so that I users can't see the polls on the page... (eg. with an on/off-button in the ACP...!??)
:?: :?: :?:
Thanks
-
@ Olphi,
... eine vergleichbare Anleitung für die Einbindung als Setting-Group findest du hier (http://www.4homepages.de/forum/index.php?topic=11089.0) ...
-
@ Olphi,
... eine vergleichbare Anleitung für die Einbindung als Setting-Group findest du hier (http://www.4homepages.de/forum/index.php?topic=11089.0) ...
Vielen Dank :wink: Probiere es mal....
-
Hi everyone,
I had the same problem:
Whatever I do, it does not count any votes nor can I save the settings in the admin panel.
I've tried it all... from erasing and reinstalling the DB table to completely reinstalling the mod several times. (also tried the spanish original)
I do not get any errors or whatever.... it just does not store anything in the tables when hitting "vote" in a poll or any of the "save", "accept", "add", "delete" or "refresh poll" buttons in the ACP-tool.
Anyone a clue what this could be?
Try this:
put register_globals = ON
-
DB Error: Bad SQL Query: SELECT * FROM 4images_encuestas ORDER BY orden
DB Error: Bad SQL Query: UPDATE 4images_encuestas SET orden = '', nombre = '', visitante = '', plazo_votacion = '', fecha_inicio = '', fecha_cierre = '', opcion_1 = 'Insert the option', votos_1 = '0', opcion_2 = 'Insert the option', votos_2 = '0', opcion_3 = '', votos_3 = '', opcion_4 = '', votos_4 = '', opcion_5 = '', votos_5 = '', opcion_6 = '', votos_6 = '', opcion_7 = '', votos_7 = '', opcion_8 = '', votos_8 = '', opcion_9 = '', votos_9 = '', opcion_10 = '', votos_10 = '' WHERE orden = ''
Table 'paddygree.4images_encuestas' doesn't exist
What can I do? Help plz
-
Finally execute the install_encuestas.php , then go to the panel of control and to enter the information of the form of the polls.
-
Ejecución:
CREATE TABLE `4images_encuestas` (
orden int(2) unsigned NOT NULL auto_increment,
nombre varchar(50) NOT NULL default '',
visitante varchar(4) NOT NULL default '',
plazo_votacion varchar(10) NOT NULL default '',
fecha_inicio varchar(50) NOT NULL default '',
fecha_cierre varchar(50) NOT NULL default '',
opcion_1 varchar(30) NOT NULL default '',
votos_1 int(2) NOT NULL default '0',
opcion_2 varchar(30) NOT NULL default '',
votos_2 int(2) NOT NULL default '0',
opcion_3 varchar(30) NOT NULL default '',
votos_3 int(2) NOT NULL default '0',
opcion_4 varchar(30) NOT NULL default '',
votos_4 int(2) NOT NULL default '0',
opcion_5 varchar(30) NOT NULL default '',
votos_5 int(2) NOT NULL default '0',
opcion_6 varchar(30) NOT NULL default '',
votos_6 int(2) NOT NULL default '0',
opcion_7 varchar(30) NOT NULL default '',
votos_7 int(2) NOT NULL default '0',
opcion_8 varchar(30) NOT NULL default '',
votos_8 int(2) NOT NULL default '0',
opcion_9 varchar(30) NOT NULL default '',
votos_9 int(2) NOT NULL default '0',
opcion_10 varchar(30) NOT NULL default '',
votos_10 int(2) NOT NULL default '0',
KEY `orden` (`orden`)
)TYPE=MyISAM
DB Error: Bad SQL Query: CREATE TABLE `4images_encuestas` ( orden int(2) unsigned NOT NULL auto_increment, nombre varchar(50) NOT NULL default '', visitante varchar(4) NOT NULL default '', plazo_votacion varchar(10) NOT NULL default '', fecha_inicio varchar(50) NOT NULL default '', fecha_cierre varchar(50) NOT NULL default '', opcion_1 varchar(30) NOT NULL default '', votos_1 int(2) NOT NULL default '0', opcion_2 varchar(30) NOT NULL default '', votos_2 int(2) NOT NULL default '0', opcion_3 varchar(30) NOT NULL default '', votos_3 int(2) NOT NULL default '0', opcion_4 varchar(30) NOT NULL default '', votos_4 int(2) NOT NULL default '0', opcion_5 varchar(30) NOT NULL default '', votos_5 int(2) NOT NULL default '0', opcion_6 varchar(30) NOT NULL default '', votos_6 int(2) NOT NULL default '0', opcion_7 varchar(30) NOT NULL default '', votos_7 int(2) NOT NULL default '0', opcion_8 varchar(30) NOT NULL default '', votos_8 int(2) NOT NULL default '0', opcion_9 varchar(30) NOT NULL default '', votos_9 int(2) NOT NULL default '0', opcion_10 varchar(30) NOT NULL default '', votos_10 int(2) NOT NULL default '0', KEY `orden` (`orden`) )TYPE=MyISAM
Table '4images_encuestas' already exists
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('','Que opinas de esta galería ?', '0', '0', 'Saturday - 28 of January of 2006 at 11:09', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)
DB Error: Bad SQL Query: INSERT INTO `4images_encuestas` VALUES ('','Que opinas de esta galería ?', '0', '0', 'Saturday - 28 of January of 2006 at 11:09', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)
Column count doesn't match value count at row 1
Intentarlo otra vez
Volver a la galería
this error comes up when i open the /4images/install_encuestas.php and click on the install button :(
i just now can see in my gallery the "vote" and "see polls" button. but can not control the poll mod in my admin centre.
-
I have the error...
Fatal error: Cannot redeclare addslashes_array() (previously declared in /home/cique/public_html/celular/global.php:33) in /home/cique/public_html/celular/global.php on line 33
i need some help... and excuse for my english.. i'm brazilian...hehehe
Cique;)
-
I have just tested this MOD and I haven't seen any of these problems. I can only say that these errors might be related to an implementation issue ...
P.S : Yes, I have also tested under the ACP's plugin file and everything seems to update just fine ...
Am I missing something ?
[ EDIT ]
If you're experiencing difficulties with the "orden" field, simply apply the following command in your phpmyadmin's SQL Query Window :
ALTER TABLE `4images_encuestas` ADD `orden` INT( 2 ) NOT NULL;
Note: Assuming your SQL table name is : 4images_encuestas, you may execute the action immediately. Otherwise, change the indicated table name before proceeding.
-
ty for poll all works fine ;)
-
I just installed this mod & so far it works fine.
However there is just one thing. When seeing the result, In click stream text it shows
"Home >> encuestas_result"
How can I change this to show "Home >> Poll Result"
-
Mod is installed on a 4images 1.7.2 and it's works :D
thanks again for this great mod 8)
-
Greetings,,
I feel much not to be able to lend aid to the different doubts that there are and that are leaving, but I do not speak English nor German.
Use a translator of the network and most of the times the translation is not correct and for that reason I leave in the forum of English are other that solve these doubts.
Thanks for its understanding.
excitex2
-
what should i change to show "U already voted"
??
-
Since updating the security bug fixes in this forum for version 1.7.1 and starting a new poll my votes (exactly user votes) will not be saved.
Also the "you already voted" alert message is not coming up.
Saving configuration in ACP is working. Also my save global registers are ON.
The Poll Mod and my first Poll was working correct, but now it isn't.
Could anyone please advice me how to fix this upcoming error?
-
Push :roll:
I have added my encuestas.php, encuestas_histo.php and my encuestas_resultados.php
for help.
I am very dissapointed and confused with this MOD now.
First it was running now it isn't.
PLEASE HELP ME!
-
Greetings,,,
You have modified the code of script.
In order to correct badly the operation “</form>” erases the label that has inserted in template encuestas.html and modifies in encuestas.php the line:
</tr><tr><td width=\"100%\" align=\"center\" class=\"row1\">
by this other:
</tr><tr><td width=\"100%\" align=\"center\" class=\"row1\"></form>
excitex2
-
hello, i have a problem with firefox.
the table with .gif image is not correct view, only firefox (see above)
> 0% is not 0%
who has here a solution??
greets ivan
ohh i ve this problem too... :(
-
I am getting this error
Warning: Cannot modify header information - headers already sent by (output started at /home/takfeed/public_html/shop/includes/db_mysql.php:190) in /home/takfeed/public_html/shop/encuestas_resultados.php on line 92
Warning: Cannot modify header information - headers already sent by (output started at /home/takfeed/public_html/shop/includes/db_mysql.php:190) in /home/takfeed/public_html/shop/encuestas_resultados.php on line 403
-
can some body help!!!!!!!!!!
DB Error: Bad SQL Query: SELECT user_t_images, user_name, user_id FROM 4images_users WHERE user_level >= '2' ORDER BY user_t_images DESC LIMIT 10
Unknown column 'user_t_images' in 'field list'
-
No cross posting please....
-
it was new error :roll:
hope I can find some one a live to answer!
-
I have installed this mod it runs great just a quick question is there a way to run multiple POLLS :D
-
no soultions until now! :twisted:
-
9º) Open : index.php
Find
require(ROOT_PATH.'includes/sessions.php');
add after
include(ROOT_PATH.'encuestas.php');
Save changes
... if you want to show Poll on details.html ...
... then is step 9º) also necessary in details.php ... :!:
( please, dont ask what to do if you want to show Poll on categories.html ... :mrgreen: )
PS. please remove your details.html code ...
-
Wow u made my day dude thanks a lot for your help it worked and i removed that detail.html thanks a lot for your help :X
-
Hey Everybody,
someone asked how to change the cllickstream name for the result page...
I found a solution...
find the following line in your encuestas_resultados.php:
[qcode]
$clickstream .= $main_template;
[/qcode]
and replace it with:
[qcode]
$clickstream .= $lang['texto_titulo'];
[/qcode]
So it shows "Poll - Results" or anything you want .... (edit your lang files)
-
getting this error
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('1_opcion', 'Excelente', 'Que opinas de esta galería ?', 0)
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('2_opcion', 'Buena', 'Que opinas de esta galería ?', 0)
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('3_opcion', 'Regular', 'Que opinas de esta galería ?', 0)
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('4_opcion', 'Mala', 'Que opinas de esta galería ?', 0)
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('5_opcion', 'Malísima', 'Que opinas de esta galería ?', 0)
-
Hi Guys, have installed the mod.. after some errors it works...
but now... wenn i vote and klick the result button... the result page is to width for my site...
because my main site is just 640 pixel width....
editing the main site embeded plugin page (where to vote) worked, but the result page... doesnt fit after editing...
and everyvery in file stands 100% (tried 640, but doesnt work... then tried 450 because left side bar is 150 .. doesnt work...)
damn... what did i have to change to fix it??
screenshots are added
thx UFO
p.s. how i get the green / in the result page away... i edit the Font Color in the Result but its still green... :-/ ARG
-
hey guys i am using 4images 1.7.4 and i have inregrate the phpbb 2.23 to my gallery and i tried to integrate this poll but i couldnt let it work i can see the mod with out any answers on my home page. i can see option page under the plugin side at my acp but when i try to make a new poll it says that a modifate the poll and i click to referesh and nothing happend.
i put a screenshot pic
and when i execute the install script it gives a error
An unexpected error occured. Please try again later.
Ejecución:
INSERT INTO `4images_encuestas` VALUES ('','Que opinas de esta galería ?', '0', '0', 'Persembe - 19 of Nisan of 2007 at 15:37', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)
An unexpected error occured. Please try again later.
screenshot pic
and here is my code
<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
$mod_name = "Encuestas / Poll Versión 2.0";
$mod_author = "excitex";
$fecha= $lang['fecha'];
$sql_data = array(
"CREATE TABLE `".ENCUESTAS_TABLE."` (
orden int(2) unsigned NOT NULL auto_increment,
nombre varchar(50) NOT NULL default '',
visitante varchar(4) NOT NULL default '',
plazo_votacion varchar(10) NOT NULL default '',
fecha_inicio varchar(50) NOT NULL default '',
fecha_cierre varchar(50) NOT NULL default '',
opcion_1 varchar(30) NOT NULL default '',
votos_1 int(2) NOT NULL default '0',
opcion_2 varchar(30) NOT NULL default '',
votos_2 int(2) NOT NULL default '0',
opcion_3 varchar(30) NOT NULL default '',
votos_3 int(2) NOT NULL default '0',
opcion_4 varchar(30) NOT NULL default '',
votos_4 int(2) NOT NULL default '0',
opcion_5 varchar(30) NOT NULL default '',
votos_5 int(2) NOT NULL default '0',
opcion_6 varchar(30) NOT NULL default '',
votos_6 int(2) NOT NULL default '0',
opcion_7 varchar(30) NOT NULL default '',
votos_7 int(2) NOT NULL default '0',
opcion_8 varchar(30) NOT NULL default '',
votos_8 int(2) NOT NULL default '0',
opcion_9 varchar(30) NOT NULL default '',
votos_9 int(2) NOT NULL default '0',
opcion_10 varchar(30) NOT NULL default '',
votos_10 int(2) NOT NULL default '0',
KEY `orden` (`orden`)
)TYPE=MyISAM",
"INSERT INTO `".ENCUESTAS_TABLE."` VALUES ('','Que opinas de esta galería ?', '0', '0', '$fecha', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)",
);
$error_log = array();
$error_msg = "";
if ($action == "modinstall") {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<link rel="stylesheet" href="admin/cpstyle.css">
<title>4images Installer</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
<table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
<tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tablerow2"><td><b>MOD: <?php echo $mod_name; ?></b> (por <?php echo $mod_author; ?>)</td></tr>
<tr class="tablefooter"><td align="center"> </td></tr>
</table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tablerow"><td colspan="2" align="right"></td></tr>
<tr class="tablerow2"><td colspan="2"><br /><blockquote>
<?php
$date = time();
$exist = 0;
$row = $site_db->query("SHOW tables");
while ($r = $site_db->fetch_array($row)) {
if ($r[0] == ENCUESTAS) {
$exist = 1;
break;
}
}
if (!$exist) {
foreach ($sql_data as $val){
echo ($change) ? "" : "Ejecución: <br>";
echo str_replace("\n", "<br />", $val)."<br /><br />";
if (!$site_db->query($val)) {
$error_log[] = str_replace("\n", "<br />", $val);
}
}
}
if (empty($error_log)) {
if ($exist) {
echo "<h4>.<br />No se ha realizado ningun cambio.</h4>";
}else{
echo "</blockquote><h4>Operación realizada con exito!</h4>";
}
}else{
echo "<a href=\"".$self_url."\">Intentarlo otra vez</a><br />";
}
echo "<a href=\"./\">Volver a la galería</a>";
?>
</blockquote></td></tr>
<tr class="tablefooter"><td colspan="2"> </td></tr>
</table>
</td>
</tr>
</table>
</table>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION; ?><br />Copyright © 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a><br /></p>
</body>
</html>
<?php
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<link rel="stylesheet" href="admin/cpstyle.css">
<title>4images Instalador</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
<form action="<?php echo $self_url; ?>" name="form" method="post">
<table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
<tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tablerow2"><td><b>MOD: <?php echo $mod_name; ?></b> (por <?php echo $mod_author; ?>)</td></tr>
<tr class="tablefooter"><td align="center"> </td></tr>
</table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr class="tablerow"><td colspan="2" align="right"></td></tr>
<tr class="tablerow2"><td colspan="2"><center>
Esta aplicación modificará la base de datos de tu galería, por favor<br><b>
<font color="#FF0000">HAZ UNA COPIA DE SEGURIDAD DE LA BASE DE DATOS ANTES DE EJECUTAR ESTA APLICACION!</b></font><br><br>
Por favor comprueba todos los campos que se muestran abajo.<br>
Si no corresponden con tus datos, por favor<br><b>NO EJECUTES ESTA APLICACION</b>!
</center></td></tr>
<tr class="tableheader"><td colspan="2"><b><span class="tableheader">Configuración de la base de datos </span></b></td></tr>
<tr class="tablerow"><td>Tipo de servidor de la base de datos</td><td><?php echo $db_servertype; ?></td></tr>
<tr class="tablerow2"><td>Nombre del servidor donde está instalada la base de datos</td><td><?php echo stripslashes($db_host); ?></td></tr>
<tr class="tablerow"><td>Nombre de la base de datos</td><td><?php echo stripslashes($db_name); ?></td></tr>
<tr class="tablerow2"><td>Prefijo de la TABLA en la base de datos</td><td><?php echo stripslashes($table_prefix); ?></td></tr>
<tr class="tablefooter"><td colspan="2"><center><input type="hidden" name="action" value="modinstall"><input type="submit" value="Iniciar aplicación" class="button" name="submit"></center></td></tr>
</table>
</td>
</tr>
</table>
</form>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION ; ?><br />Copyright © 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a><br /></p>
</body>
</html>
-
Wie immer wurde hier etwas zu viel geschrieben ;)
es gibt hier zuviele verschiedene Codes, so das man hinterher nichts richtiges hat.
So gibt es z.B. 2 verschiedene MySQL Daten (install_encuestas.php )
in dem aus dem ersten Posting bekommt man im Admin einen Datenbank Fehler.
Dann gibt es noch eine install_encuestas.php die auch mit einer encuestas_histo.php arbeitet, da bekomme ich auf der Startseite (nur da) einen Fehler.
DB Error: Bad SQL Query: SELECT * FROM 4images_encuestas ORDER BY opci_nombre, opci_valor, pregunta, votos
Unknown column 'opci_nombre' in 'order clause'
kann mir mal einer einen Schubs geben, da ich annehme das zu der encuestas_histo.php noch einige Daten ergänzt werden müsste.
Nur kann ich da nichts finden.
Danke
-
Got the following error, when i watch a Gallery that is only free for registered Users and then hit the Logout Button
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxx/yyyy/encuestas.php:166) in /www/htdocs/xxxxx/yyyy/includes/functions.php on line 47
or that
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxx/yyyy/encuestas.php:166) in /www/htdocs/xxxxx/yyyy/categories.php on line 37
what is wrong... and what i have to change?
any suggestions?
greetz UFO
p.s. you can also answer in german!
-
Got the following error, when i watch a Gallery that is only free for registered Users and then hit the Logout Button
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxx/yyyy/encuestas.php:166) in /www/htdocs/xxxxx/yyyy/includes/functions.php on line 47
or that
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxx/yyyy/encuestas.php:166) in /www/htdocs/xxxxx/yyyy/categories.php on line 37
what is wrong... and what i have to change?
any suggestions?
greetz UFO
p.s. you can also answer in german!
found the error...
there where blank lines at the end of the encuestas.php ... i deleted them and now it works fine..
-
Hello!
I don't know if somebody need it... but i make draft translation to Russian language.
When I was looking for it, I didn't find it.
Add to lang/russian/main.php (before the ?>):
$lang['hora'] = date("H:i");
$lang['dia_semana'] = array("Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота");
$lang['dia'] = date("j");
$lang['mes'] = array("Декабрь","Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь");
$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'] = "Чтобы проголосовать - Вы должны зарегестрироватся сначала";
$lang['titulo'] = "Название голосования:";
$lang['opciones'] = "Настройки";
$lang['recibido'] = "было сохранено :";
$lang['cerrado'] = "и закрыть :";
$lang['comienzo'] = "Голосование начато :";
$lang['anteriores'] = "Предыдущие голосования :";
$lang['visualizar'] = "Посмотреть результаты";
$lang['puntuacion'] = "Кол-во голосов";
$lang['porcentaje'] = "Процент";
$lang['grafica'] = "График";
$lang['texto_opiniones'] = "Сегодня мнения таковы:";
$lang['texto_total'] = "Всего проголосовало";
$lang['texto_pregunta'] = "Тема голосования : ";
$lang['texto_titulo'] = "Голосования - Настройки";
$lang['texto_titulo_anteriores'] = "Голосования - Настройки - Предыдущее";
$lang['maximas_opciones'] = 10;
$lang['usuarios'] = "пользователей";
$lang['encuestas'] = "Голосования";
$lang['opinar'] = "Голосовать";
$lang['plazo_voto'] = "<p><b><font color=\"#FF0000\">Нет</font> Вы не можете выбрать другой вариант, Вы уже голосовали</b></p>";
Add to lang/russian/admin.php (before the ?>):
$lang['maximas_opciones'] = "10";
$lang['pregunta'] = "Название голосования:";
$lang['cerrar'] = "Закрыть";
$lang['nueva_opcion'] = "Новый вариант";
$lang['nuevas_opciones'] = "новые варианты";
$lang['cerrar_encuesta'] = "Закрыть и Сохранить";
$lang['borrar_opciones'] = "Удалить вариант";
$lang['borrar_opcion'] = "Удалить ";
$lang['add_opciones'] = "Добавить варианты";
$lang['config_opciones'] = "Исправить кол-во вариантов";
$lang['actualizar_encuestas'] = "Обновить голосование";
$lang['guardar_modificacion'] = "Сохранить";
$lang['opcion'] = "Настройки";
$lang['control_encuestas'] = "Контроль Голосований";
$lang['nombre_opcion'] = "название варианта";
$lang['borrar_total'] = "Удалить предыдущий вариант";
$lang['actualizar_pagina'] = "Обновить страницу";
$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>Вы изменили голосование, пожалуйста обновить страницу</b>";
$lang['texto_add_opcion'] = "<b>Вы добавили новый вариант в голосование, пожалуйста обновите страницу</b>";
$lang['texto_borrar_opciones'] = "<b>Вы удалили опцию голосования, пожалуйста обновите страницу</b>";
$lang['texto_cerrar_encuestas'] = "<b>Вы закрыли и сохранили голосование, и создали новое,
пожаолуйста проверьте секцию</br><b><font color=\"FF0000\">Можно голосовать </font></b> y <b><font color=\"FF0000\"> Время между голосами</font>
</b>,,, обновить страницу </b>";
$lang['texto_borrar_total'] = "<b>Вы стерли предыдущее голосование, обновите страницу </b>";
$lang['texto_aviso'] = "<b><font color=\"FF0000\">выбрать маленькое кол-во</font>Это было изменено".
"<font color=\"FF0000\">".$lang['maximas_opciones']."</font> Настройки </b>";
$lang['texto_aviso_minimo'] = "<b><font color=\"FF0000\">Вы не можете более удалить опции,</font> должно быть хотя бы 2 варианта.</b>";
$lang['texto_aviso_total'] = "<b><font color=\"FF0000\">Вы должны выбрать голосование.</font></b>";
$lang['texto_pregunta'] = "Введите название голосования";
$lang['texto_opciones'] = "Введите вариант голосования";
$lang['visitas'] = "Разрешено голосовать:";
$lang['aceptar'] = "Принять";
$lang['tiempo_votos'] = "Время между голосами одного и того же пользователя";
$lang['hora'] = "время";
$lang['dia'] = "день";
$lang['minutos'] = "минуты";
$lang['semana'] = "неделя";
$lang['semanas'] = "недели";
$lang['mes'] = "месяц";
P.S. I'll repeat - that is draft translation, so sorry if mistakes will be founded. And sorry for my "English" :)
-
Hallo
Habe denn MOD auf meiner Seite eingebaut, Funzt auch sehr gut.
Wollte es auch mit in der search.html einfügen aber bekomme dort
einen fehler sobald ich include(ROOT_PATH.'encuestas.php');
in der search.php oder page_header.php einfüge.
Wer kann mir helfen ?
http://cover-fun.no-ip.info/Cover/ (http://cover-fun.no-ip.info/Cover/)
Sorry my English
Hello
Property MOD on my side inserted, Funzt very well.
It wanted to also also insert in the search.html however gets there
an error as soon as I include (ROOT_PATH. “encuestas.php”);
in search.php or page_header.php insert.
Who can help me?
http://cover-fun.no-ip.info/Cover/index.php (http://cover-fun.no-ip.info/Cover/index.php)
-
) TYPE=MyISAM
) TYPE=MyISAM;
-
CREATE TABLE `4images_encuestas` (
`orden` int( 2 ) unsigned NOT NULL AUTO_INCREMENT ,
`nombre` varchar( 50 ) NOT NULL default '',
`visitante` varchar( 4 ) NOT NULL default '',
`plazo_votacion` varchar( 10 ) NOT NULL default '',
`fecha_inicio` varchar( 50 ) NOT NULL default '',
`fecha_cierre` varchar( 50 ) NOT NULL default '',
`opcion_1` varchar( 30 ) NOT NULL default '',
`votos_1` int( 2 ) NOT NULL default '0',
`opcion_2` varchar( 30 ) NOT NULL default '',
`votos_2` int( 2 ) NOT NULL default '0',
`opcion_3` varchar( 30 ) NOT NULL default '',
`votos_3` int( 2 ) NOT NULL default '0',
`opcion_4` varchar( 30 ) NOT NULL default '',
`votos_4` int( 2 ) NOT NULL default '0',
`opcion_5` varchar( 30 ) NOT NULL default '',
`votos_5` int( 2 ) NOT NULL default '0',
`opcion_6` varchar( 30 ) NOT NULL default '',
`votos_6` int( 2 ) NOT NULL default '0',
`opcion_7` varchar( 30 ) NOT NULL default '',
`votos_7` int( 2 ) NOT NULL default '0',
`opcion_8` varchar( 30 ) NOT NULL default '',
`votos_8` int( 2 ) NOT NULL default '0',
`opcion_9` varchar( 30 ) NOT NULL default '',
`votos_9` int( 2 ) NOT NULL default '0',
`opcion_10` varchar( 30 ) NOT NULL default '',
`votos_10` int( 2 ) NOT NULL default '0',
KEY `orden` ( `orden` )
) TYPE - MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =4;
MySQL meldet:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4' at line 29
-
) TYPE=MYISAM;
-
Habe es jetzt so gemacht kommt aber immer noch der fehler
It has now so made comes however still the error
CREATE TABLE `4images_encuestas` (
`orden` int( 2 ) unsigned NOT NULL AUTO_INCREMENT ,
`nombre` varchar( 50 ) NOT NULL default '',
`visitante` varchar( 4 ) NOT NULL default '',
`plazo_votacion` varchar( 10 ) NOT NULL default '',
`fecha_inicio` varchar( 50 ) NOT NULL default '',
`fecha_cierre` varchar( 50 ) NOT NULL default '',
`opcion_1` varchar( 30 ) NOT NULL default '',
`votos_1` int( 2 ) NOT NULL default '0',
`opcion_2` varchar( 30 ) NOT NULL default '',
`votos_2` int( 2 ) NOT NULL default '0',
`opcion_3` varchar( 30 ) NOT NULL default '',
`votos_3` int( 2 ) NOT NULL default '0',
`opcion_4` varchar( 30 ) NOT NULL default '',
`votos_4` int( 2 ) NOT NULL default '0',
`opcion_5` varchar( 30 ) NOT NULL default '',
`votos_5` int( 2 ) NOT NULL default '0',
`opcion_6` varchar( 30 ) NOT NULL default '',
`votos_6` int( 2 ) NOT NULL default '0',
`opcion_7` varchar( 30 ) NOT NULL default '',
`votos_7` int( 2 ) NOT NULL default '0',
`opcion_8` varchar( 30 ) NOT NULL default '',
`votos_8` int( 2 ) NOT NULL default '0',
`opcion_9` varchar( 30 ) NOT NULL default '',
`votos_9` int( 2 ) NOT NULL default '0',
`opcion_10` varchar( 30 ) NOT NULL default '',
`votos_10` int( 2 ) NOT NULL default '0',
KEY `orden` ( `orden` )
) TYPE =MYISAM;
Notice: Constant GET_CACHES already defined in *****\*****\****\encuestas.php on line 3
Notice: Constant ROOT_PATH already defined in *****\*****\****\encuestas.php on line 4
Notice: Undefined variable: total_votos in *****\*****\****\encuestas.php on line 44
Notice: Undefined variable: contador2 in *****\*****\****\encuestas.php on line 44
Notice: Undefined offset: 1 in *****\*****\****\encuestas.php on line 47
-
Is no SQL error - is PHP error - one of file in MOD (encuestas.php).
-
Habe glaub ich den fehler gefunden
habe in der search.php
include(ROOT_PATH.'includes/search_utils.php');
// error_reporting(E_ALL);
$org_search_keywords = $search_keywords;
einfach deaktiviert
I have the error found
I have search.php
include(ROOT_PATH.'includes/search_utils.php');
// error_reporting(E_ALL);
$org_search_keywords = $search_keywords;
simply deactivates
-
error_reporting no go in search ... is go in global ... :mrgreen:
-
Poll v2.0 on / off at ACP
In your admin/settings.php file,
find :
show_form_footer($lang['save_changes'], "", 2);
add above :
//Poll v2 Mod
show_table_separator($setting_group[xx], 2, "#setting_group_xx");
show_setting_row("poll_show", "radio");
(Remember the 'X' rules above).
In your lang/english/admin.php file, above the "?>" tag
/*-- Setting-Group xx --*/ // Poll v2
$setting_group[xx] = "Poll";
$setting['poll_show'] = "Show Poll ?";
Replace XX with the number from the step before!
In your lang/deutsch/admin.php file, above the "?>" tag
/*-- Setting-Group xx --*/ // Poll v2
$setting_group[xx] = "Umfragen";
$setting['poll_show'] = "Umfrage anzeigen ?";
Ersetze XX mit der Nummer der vorherigen Änderung!
In your includes/page_header.php file,
find :
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
add above :
//-----------------------------------------------------
//--- Poll v2 -----------------------------------------
//-----------------------------------------------------
if ($config['poll_show'] != 1) {
$site_template->register_vars(array(
"show_poll" => ($config['poll_show'] != "") ? "" : ""
));
}
Open templates/<your templates>/home.html
find :
<tr><td class="row2"><p align="center">{opci_encuestas}</td></tr>
replace it with this code:
{if show_poll}
<tr><td class="row2"><p align="center">{opci_encuestas}</td></tr>
{endif show_poll}
whereever you want to place the poll
login as admin
run install_show_poll.php for update your db (don't forget to make a backup before)
delete install_show_poll.php !
-
"show_poll" => ($config['poll_show'] != "") ? "" : ""
Why two NULL if $config['poll_show'] != "" for result ? ... :|
-
it does not work correctly
-
Hum ... I no try this MOD for now but I think
"show_poll" => ($config['poll_show'] != "") ? "" : ""
should be:
"show_poll" => ($config['poll_show'] != "") ? true : false
;)
-
it does not work correctly
-
it does not work correctly
Please read my 6th step in signature.
-
kan mir bitte jemand helfen, Bei mir werden die einstellung und stimmungen auf datenbank nicht eingetragen? ich bekomme auch keine fehler meldung,aber tabelle 4images_encuestas existiert bei der datenbank. warum wird nichts gespeichert.
-
Folgendes Problem unter
Plesk
MySQL - 4.1.13
Protokoll-Version: 10
phpMyAdmin - 2.8.2.4
MySQL Client-Version: 4.1.13
funktioniert es nicht
unter
WinXP xampp
Server Version: 5.0.41-community-nt
Protokoll-Version: 10
phpMyAdmin - 2.10.1
MySQL-Client-Version: 5.0.41
funktioniert es nicht
unter
Debian xampp
Server Version: 5.0.45
Protokoll-Version: 10
phpMyAdmin - 2.10.3
MySQL-Client-Version: 5.0.45
funktioniert es
was muß ich ändern ?
wer kann helfen
-
Hi,
i have installed the Poll Script now i have 2 errors.
the error in the admin is:
DB Error: Bad SQL Query: SELECT * FROM 4images_encuestas ORDER BY orden
Table 'ekarten.4images_encuestas' doesn't exist
(but the table is named "ENCUESTAS_TABLE" in the script, why is an error with 4images_encuestas ?
outside the ACP is the error: DB Error: Bad SQL Query: SELECT * FROM 4images_encuestas ORDER BY orden
Table 'ekarten.4images_encuestas' doesn't exist
need help!!!
Please!
Thank you!
-
hi,
check you database and look for the table 4images_encuestas, if you don't find this you create it manuell.
in the install_encuestas.php you can find instructions..
-
Great job excitex2 , the MOD is working perfectly ... :D
thank you for this great tool ... :D
here a german version of ( hier eine deutsche Version von ) :
- lang/Your_language/admin.php
- lang/Your_language/main.php
- admin/plugin/admin_encuestas.php
Danke mawenzi, ich hab' deine Übersetzung integriert. Nun habe ich aber immer alles deutsch (Auswertung).
Die Sprachauswahl Englisch greift nicht. Wie erreiche ich, dass auch die Auswerteseite je nach Sprachwahl richtig angezeigt wird?
Frohe Weihnachten an alle,
Gruß Chris.
-
hello, excitex2
you can help me??
despite language selection always comes with voting the standard language > deutsch
see topic
http://www.4homepages.de/forum/index.php?topic=6859.msg67749#msg67749
greets
Gibt's da noch keine Lösung?
Has anybody fixed this problem?
Chris.
-
Ok, I think I find problem for l=your_lang .
In index.php file,
find:
include(ROOT_PATH.'encuestas.php');
cut line.
Find:
include(ROOT_PATH."includes/page_header.php");
paste after (move to):
include(ROOT_PATH.'encuestas.php');
In encuestas_resultados.php file,
find:
<form method=\"post\" action=\"result_encuestas.php\">
replace:
<form method=\"post\" action=\"" . $site_sess->url(ROOT_PATH . "result_encuestas.php") . "\">
-
Ok, I think I find problem for l=your_lang .
In index.php file,
find:
include(ROOT_PATH.'encuestas.php');
cut line.
Find:
include(ROOT_PATH."includes/page_header.php");
paste after (move to):
include(ROOT_PATH.'encuestas.php');
In encuestas.php file,
find:
<form method=\"post\" action=\"result_encuestas.php\">
replace:
<form method=\"post\" action=\"" . $site_sess->url(ROOT_PATH . "result_encuestas.php") . "\">
Thanks Thunderstrike :oops:, you are the best! ;-)
<form method=\"post\" action=\"" . $site_sess->url(ROOT_PATH . "result_encuestas.php") . "\">
encuestas_resultados.php (not result_....) but I know what you mean, IT WORKS!!!
-
Very good. Thank for posting.
-
I'd like to know if its possible to put the polls inside others templates files like categories.html, lightbox.html and others... I've done this but the form polls only appears in home.html
can someone help me please?
-
Ich hab das mal in die 1.7.6 eingebaut, soweit wird auch alles angezeigt.
Allerdings werden keine Angaben übernommen, sei es auf der Seite oder im AdminPanel.
Was ich lediglich ändern musste ist folgende Datei
admin/plugins/admin_encuestas.php
Da musste ich die Header angabe:
<?php // PLUGIN_TITLE: Control de encuestas
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
In diese ändern:
<?php // PLUGIN_TITLE: Umfrage
$nozip = 1;
define('IN_CP', 1);
$root_path = (!eregi("\/plugins\/", $_SERVER['PHP_SELF'])) ? "./../" : "./../../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
Sonst hat er nichts angezeigt.
Naja jedenfalls ist das Problem, dass halt nicht übernommen wird.
Was kann das sein?
-
hi i have a problem with poll
when i click on Control de encuestas in ACP i get this:
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in /home/medvaric/public_html/kopivanec/admin/plugins/admin_encuestas.php on line 4
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in /home/medvaric/public_html/kopivanec/admin/plugins/admin_encuestas.php on line 4
Fatal error: require() [function.require]: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/medvaric/public_html/kopivanec/admin/plugins/admin_encuestas.php on line 4
and line 4 in this file is:
require(ROOT_PATH.'admin/admin_global.php');
:(
can anyone help me with this? :cry:
-
Ich bekomme bei der Installation folgende Fehlermeldung:
Ejecución:
CREATE TABLE `galerie_encuestas` (
orden int(2) unsigned NOT NULL auto_increment,
nombre varchar(50) NOT NULL default '',
visitante varchar(4) NOT NULL default '',
plazo_votacion varchar(10) NOT NULL default '',
fecha_inicio varchar(50) NOT NULL default '',
fecha_cierre varchar(50) NOT NULL default '',
opcion_1 varchar(30) NOT NULL default '',
votos_1 int(2) NOT NULL default '0',
opcion_2 varchar(30) NOT NULL default '',
votos_2 int(2) NOT NULL default '0',
opcion_3 varchar(30) NOT NULL default '',
votos_3 int(2) NOT NULL default '0',
opcion_4 varchar(30) NOT NULL default '',
votos_4 int(2) NOT NULL default '0',
opcion_5 varchar(30) NOT NULL default '',
votos_5 int(2) NOT NULL default '0',
opcion_6 varchar(30) NOT NULL default '',
votos_6 int(2) NOT NULL default '0',
opcion_7 varchar(30) NOT NULL default '',
votos_7 int(2) NOT NULL default '0',
opcion_8 varchar(30) NOT NULL default '',
votos_8 int(2) NOT NULL default '0',
opcion_9 varchar(30) NOT NULL default '',
votos_9 int(2) NOT NULL default '0',
opcion_10 varchar(30) NOT NULL default '',
votos_10 int(2) NOT NULL default '0',
KEY `orden` (`orden`)
)TYPE=MyISAM
Ejecución:
INSERT INTO `galerie_encuestas` VALUES ('','Que opinas de esta galería ?', '0', '0', 'Monday - 22 of of 2008 at 11:30', '', 'Opcion_1', 0, 'Opcion_2', 0, 'Opcion_3', 0, 'Opcion_4', 0, 'Opcion_5', 0, '', 0, '', 0, '', 0, '', 0, '', 0)
Operación realizada con exito!
Kann mir jemand helfen und sagen was hier zu tun ist? :(
Danke!
-
Pumaa,
die "fehlermeldung" übersetzt: http://translate.google.com/translate_t#es|de|Operaci%C3%B3n%20realizada%20con%20exito! (http://translate.google.com/translate_t#es|de|Operaci%C3%B3n%20realizada%20con%20exito!) :lol:
-
hi i just installed XAMPP and download all files to my local pc so i can do what ever test i needed in future with mods and stuff but on my local pc with xamp its giving me this error
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\4images\encuestas.php:166) in C:\xampp\htdocs\4images\includes\page_header.php on line 391
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\4images\encuestas.php:166) in C:\xampp\htdocs\4images\includes\page_header.php on line 405
But on my hosting all the files are same and everything does anyone know what could be causing it on the local pc with XAMPP
-
hi ivan its working on my hosting server its just my local server which is showing that error im using xampp
**************************
HMmmm i figured out the problem it was extra space at the end of the encuestas.php file which was causing the problem.
-
Another not "supported" mod... :( How can we allow only ONE vote /registered user /poll? It's sad that no one is interested in making mods up-to-date and translate them.
-
@stdio
... feel free and translate it in to every language you want and make the mod up-do-to-date ...
... and don't forget ... publish your translation and update here and make it up-to-date also in 5 years ...
... I'm still waiting ...
-
Hi i have done the code two times but when I am going in control panel and trying to access the Mod PLugin i get this error and yes im using 4images 1.7.6
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in /mounted-storage/home139/sub014/sc75725-AETA/mywebsite.com/admin/plugins/admin_encuestas.php on line 5
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in /mounted-storage/home139/sub014/sc75725-AETA/mywebsite.com/admin/plugins/admin_encuestas.php on line 5
Fatal error: require() [function.require]: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/share/php5/') in /mounted-storage/home139/sub014/sc75725-AETA/mywebsite.com/admin/plugins/admin_encuestas.php on line 5
-
in admn/plugins/admin_encuestas.php replace
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
with:
$root_path = "./../../";
-
Thanks a lot V@NO okay now the plugin error is FIXED Thank you so much for that, also I get and error when i try to vote i get this
DB Error: Bad SQL Query: SELECT * FROM 4images_encuestas ORDER BY orden
Unknown column 'orden' in 'order clause'
Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home139/sub014/sc75725-AETA/mywebsite.com/includes/db_mysql.php:190) in /mounted-storage/home139/sub014/sc75725-AETA/mywebsite.com/encuestas_resultados.php on line 403
-
It will be nice to add a new option like the visitors can add text
for example, have a poll with questions:
what categories you like the best
I have +3000 categories and surely can not have +3000 options (time consuming and boring for me and the visitors --> long page)
of course any other questions would be possible, like which images you like the most, etc etc
someone have a idea for code to add to the actual pool v2
by the way it worked first time and I have version 1.7.11 with plenty other mods
so it work on new version too even if old
-
Would be nice If someone could Re-Up the Version 2.
In Attach there is only Version 1.
Thx.