sonictrip.net Posted August 16, 2004 Share Posted August 16, 2004 (edited) Ok, just came across another post about the "Cannot redeclare pollnewest()" error and discovered that i had the code: require('includes/boxes/polls.php'); in column_left.php and column_right.php so i just removed it from one of them and everthing is now fine. Although im still getting my left hand admin menu displaying everything like so i said in the last post: BOX_HEADING_CONFIGURATION etc. and BOX_TOOLS_BACKUP etc. Anyone got any ideas why that would be happening but yet the "poll" option on the menu seems fine...?? One more thing... in the actual poll infobox on the site, the comments string is appearing as _COMMENTS. How would i alter that? Thanks! :rolleyes: Edited August 16, 2004 by sonictrip.net Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted August 16, 2004 Share Posted August 16, 2004 Hello again, just wondering if it is possible to vote on more than one option? Like a checkbox system instead of radio buttons...? The radio button option only seems to let you choose one option instead of a few... Any ideas? Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted August 19, 2004 Share Posted August 19, 2004 I just noticed that changing "radio_button" to "checkbox" on line 72 of the polls.php file changes the buttons to checkboxes. Is this the proper way to do it though or is there a way of doing it so that you can choose in each poll whether you want to use radio buttons or checkboxes? Quote Link to comment Share on other sites More sharing options...
ckyshop.co.uk Posted August 31, 2004 Share Posted August 31, 2004 There is a major security issue, try http://yourdomain.com/pollbooth.php?op=res...warn=phpinfo(); How can this be fixed? Cheers Quote Thanks for any help/comments. Regards, Lewis Hill Link to comment Share on other sites More sharing options...
sonictrip.net Posted September 4, 2004 Share Posted September 4, 2004 A guy im doing some work for wants to have the poll coming up after the new account setup page, or even better would be to have the poll coming up on the same page that it asks for all your account details. Is there a way to do this? Coz if u stick the "include" code on the account details page for the poll, it has 2 submit buttons, how would you go about updating both the account details page and the poll page with the one submit button? Would it be easier just to have the poll code on the following page after the account_details.php page, on the account_details_process.php page? If i went this way, how would i call the polls.php page after the submit button is pressed on the acount_details.php page? Thanks for any help at all, much appreciated! :) Quote Link to comment Share on other sites More sharing options...
ckyshop.co.uk Posted September 5, 2004 Share Posted September 5, 2004 Have just made a fix for the security flaw above, anyone else write something that works, mine might be classed as a 'bodge'? Quote Thanks for any help/comments. Regards, Lewis Hill Link to comment Share on other sites More sharing options...
sonictrip.net Posted September 14, 2004 Share Posted September 14, 2004 Does anyone know how to stop the results showing up after someone votes? Cheers... Quote Link to comment Share on other sites More sharing options...
richmess Posted September 14, 2004 Share Posted September 14, 2004 Does anyone know how to make the breadcrumb trail say "Our Polls' when the polling pages are displayed? Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted September 14, 2004 Share Posted September 14, 2004 Im still trying to find a way to gather multiple checkbox data from a poll instead of single option data. There was a bit of code somewhere that when changed from "option" to "checkbox", it displays all the options in a poll as checkboxes but it only takes the info from the first box you tick and discards the rest??? Can anyone help me here please? :unsure: Quote Link to comment Share on other sites More sharing options...
royalfunk Posted September 17, 2004 Share Posted September 17, 2004 The Poll Booth Contribution did not have the standard osCommerce on/off toggle (red light - green light) for two columns in Admin where there should be a toggle. There is a column for Public (Private or Public) and another column for Open (Open or Closed). I have modified the code so that the columns now show the Active / Inactive images, and clicking the images correctly modifies the database. The only problem is that the status images displayed on screen do not change to correctly display the status of the poll. Below is the code from the page for one of the columns. Any help? <?php if ($polls['poll_type'] == '0') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . ' <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('info', 'action', 'x', 'y')) . 'action=poll_type&info=' . $polls['pollID'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('info', 'action', 'x', 'y')) . 'action=poll_type&info=' . $polls['pollID'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10); } ?> Quote Link to comment Share on other sites More sharing options...
mijman2 Posted September 25, 2004 Share Posted September 25, 2004 The rightbar.gif does not appear to be a valid image file... Any way to reupload it? who ever has an original version? Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted October 17, 2004 Share Posted October 17, 2004 IceTheNet this section has not been used for along time I am reactivating it for the community. There seems to be a growing want for this contribution so I am here and ready to help. I cant garantee an answer to all question but I will do my best. if you find a bug. or a solution let me know. :thumbsup: Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted October 17, 2004 Share Posted October 17, 2004 QUOTE Fatal error: Cannot redeclare pollnewest() (previously declared in C:\home\markettown\www\irishtimes\catalog\includes\boxes\polls.php:6) in C:\home\markettown\www\irishtimes\catalog\includes\boxes\polls.php on line 5 this is due to a double entry of the function pollnewest() you will have to find the second entry and delete it. It cannot be declaired twice my new version fixes this problem: http://www.oscommerce.com/community/contributions,20 this also has a fix for the security problem if any one find's other bug's would be interested in hearing about it. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 28, 2004 Share Posted October 28, 2004 Hi; While voting for a poll on main page i get the error shown below.What did i made wrong. Please help! Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/anil/public_html/site/includes/functions/database.php:13) in /home/anil/public_html/site/includes/functions/database.php on line 13 Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted October 28, 2004 Share Posted October 28, 2004 Hi; While voting for a poll on main page i get the error shown below.What did i made wrong. Please help! Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/anil/public_html/site/includes/functions/database.php:13) in /home/anil/public_html/site/includes/functions/database.php on line 13 <{POST_SNAPBACK}> I to have recieved this error from time to time and I am stumped because there is no physical call to tep_db_connect() twice. I find if go back and comeback it will go away sometime but I am working on this one. I have tested it on windows it works without error but in some version of linux it does show up. When I figgure out what causes this I will post a new version of polls and send you a pm. Quote Link to comment Share on other sites More sharing options...
luca75 Posted October 28, 2004 Share Posted October 28, 2004 (edited) Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/anil/public_html/site/includes/functions/database.php:13) in /home/anil/public_html/site/includes/functions/database.php on line 13 Hi, I have the same problem, have u found the solution ? Another, I don't want display the numers of votes and I don't want display numers of comment, can you help me guys ? Thank you Edited October 28, 2004 by luca75 Quote Link to comment Share on other sites More sharing options...
luca75 Posted October 28, 2004 Share Posted October 28, 2004 Hi, I have the same problem, have u found the solution ? Another, I don't want display the numers of votes and I don't want display numers of comment, can you help me guys ? Thank you <{POST_SNAPBACK}> The solution for who don't want display the numbers of comment and votes in the box is delete or comment this line $content .= "<tr class=\"pollFooter\"><td class=\"pollBoxText\"><center>" . $sum . " "._VOTES."</center>\n</td><td class=\"pollBoxText\"><center>" . $comments1 . " "._COMMENTS."</center>\n</td></tr>"; in catalog/includes/boxes Quote Link to comment Share on other sites More sharing options...
bubbasplitshot Posted November 5, 2004 Share Posted November 5, 2004 Hi, I have the same problem, have u found the solution ? Another, I don't want display the numers of votes and I don't want display numers of comment, can you help me guys ? Thank you <{POST_SNAPBACK}> I just installed and am getting the same redeclare error. A search on the forum found http://www.oscommerce.info/kb/osCommerce/Common_Problems/198 Though I double checked and I don't think I have this problem. Quote Link to comment Share on other sites More sharing options...
RikP Posted November 10, 2004 Share Posted November 10, 2004 getting the same error... Someone knows what's wrong? Because i can't see where it asks for that function Quote Link to comment Share on other sites More sharing options...
bubbasplitshot Posted November 10, 2004 Share Posted November 10, 2004 getting the same error... Someone knows what's wrong? Because i can't see where it asks for that function <{POST_SNAPBACK}> I guess no one knows Rik, or they're keeping very mum about it :( Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted November 11, 2004 Share Posted November 11, 2004 (edited) getting the same error... Someone knows what's wrong? Because i can't see where it asks for that function <{POST_SNAPBACK}> Please explain the error you are getting if not the same Edited November 11, 2004 by IceTheNet Quote Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2004 Share Posted November 14, 2004 I was getting the same error and I went thru the whole zip file and uploaded all the polls.php pollbooth.php and other files included to the appropriate folder and it worked. Just some steps that were not added to make sure you upload those as well. Quote Link to comment Share on other sites More sharing options...
bubbasplitshot Posted November 14, 2004 Share Posted November 14, 2004 I was getting the same error and I went thru the whole zip file and uploaded all the polls.php pollbooth.php and other files included to the appropriate folder and it worked. Just some steps that were not added to make sure you upload those as well. <{POST_SNAPBACK}> I went through the installation again, loaded all the files again, no joy. When I select a poll option, then "Vote", I get a error screen: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /www/i/islandwest/htdocs/includes/functions/database.php:13) in /www/i/islandwest/htdocs/includes/functions/database.php on line 13 which is this snippet: function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } The routine being run is /catalog/pollcollect.php. This requires '/includes/application_top.php', which (on my version) on line 61 has: // make a connection to the database... now tep_db_connect() or die('Unable to connect to database server!'); I only have tep_db_connect() declared in two places, one admin, one catalog: /admin/includes/functions/database.php /includes/functions/database.php Any tips for solving this would be appreciated. Quote Link to comment Share on other sites More sharing options...
gregy Posted November 18, 2004 Share Posted November 18, 2004 very strange .. two things 1. When i vote i get blank page on pollcollect.php 2. when i add second language to poll and submit it .. poll is still not shown in second language .. when i check back for these words they are not there .. looks like poll is not allowing to enter second language !? tenx Quote Link to comment Share on other sites More sharing options...
Guest Posted November 18, 2004 Share Posted November 18, 2004 Hi; While voting for a poll on main page i get the error shown below.What did i made wrong. Please help! Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/anil/public_html/site/includes/functions/database.php:13) in /home/anil/public_html/site/includes/functions/database.php on line 13 <{POST_SNAPBACK}> Can anyone found the solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.