Author Topic: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!  (Read 205784 times)

0 Members and 1 Guest are viewing this topic.

Offline UFOSWORLD

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #120 on: May 16, 2007, 12:39:59 AM »
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!

Offline UFOSWORLD

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #121 on: June 24, 2007, 12:45:37 AM »
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..

Offline Po4emu4Man

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #122 on: June 28, 2007, 03:46:12 PM »
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 ?>):
Code: [Select]
$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 ?>):
Code: [Select]
$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" :)

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #123 on: August 12, 2007, 12:14:15 AM »
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/
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
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #124 on: August 12, 2007, 01:08:34 AM »
Quote
) TYPE=MyISAM

Quote
) TYPE=MyISAM;
« Last Edit: August 12, 2007, 11:29:56 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #125 on: August 12, 2007, 02:14:24 AM »
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
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #126 on: August 12, 2007, 11:29:44 PM »
Quote
) TYPE=MYISAM;
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #127 on: August 13, 2007, 10:47:28 PM »
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
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #128 on: August 13, 2007, 11:21:27 PM »
Is no SQL error - is PHP error - one of file in MOD (encuestas.php).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #129 on: September 12, 2007, 04:10:26 PM »
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
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #130 on: September 12, 2007, 05:30:09 PM »
error_reporting no go in search ... is go in global ...  :mrgreen:
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #131 on: September 22, 2007, 02:29:47 AM »
Poll v2.0 on / off at ACP

In your admin/settings.php file,

find :
Code: [Select]
show_form_footer($lang['save_changes'], "", 2);
add above :

Code: [Select]
   //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

Code: [Select]
/*-- 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

Code: [Select]
/*-- 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 :

Code: [Select]
//-----------------------------------------------------
//--- Register Global Vars ----------------------------

add above :

Code: [Select]
//-----------------------------------------------------
//--- Poll v2 -----------------------------------------
//-----------------------------------------------------
if ($config['poll_show'] != 1) {

$site_template->register_vars(array(
"show_poll" => ($config['poll_show'] != "") ? "" : ""
));
}

Open templates/<your templates>/home.html

find :

Code: [Select]
<tr><td class="row2"><p align="center">{opci_encuestas}</td></tr>
replace it with this code:

Code: [Select]
{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 !
« Last Edit: September 22, 2007, 03:15:22 AM by Icemann71 »
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #132 on: September 22, 2007, 02:34:48 AM »
Quote
"show_poll" => ($config['poll_show'] != "") ? "" : ""

Why two NULL if $config['poll_show'] != "" for result ? ...  :|
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Icemann71

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #133 on: September 22, 2007, 02:53:54 AM »
it does not work correctly
« Last Edit: September 22, 2007, 03:06:50 AM by Icemann71 »
Have a nice Day ;-)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Poll v2.0 (with ACP integration) NEW VERSION!!!
« Reply #134 on: September 22, 2007, 03:19:43 AM »
Hum ... I no try this MOD for now but I think

Quote
"show_poll" => ($config['poll_show'] != "") ? "" : ""

should be:

Code: [Select]
"show_poll" => ($config['poll_show'] != "") ? true : false

;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?