Snowman Posted October 29, 2003 Share Posted October 29, 2003 Im working up a new version of this mod, seeing that Ian isnt around anymore :( I will bring the whole mod up to osC Specs and give it full MS2 compatability. As for having more than 8 options, souldnt be too hard... i'll work on it Quote Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2003 Share Posted November 3, 2003 Hey Guyz I downloaded v2.0 plus the updated files,,, and installed it,, I have went over the forum and the fix'es i find apear to be in the mod already. However,, I am still getting the following error when someone votes 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 'select * from phesis_comments where pollid = \'2\' and language select count(select * from phesis_comments where pollid = \'2\' and language_id = \'1\') as total [TEP STOP] any ideals on where to look? I am running ms2 Thanks in advance Regards Tom Quote Link to comment Share on other sites More sharing options...
Guest Posted November 18, 2003 Share Posted November 18, 2003 the problem seems to center around the value for $pollid getting messed up. It seems to be getting "escaped" unnecessarily. I'll see if I can figure it out. -jared Quote Link to comment Share on other sites More sharing options...
defender39 Posted November 19, 2003 Share Posted November 19, 2003 most likely a search engine friendly problem Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2003 Share Posted November 19, 2003 I think I have it all. I'll sanity test it and repost later tonight or tomorrow (in case anyone is still trying to get this to work). -jared Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2003 Share Posted November 19, 2003 IT'S WORKING! Thanks to all on the forums for the suggestions and helps -- I used them, along with some sleuthing, to get this thing finally working (I think) on 2.2 MS2. Most of the problems (at least the ones that were not already fixed by the forum suggestions) were due to variable labelling errors. I've noted all of the changes below, including the ones that are previously mentioned in the forums. Line numbering is as per the vi editor. If I've missed something, please let me know and I'll see if I can figure it out. I know that Ian, the original author, probably had some enhancements in mind. NO WAY could I have written this, but I'm getting better at fixing stuff that's only slightly broken. :) I don't pretend to be able to enhance this, at least not in the near future. I just know that mine is now working. Special thanks to olby, romanus, woekiewoekie, LiquidGfx, and Eliot Rayner (hope I didn't miss anyone) for their previous fixes, which, as I said, should all be included below. For those that don't care about the specifics, all these changes will be in the contrib update. Sometimes I changed "select" to "SELect" or something. MySQL doesn't appear to be case sensitive on those operators, and it made it easier to find the messed up variable references. I probably left a few in mixed case, if'n you care. Enjoy! -jared CHANGELOG: FILE: /catalog/pollbooth.php line 134: ========= $comments_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_NEW_COMMENTS, $comments_query_raw, $comments_numrows); changed to // $comments_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_NEW_COMMENTS, $comments_query_raw, $comments_numrows); line 203: ========= $title_query = tep_db_query("select optionText from phesis_poll_data where pollid=$pollid and voteid='0' and language_id = '" . $languages_id . "'"); changed to $title_query = tep_db_query("select optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); same $pollid to '".$pollid."' change for line 85, 271, 273, 284, 292 changed $id and $language just like above $pollid change on line 246 same $language change for line 284 line 169: changed <tr><td class="main" colspan="2"><?php echo htmlspecialchars($comments['comment']); ?></td></tr> to <tr><td class="main" colspan="2"><?php echo htmlspecialchars($comments['COMMENT']); ?></td></tr> line 192: changed <? echo _COMMENT?> to <? echo _ADD_COMMENTS?> ---------------------------------- FILE: /catalog/includes/languages/english/pollbooth.php FILE: /catalog/includes/languages/german/pollbooth.php FILE: /catalog/includes/languages/japanese/pollbooth.php I added define('_ADD_COMMENTS', 'Add Comment'); define('_COMMENTS', 'Comments'); define('TEXT_DISPLAY_NUMBER_OF_COMMENTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> comments)'); to all 3 files, but the German and Japanese ones really ought to have ADD_COMMENTS localized. Since I don't know those languages, I just added the english wording. FILE: /catalog/pollcollect.php same $pollid change for line 12 --------------------------------- FILE: /admin/polls.php line 135: changed maxlength="60" to maxlength="255" line 185: changed function name from tep_array_merge to array_merge line 288: changed maxlength="60" to maxlength="255" --------------------------------- FILE: /poll.sql appended the following statement to the "# Dumping data for table `phesis_poll_config` " section INSERT INTO phesis_poll_config VALUES (6, 'Number of Comments', 'MAX_DISPLAY_NEW_COMMENTS', '10', 'Maximum number of comments to display on the pollbooth page', '2001-12-07 20:20:26', '2001-12-07 20:20:26'); --------------------------------- Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 19, 2003 Share Posted November 19, 2003 4 questions about getting this mod to work properly: 1. Has anyone come up with a fix for the "on/off" (red light/green light) problem yet? It's frustrating to have to go back and forth between admin and my site to see if the polls are open/closed or private/public. 2. What exactly do I need to do get rid of comments completely? I don't want to offer this option and want to remove it from the site. 3. Why are customers "not eligible" to vote able to leave comments? I though that only customers logged-in were able to vote/make comments...Regardless, I want this option gone. 4. Why aren't the polls (latest poll specifically) actually showing in the pollbooth box? Aren't they supposed to? The only way I'm able to actually see the polls if I click on "Polls" in the box and then "Click here for poll results". I'd appreciate some help...Thanks :). Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2003 Share Posted November 19, 2003 4 answers: 1 - not that I've seen -- I don't know what the problem is either. I use Mozilla Firebird with tabbed browsing though, so it's easy to "go back and forth" between admin and website 2 - The easiest way will be simply to comment out the parts of /catalog/pollbooth.php (and maybe pollcollect.php???) that put the comments stuff on the screen. If you can't interact with the feature, it's the same as being gone, right? 3 - Dunno. All I have done (so far) was try to make this work with one poll at a time, on my website (the OSC version of which is still on my staging server, BTW, but hopefully in the next few days it'll be live on www.croppinparadise.com). But, like you say, if you remove the links that they click on to enter comments, this is a moot point. 4 - Sorry to be a broken record, but I dunno. I'll chekkit out and see what I can see. -jared Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 19, 2003 Share Posted November 19, 2003 Jared, How do I get "random" to work...it isn't working. Jeff Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 20, 2003 Share Posted November 20, 2003 Also...If I login, why do I still see the "You are not eligible..." message in the pollbooth box? Shouldn't I see one of the polls instead? I still can't get "random" to work, even with setting it to "0" in admin... <_< Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 20, 2003 Share Posted November 20, 2003 Sorry for the multiple posts, but two other issues I just can't seem to solve: I need to remove the comments column from this: And get rid of the comments section of the pollbooth box itself, seen here: Can someone please point me in the right direction? Thanks :). Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 20, 2003 Share Posted November 20, 2003 (edited) I think I may have found a possible reason why the red/green lights for the public/private and open/closed functions don't work in this contribution (but I could be wrong). The first pic is the admin/includes/classes/config_info.php and the second pic is the phesis_poll_config table structure: I'd take a stab at this myself, but I don't feel proficient enough with MySQL to do this. So, if there's anyone using this contribution who knows MySQL fairly well and you can tell me if I'm right or wrong on this, and/or you have a solution, please let me know. Thank you :). I'll shut up now... ;) Edited November 20, 2003 by jwsfun Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 21, 2003 Share Posted November 21, 2003 Okay, Logged in or not, the "There are no polls that you are eligible for..." message STILL displays. And no matter what setting I use to display the polls (0, 1, 2, or 3), the ONLY poll displayed is the LAST poll created. Is there ANYONE out there who has this contribution functioning properly? Can someone PLEASE help me on this? :blink: Quote Link to comment Share on other sites More sharing options...
beardeddone Posted November 21, 2003 Share Posted November 21, 2003 Okay, Logged in or not, the "There are no polls that you are eligible for..." message STILL displays. And no matter what setting I use to display the polls (0, 1, 2, or 3), the ONLY poll displayed is the LAST poll created. Is there ANYONE out there who has this contribution functioning properly? Can someone PLEASE help me on this? :blink: I had the same problem, but recheck your code, make sure it's all done right, might also create another poll, mine started working ok after I did that. Quote Best Regards Link to comment Share on other sites More sharing options...
jwsfun Posted November 23, 2003 Share Posted November 23, 2003 (edited) John, I got tired of checking the code over and over, and even using the "Compare & Merge" utility to see if there were any differences between what I have installed and the latest updated files to this contribution. Nothing. No differences whatsoever. I even re-installed it, using the latest update from November 19th, 2003...Guess what? NOTHING'S CHANGED. I really thought this mod was a great idea...After all, who wouldn't want to pique a customer's interest with something that entertains them while they're on your site? But the fact remains that I'm sick of hearing about all the people who have this thing running well, while the rest of us sit here and wonder if and when someone's going to lend a hand helping get this running (for our sites). Do I sound upset? Yes, I am a little PO'd that I, like others, am getting nowhere with this. But alas, I'm no php or sql expert, so I guess I'll just have to sit here and wait, and wonder when I can get help...or, IF I can. Edited November 23, 2003 by jwsfun Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 24, 2003 Share Posted November 24, 2003 Is this thread dead? :unsure: Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 24, 2003 Share Posted November 24, 2003 I can't believe that no one is willing to help me with getting this contribution up-and-running... <_< (please ignore my past 8 or 9 posts about this, because I've ALMOST got it working.) The biggest problem I seem to be encountering is actually getting the polls displayed the way I want them to display... It appears that, for whatever reason, I can't place a poll directly in a category, but only into a subcategory. Is anyone else having this problem? Another serious issue is the actual admin control of displaying the poll type: 0 for random, 1 for latest, etc. Why does it take 5 or 6 tries to actually change the numbers to begin with? Why doesn't the "random" poll type work? Most frustrating of all, why does the very first poll I have seem to over-ride the rest of my polls? By that, I mean if I create a new poll for a subcategory and enter it, the first and ONLY poll I have in "All Categories" will display along with the very last poll I just put in. However, the previous polls created don't display---only the "All Categories" poll and the very last poll created actually display. So, why is this happening? Why aren't they displaying in the subcategories I just put them in a minute before? Next to "Center shop", this is by far the most aggravating contribution I've tried to install (it appears both authors have abandoned these contributions as well). I'd really appreciate some help from someone who has this thing working. :) Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 26, 2003 Share Posted November 26, 2003 (edited) Okay, it appears I'm getting nowhere here in this thread AND I've more or less figured out HOW to get this contribution to barely work... It seems that polls cannot be assigned to specific categories as the contribution states it's able to do. The only way I can get the polls to appear is to put a new poll into "All Categories" and set the display to "random". All of this frustration to find this out is a shame, and a huge waste of our time. I'm well aware the contributions are to be used "at your own risk" but with so many people claiming to make this contribution work on their sites and the fact that the author appears to have abandoned the any kind of support or updates, well...Enough said, I guess. But, my thanks goes out to all those who did help...I appreciate your input and insight. Best of luck to you. :) Edited November 26, 2003 by jwsfun Quote Link to comment Share on other sites More sharing options...
rstebih Posted November 27, 2003 Share Posted November 27, 2003 Is anyone interested in the fix for the "on/off" (red light/green light) problem still? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 27, 2003 Share Posted November 27, 2003 Ruby,, yes,, I for one am,, and would say there are others as well Thanks in advance if you have that info and would share it Regards Tom Quote Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2003 Share Posted November 30, 2003 Ok, so to make the red/green buttons working just add in admin/polls.php the " poll_type and poll_open " in the $poll_query_raw change $poll_query_raw = "select pollID, voters, timeStamp from phesis_poll_desc order by pollID asc"; by $poll_query_raw = "select pollID, voters, poll_type, poll_open, timeStamp from phesis_poll_desc order by pollID asc"; line 338 (more or less) see you ciju (oscommerce-fr) ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2003 Share Posted November 30, 2003 Ok, so to make the red/green buttons working just add in admin/polls.php the " poll_type and poll_open " in the $poll_query_raw change $poll_query_raw = "select pollID, voters,? timeStamp from phesis_poll_desc order by pollID asc"; by $poll_query_raw = "select pollID, voters, poll_type, poll_open, timeStamp from phesis_poll_desc order by pollID asc"; line 338 (more or less) see you ciju (oscommerce-fr) ;) Kewl beans,,, works for me Thanks bunches,, Regards Tom Quote Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2003 Share Posted November 30, 2003 hmm,, Know what would also be nice To have a way to see poll results from the admin panel. Anyone know the simple way to do that,,, sorry ,, I have ideals,, just not the know-how to to do them without help. :D Thanks in advance. Regards Tom Quote Link to comment Share on other sites More sharing options...
jwsfun Posted December 1, 2003 Share Posted December 1, 2003 Ciju's fix for the red/green lights issue worked perfectly. Thank you. :D Quote Link to comment Share on other sites More sharing options...
Guest Posted December 1, 2003 Share Posted December 1, 2003 hmm,,Know what would also be nice To have a way to see poll results from the admin panel. Anyone know the simple way to do that,,, sorry ,, I have ideals,, just not the know-how to to do them without help. :D Thanks in advance. Regards Tom Actually,, after many hours of pulling my hair out,, I have this working,, I still got some cleaning up to do,, to make it all pritty and all,, but I do have the results working in the admin panel,, If anyone else is interested in this,, let me know and I will share the info once I get it polished up all bright and shinny. Regards Tom 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.