Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Pollbooth v2.0


Ian

Recommended Posts

  • 3 weeks later...
  • Replies 356
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

 

I am having this exact problem also. Have you had any success in resolving it? Do you know if it is limited to the new version, maybe an older version of pollbooth.php is needed to resolve it.

 

Any help would be greatly appreciated.

 

Thanks,

 

Troy

 

Hello,

 

I installed this contribution which will be very useful for my site.

 

It seems to work, but once someone votes it gives the following message at the top of the page :

 

//function to check that there is no HTML in the comment field. function screenForm($field_value){ $stripped = strip_tags($field_value); if($field_value!=$stripped) { // something in the field value was HTML return false; } else return true; }

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dca/public_html/catalog/pollbooth.php:11) in /home/dca/public_html/catalog/includes/functions/sessions.php on line 67

although the reesults are there and the rest of the site is O from then on....but thje error lines are at the top for that moment right after voting

 

Any ideas ?

 

dca

Link to comment
Share on other sites

I tried to get rid of the top part of the file, the part above the first <?php. That seems to have worked. It may be that that part is not needed in some settings. But so far it has worked for me. I have to get the results to land where I want them to the bottom right, insted of the left. But I should be able to get that done.

 

I hope this will help somebody else.

 

Troy :thumbsup:

 

Hello,

 

I am having this exact problem also. Have you had any success in resolving it? Do you know if it is limited to the new version, maybe an older version of pollbooth.php is needed to resolve it.

 

Any help would be greatly appreciated.

 

Thanks,

 

Troy

Link to comment
Share on other sites

Sorry, the file I changed was pollbooth.php in the root directory

 

I tried to get rid of the top part of the file, the part above the first <?php. That seems to have worked. It may be that that part is not needed in some settings. But so far it has worked for me. I have to get the results to land where I want them to the bottom right, insted of the left. But I should be able to get that done.

 

I hope this will help somebody else.

 

Troy :thumbsup:

Link to comment
Share on other sites

  • 3 weeks later...
Hello,

 

I installed this contribution which will be very useful for my site.

 

It seems to work, but once someone votes it gives the following message at the top of the page :

 

//function to check that there is no HTML in the comment field. function screenForm($field_value){ $stripped = strip_tags($field_value); if($field_value!=$stripped) { // something in the field value was HTML return false; } else return true; }

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dca/public_html/catalog/pollbooth.php:11) in /home/dca/public_html/catalog/includes/functions/sessions.php on line 67

although the reesults are there and the rest of the site is O from then on....but thje error lines are at the top for that moment right after voting

 

Any ideas ?

 

dca

open pollboot.php on catalog

 

at the top of the file you look like this:

 

//function to check that there is no HTML in the comment field.

 

function screenForm($field_value){

$stripped = strip_tags($field_value);

if($field_value!=$stripped) { // something in the field value was HTML

return false;

}

else return true;

}

 

 

correct whit this

 

<?php

//function to check that there is no HTML in the comment field.

 

function screenForm($field_value){

$stripped = strip_tags($field_value);

if($field_value!=$stripped) { // something in the field value was HTML

return false;

}

else return true;

}

?>

 

and try.

Link to comment
Share on other sites

Hi All,

 

Great contrib! Easy to install and administer.

 

A few minor things however that I came across:

 

1. When adding poll options that have single quotes in the text, I get SQL parse errors. Prob. needs some code check there (or I am missing out on something or screwed up something in my code or db settings).

 

2. As mentioned already in this topic: when disabling the comment option, it is still available on the page (quoted out the "add comment" link in the code, and that works for now, but ofcourse not a nice sollution).

 

For those of you who also came across this problem, here is how I did it:

 

In poll_results.php at approx. line 120 find:

 

<tr><td colspan="2" align="center" class="main">[ <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a> ]</td></tr>

 

and replace with:

 

<tr><td colspan="2" align="center" class="main">[ <!-- <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | //--> <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a> ]</td></tr>

 

Not very nice, but it works to keep annoying commenters away.

 

3. When polls run in different languages, the total is calculated correctly (e.g. dutch votes + english votes = total votes), but the percentage bars only show the totals per language. Tried to resolve this by eliminating the (language_id = '" . $languages_id . "') in the $results query from the poll_results.php file, but that mangled the output in a strange way (if votes for an option are cast in visitors language, totals for option are show for that language, if no votes for an option are cast in visitors language but are cast in another language, then the other language options' name is shown in that language, and so are the vote counts).

 

I'd like to know if someone came across the same problems (especially no. 3) and has found some form of resolution for it. Thanks in advance for sharing!

 

Regards

Link to comment
Share on other sites

  • 2 weeks later...
open pollboot.php on catalog

 

at the top of the file you look like this:

 

//function to check that there is no HTML in the comment field.

 

function screenForm($field_value){

$stripped = strip_tags($field_value);

if($field_value!=$stripped) { // something in the field value was HTML

return false;

}

else return true;

}

correct whit this

 

<?php

//function to check that there is no HTML in the comment field.

 

function screenForm($field_value){

$stripped = strip_tags($field_value);

if($field_value!=$stripped) { // something in the field value was HTML

return false;

}

else return true;

}

?>

 

and try.

didn't worked for me

this is what i get

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/l/u/x/luxurystore/html/infotanicos/test/pollbooth.php:13) in /home/content/l/u/x/luxurystore/html/infotanicos/test/includes/functions/sessions.php on line 102

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/l/u/x/luxurystore/html/infotanicos/test/pollbooth.php:13) in /home/content/l/u/x/luxurystore/html/infotanicos/test/includes/functions/sessions.php on line 102

Link to comment
Share on other sites

Hi there i am new in oscommerce... I am using oscommerce2-2.Rc2a and I have installed the pollboth v2.3 and i get the following error in my admin Poll Manager:

 

It has a link but instead of the image to create a new poll i get this error :

 

' . tep_image(DIR_WS_IMAGES . 'button_new_poll.gif', IMAGE_NEW_POLL) . ' ';?>

 

 

Once i click the link above ... i get the following error to the next page:

 

 

The requested URL /shop/catalog/admin/' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info')) . 'action=new', 'NONSSL') . ' was not found on this server.

 

 

Any ideas how to fix this ?

 

Thank you

sepaht

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I am having exactly the same problem with you, can anybody help me ? i am really out of clue here.

I am using v 2.3

 

 

 

Regards,

 

HI all

 

I am not quite sure if I should add this here or start a new post, however here is my QUESTION...

 

I have a two languages site and as the poll is multi-language, I thought that it would be a nice extra to add.

 

However, I can't believe that it works in a funny way. One single poll in two languages works like if there were two single poll.

 

Pratically the same question is answered like if there were TWO polls.......

 

My idea of a multi language poll is:

 

Poll name : you like red or white? - Ti piace rosso o bianco (italian )

 

if you answer in English or in Italian, the poll should be posted in one place only.

 

Red = 10

White = 15

 

and it shouldn't matter if the poster posted from the Italan or English language..

 

Hope you understand what I mean....

 

Salvo

Link to comment
Share on other sites

  • 1 month later...

Hi All,

I have installed pollbooth v2.3.1 and can't work out why the following error pops up once the user has voted:

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/amazing/public_html/pollbooth.php:13) in /home/amazing/public_html/includes/functions/sessions.php on line 102

 

The vote is recorded, and comments are ok.

 

Any thoughts appreciated,

 

Cheers

Chris

Link to comment
Share on other sites

  • 1 month later...

on admin/polls.php line 407

 

original:

<td class="smalltext" align="right"> <?php echo $polls_split->display_links($poll_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?> <? echo '<br><br> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info')) . 'action=new', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'button_new_poll.gif', IMAGE_NEW_POLL) . '</a> ';?></td>

 

edited:

<?php echo $polls_split->display_links($poll_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?> <?php echo '<br><br> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info')) . 'action=new', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'button_new_poll.gif', IMAGE_NEW_POLL) . '</a> ';?></td>

 

notice there are a missing <?php

 

hope it help

 

--------------

 

Hi there i am new in oscommerce... I am using oscommerce2-2.Rc2a and I have installed the pollboth v2.3 and i get the following error in my admin Poll Manager:

 

It has a link but instead of the image to create a new poll i get this error :

 

' . tep_image(DIR_WS_IMAGES . 'button_new_poll.gif', IMAGE_NEW_POLL) . ' ';?>

 

 

Once i click the link above ... i get the following error to the next page:

 

 

The requested URL /shop/catalog/admin/' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info')) . 'action=new', 'NONSSL') . ' was not found on this server.

 

 

Any ideas how to fix this ?

 

Thank you

sepaht

Link to comment
Share on other sites

  • 1 month later...

Using the most current version as of today.

 

When "all categories" is selected via admin, the poll shows on all pages (index, specials, etc) but not in any specific categories.

 

When a specific category is selected via admin, the poll shows in the category only as it should.

 

Not sure why polls wont show in "all categories"

 

Anyone have any ideas?

Edited by kmb40
Link to comment
Share on other sites

  • 4 weeks later...

Hi there

 

I've just installed pollbooth_v2.3.1, or should I say, tried to install it. All went well, but then when I wanted to log into my admin account, I got a 404 Not Found error. I ran the poll.sql in phpmyadmin and that also went smoothly so I just don't understand what went wrong. I've now deleted all modifications in my files, but not deleted the entries in my database, and I still get a 404 error when I try to log in. I've tried refresh after each modification, but nothing works.

 

Isn't there anyone out there that has experienced this issue and has found a solution??? Or perhaps someone with a good ide what might be wrong??

Link to comment
Share on other sites

Hi there

 

I've just installed pollbooth_v2.3.1, or should I say, tried to install it. All went well, but then when I wanted to log into my admin account, I got a 404 Not Found error. I ran the poll.sql in phpmyadmin and that also went smoothly so I just don't understand what went wrong. I've now deleted all modifications in my files, but not deleted the entries in my database, and I still get a 404 error when I try to log in. I've tried refresh after each modification, but nothing works.

 

Isn't there anyone out there that has experienced this issue and has found a solution??? Or perhaps someone with a good ide what might be wrong??

 

 

Hmmmmm....just forget my question, I managed to log in but now I get an error when I try to create a poll:

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 ' 'Test', 0, 0, '6')' at line 1

 

insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values (, 'Test', 0, 0, '6')

 

So I guess I'll start looking for the solution to that now :-)

Link to comment
Share on other sites

Hi There

 

Has anyone resolved the session cookie and cache probelems yet ?

 

 

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/treasure/domains/pastaetc.nl/public_html/pollbooth.php:15) in /home/treasure/domains/pastaetc.nl/public_html/includes/functions/sessions.php on line 97

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/treasure/domains/pastaetc.nl/public_html/pollbooth.php:15) in /home/treasure/domains/pastaetc.nl/public_html/includes/functions/sessions.php on line 97

Link to comment
Share on other sites

Hmmmmm....just forget my question, I managed to log in but now I get an error when I try to create a poll:

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 ' 'Test', 0, 0, '6')' at line 1

 

insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values (, 'Test', 0, 0, '6')

 

So I guess I'll start looking for the solution to that now :-)

 

insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values ('', 'Test', 0, 0, '6')

 

 

That should work.

Link to comment
Share on other sites

insert into phesis_poll_data (pollid,optiontext,optioncount,voteid, language_id) values ('', 'Test', 0, 0, '6')

 

 

That should work.

 

 

It looks to me like when you added code to your admin/includes/application_top.php you have added it at the top instead of placing it befre the last ?> it should work then! also repeat for the mod to the catalog/includes/application_top.php

 

 

Im gonna have to have a look at this bug with why comments when disabled are still getting posted, this most likely worked in an earlier version but has broke since.

Link to comment
Share on other sites

I have added a fix to the addons site, for disabling/enabling comments like how it should of been, but I found another bug which still needs fixing... if you set comments to 10, you can still bypass this limit, as the code is broke, if this is fixed then its 100% working.

Link to comment
Share on other sites

didn't worked for me

this is what i get

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/l/u/x/luxurystore/html/infotanicos/test/pollbooth.php:13) in /home/content/l/u/x/luxurystore/html/infotanicos/test/includes/functions/sessions.php on line 102

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/l/u/x/luxurystore/html/infotanicos/test/pollbooth.php:13) in /home/content/l/u/x/luxurystore/html/infotanicos/test/includes/functions/sessions.php on line 102

 

<?php

//function to check that there is no HTML in the comment field.

function screenForm($field_value){

$stripped = strip_tags($field_value);

if($field_value!=$stripped) { // something in the field value was HTML

return false;

}

else return true;

}

 

?> ---->just remove this

<?php ----> just remove this ----->>>>> I hope it will work.

 

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/pollbooth.php');

$location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>';

DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5');

if (($HTTP_GET_VARS['action']=='do_comment')&& (screenForm($HTTP_POST_VARS['comment']))) {

$comment_query_raw = "insert into phesis_comments (pollid, customer_id, name, date, host_name, comment,language_id) values ('" . $HTTP_GET_VARS['pollid'] . "', '" . $customer_id . "', '" . addslashes($HTTP_POST_VARS['comment_name']) . "', now(),'" . $REMOTE_ADDR . "','" . addslashes($HTTP_POST_VARS['comment']) . "','" . $languages_id . "')";

$comment_query = tep_db_query($comment_query_raw);

$HTTP_GET_VARS['action'] = '';

$HTTP_GET_VARS['op'] = 'results';

}

?>

Link to comment
Share on other sites

  • 1 month later...

Hi

 

I check working of this poll module at site thecoolingemporium.co.uk

 

Good idea will be 2 changes to this module:

1) If user has voted, the poll don't show, but for example poll results are show (without graphic chart, only label with number of votes).

2) Clicking on label of voting option also has check radio button, not only clicking on radio button.

 

Or maybe this modules (or one of them) is implemented now (and at thecoolingemporium.co.uk is older version of module)?

 

Somebody also thinks about this improvement?

My simply great signature...

Link to comment
Share on other sites

  • 3 weeks later...

Regarding the session cookie and cache limiter error, there is a mistake in pollbooth.php, atleast the one I downloaded.

 

Original pollbooth.php lines 1-22

 

//function to check that there is no HTML in the comment field.

function screenForm($field_value){
$stripped = strip_tags($field_value);
if($field_value!=$stripped) { // something in the field value was HTML
return false;
}
else return true;
} 

<?php
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/pollbooth.php');
 $location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>';
 DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5');
if (($HTTP_GET_VARS['action']=='do_comment')&& (screenForm($HTTP_POST_VARS['comment']))) {
  $comment_query_raw = "insert into phesis_comments (pollid, customer_id, name, date, host_name, comment,language_id) values ('" . $HTTP_GET_VARS['pollid'] . "', '" . $customer_id . "', '" . addslashes($HTTP_POST_VARS['comment_name']) . "', now(),'" . $REMOTE_ADDR . "','" . addslashes($HTTP_POST_VARS['comment']) . "','" . $languages_id . "')";
  $comment_query = tep_db_query($comment_query_raw);
 $HTTP_GET_VARS['action'] = '';
  $HTTP_GET_VARS['op'] = 'results';
}
?>

 

You can either delete the function on lines 1-10 (everything before <?php) or

Change to:

 

<?php
//function to check that there is no HTML in the comment field.

function screenForm($field_value){
$stripped = strip_tags($field_value);
if($field_value!=$stripped) { // something in the field value was HTML
return false;
}
else return true;
} 
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/pollbooth.php');
 $location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>';
 DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5');
if (($HTTP_GET_VARS['action']=='do_comment')&& (screenForm($HTTP_POST_VARS['comment']))) {
  $comment_query_raw = "insert into phesis_comments (pollid, customer_id, name, date, host_name, comment,language_id) values ('" . $HTTP_GET_VARS['pollid'] . "', '" . $customer_id . "', '" . addslashes($HTTP_POST_VARS['comment_name']) . "', now(),'" . $REMOTE_ADDR . "','" . addslashes($HTTP_POST_VARS['comment']) . "','" . $languages_id . "')";
  $comment_query = tep_db_query($comment_query_raw);
 $HTTP_GET_VARS['action'] = '';
  $HTTP_GET_VARS['op'] = 'results';
}
?>

Link to comment
Share on other sites

  • 4 months later...

Dear all...

 

One more time i need some help...

 

I install the pollbooth with out problems but after install and and my first poll i saw can view the poll on index.php but for example when i click in one category (Car Audio for example) inside this category the poll disapear... So the poll it's only displayed on index and not in inside category's...

 

 

Can anyone help me with this issue????

 

 

 

Best Regards

João Carrolo

KarTunes

Link to comment
Share on other sites

Dear all...

 

One more time i need some help...

 

I install the pollbooth with out problems but after install and and my first poll i saw can view the poll on index.php but for example when i click in one category (Car Audio for example) inside this category the poll disapear... So the poll it's only displayed on index and not in inside category's...

 

 

Can anyone help me with this issue????

 

 

 

Best Regards

João Carrolo

KarTunes

 

 

I Have one small problem regarding this contribution...

 

 

I have the Ultimate SEO URLs installed and when i click on Poll results the link is http://127.0.0.1/loja-pt/-po-2.html?op=results in my opinion

must be http://127.0.0.1/loja-pt/name-of-poll-po-2.html?op=results, Thats Right????

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...