Contributions
Poll Booth
Adds a polling booth box similar to those found php-nuke. There is also an admin box but its fairly basic.
Packaged as a standard zip file
Expand All / Collapse All
Some sloppy programming issue, there is a short php open in the source code: <? should always be avoided and <?php should be used instead (see php.net)
<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>
should become:
<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']); ?> <?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>
Added to Ultimate Seo Urls:
pollbooth.php
newsdesk_index.php
newsdesk_info.php
newsdesk_reviews_info.php
newsdesk_reviews_article.php
file changed:
includes/classes/seo.class.php
.htaccess
No all packpage
only file Ultimate Seo Urls's changed
This fix corrects a problem with the phesis_poll_desc query to get the subcategory polls to display in the Poll Booth. This is for the latest v2.3.1 rev.
Again a refinement of the comment filtering - this will not allow users to post any comments with html tags, blank comments, or any comments which contain 'http' or 'www'. If you allow people to post comments with urls in them then you probably dont want to add this. However we have been getting a deluge of spam with people adding links to sites and ive got fed up deleting them out of the database. My last addition only removed html tags and still allowed people to post urls as text.
1)Update new files
-catalog/admin/includes/languages/english/images/buttons/*.gif
-catalog/admin/polls.php (replace with old file)
2)catalog/includes/languages/english.php
add before ?>
define('_POLLS_HEADER','Polls-Header');
3)catalog/boxes/polls.php
Find:
'text' => _POLLS
Replace with:
'text' => _POLLS_HEADER
4) after installation go to...
Go to -> admin/polls.php?action=config
Poll Id --> 1
5) after installation continue to open.....
admin/polls.php file
Find:
$pollid=tep_db_insert_id($poll_query);
Replace with:
$pollid = tep_db_insert_id();
That's All.
-New files included...
Gents,
This package is nothing alse then summary of the "Mully" and "maniac101" corrections, plus a Dutch translation.
Please make sure to make a backup before you proceed.
Cheers,
Stoyan
The previous text file refers to adding test after OTHERPOLLS.. this is obviously an error.
Add them after the _ALT_PRIVATE line. Corrected file attached. Take 2.
Cheers from dopey.
Not a big problem.
If you selected EDIT from the Poll Manager (Admin pages) then the total votes etc info at the bottom is missing some defines.
Simple fix is to add the following to the bottom of the admin/includes/languages/english/polls.php file:
define('_TOTALVOTES', 'Total votes cast');
define('_ADD_COMMENTS', 'Add Comment');
define('_VOTING', 'Vote Now');
define('_OTHERPOLLS', 'Other Surveys');
Explains itself.
The attached file is the above only. No other files.
This is a good contribution.
Cheers from www.pure-tone.com
simple and short modification to catalog/pollbooth.php to check the comment being posted and to stop it being entered into the database if it contains any html tags.
see attached install.txt file.
This is NOT a full package, just instructions to do this 30 second modification to pollboth.php - should work ok on any version.
Full package
Small update to poll_delete and a repackage of the previous fixes here.
Hi
in file: poll_delete.php
header("location: http://www.CHANGE_ THIS_LINK!!!/admin/polls.php?op=list");
or script redirect you to some funny site ;-)
I posted 2 bufixes, but when I repaired one, another one came back:(
the new bugfix contains a fix for the subcatergories! If you have subcategories you will get an error! this is fixed now!
replace this:
$query= tep_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query." and catID = 0 order by ".$order);
for this one:
if(empty($HTTP_GET_VARS['cPath'])){
$catid=0;
}
if($HTTP_GET_VARS['cPath']) {
$mypath = $HTTP_GET_VARS['cPath'];
list($catid, $subcatid)=split("[_]", $mypath);
//echo $catid;
}
$query= tep_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query." and catID = ".$catid ." order by ".$order);
hopefully this contrib is now bugfree
the previous fix had an error on the mainpage, that's fixed now!
replace this:
$query= tep_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query." and catID = 0 order by ".$order);
with this:
if(empty($HTTP_GET_VARS['cPath'])){
$catid=0;
}else{
$catid = $HTTP_GET_VARS['cPath'] ;
}
$query= tep_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query." and catID = ".$catid ." order by ".$order);
This fixes the category bug. when you have more than 1 poll active in different categories, you will only see the latest, with this fix you see it at the right category where you put it to, and you will see al active ones!!
replace the catalog/includes/boxes/polls.php with the new one!
Full packege with english, german and FULL russian (catalog and admin) translations.
http://solti.com.ua
Full packege with english, german and russian (NEW) translations.
http://solti.com.ua
pollbooth_v2.2b - the Corrected version pollbooth_v2.2 - 2 serious mistakes in files catalogadminpollbooth.php (LINE 15) and catalogpollcollect.php (LINE 3) are corrected. All normally works in the version 2.2MS2. Necessarily correct these mistakes if you work in 2.2MS2 or load the version pollbooth_v2.2b!!!
Alexander. Russian Federation
Esta es una modificacion hecha por Leonidas Pezo, Es la traduccion al español del Poll booth.
Solo tienes que copiar los archivos y pegarlos en tu catalog.
aliadolito@hotmail.com
Bags for multilanguages. The mistake is revealed. Replace a line 3: require('includes/languages/english/pollbooth.php');
on: require(DIR_WS_LANGUAGES . $language . '/pollbooth.php');
Or replace a file.
Alexander. Russian Federation.
Full package.
Changes made my installation work 100%. Many cosmetic changes to make contrib look better.
ITNetwork Designs
IceTheNet
O.K Many changes to structure and tabling admin now has delete comments crude but functioning. and most of the errors gone. sorry in a hurry hope there are less bugs I know of some and I will address as soon as possible unless another taleteed programmer fixes them first thank't to all who contribute to this project it look's like it is finally nearing a state of maturity as a osc contribution.
beware this was thrown together in a hurry.
"BACK UP YOUR STUFF"
YOU have been WARNED
enjoy
After a bit of tinkering and searching the forums for clues I've got the Toll Booth to now fully function properly.
I've included the ammended admin/polls.php and catalog/pollcollect.php but the change needed for admin/polls.php was on line 227 from:
'action=edit&cID=' . $poInfo->pollID
to
'action=edit_config&Info=" .$cfgInfo->cfgID
also change "include index.php" at the bottom of "catalog/pollcollect.php" to
header("Location: index.php");
exit;
The easiest way to fix your store is just replace the two files I've included in the zip.
To do: Fix up the table width's so it fits between the left & right columns instead of pushing column_right below column_left.
Cheers All and keep up the good work.
This contribution is out of hand. I told every one before ther is a forum for this don't post FUD here thank you Now I will have to start a new thread for this because of all the trash. I said before I didn't create this contribution nor will I be responsible for it . "Period".
If you can make thing's better post your changes. leave comments for the forums where they may do some good. if you want to fix the tables fix them yourself.
IceTheNet
Updated Look's Table is much better
and display
2 files updated
catalog/pollbooth.php
catalog/pollcollect.php
IceTheNet
http://forums.oscommerce.com/index.php?showtopic=43568&hl=pollbooth
now the comments added will be displayed insted of junk.
Hier ist wieder eine korrigierte Version des:
pollbooth_v2.1
Die bekannten Fehler
>>>1064 - You have an error in your SQL syntax near 'select * from phesis_comments where pollid = '1' and language_id = '2') as t' at line 1
select count(select * from phesis_comments where pollid = '1' and language_id = '2') as total
<<< oder >>>Fatal error: Call to undefined function: tep_array_merge() in /xx/www/xxx/xxx/xxx/xxx/admin/polls.php on line 185 <<< und viele andere Kleinigkeiten wie fehlende Sprachen zuimindest in der deutschen Version sollten behoben sein.
IceTheNet fix
ITNetwork Designs IceTheNet@hotmail.com
___________________________________
I Made the files more readable and fixed a few thing's here and there
to make it work with all the bug fixes and addon's
This is based on the original contribution by phesis read credits at bottom.
IMPORTANT:**********************
SECURITY FIX: Don't use any other version
********************************
includes all files
IceTheNet fix
ITNetwork Designs IceTheNet@hotmail.com
___________________________________
I Made the files more readable and fixed a few thing's here and there
to make it work with all the bug fixes and addon's
This is based on the original contribution by phesis read credits at bottom.
includes all files
Installed, didn't work for me.
You need to add
define('FILENAME_POLLBOOTH', 'pollbooth.php');
to the bottom of catalog/admin/includes/filenames.php
When I had poll booth enabled my comments on orders came through as '0'. I disabled poll booth and they came through properly again?!
FIX -
Change all instances of $comments to $comments1 in catalog/includes/boxes/polls.php, this fixes the problem!!
Bug fix |
Pierre-Alain LAUR |
28 Apr 2004 |
|
In the file polls.php located in your admin /catalog/admin directory
swap line 338:
$poll_query_raw = "select pollID, voters, timeStamp from phesis_poll_desc order by pollID asc";
to:
$poll_query_raw = "select pollID, voters, timeStamp, poll_type, poll_open from phesis_poll_desc order by pollID asc";
if you wish the right image (red / green ) to display
enjoy osc
PAL
This is only a add-on that allows you to view the results of your poll booth votes from the Admin Panel instead of having to go into the catalog side (currently does not show comments).
easy to install,
If I goofed on anything, Please let me know.
fixed misc bugs -- see CHANGELOG.TXT for details.
I installed aeverything as below but got sql errors had a look a the forum so thanks to the guys on there.
I have included ammended pollbooth.php and pollcollect.php
Please backup
Hope this helps someone it helped me t
Thanks to defender39 or Jesse on the Osc forums keep it free....
I've upgraded the pollbooth code in a number of areas.
First pollbooths are now multilingual, in that you can define title and options in the languages your site uses.
Second, you can now define polls which are tied to a catalog category. So you could say have a poll which only showed when the customer was in the DVD category.
Finally, it is now possible to post comments against a forum. This is pretty alpha code, and the layout could do with some tidying. But it works.
Updated
The poll tille as defined in admin is now moved into the body of the poll box. The actual title now becomes 'Poll'
This helps with formatting as the title line now never wraps.
I have updated my pollbooth contribution to give the following extra fuctionality.
The sidebox now uses a number of stylesheet classes as well as cleaning up the formatting.
You now have the option to display a specific poll (by id) if you have more than one poll.
This version fixes the bugs in admin which meant you could not edit an existing poll. Also updates all catalog code to use tep_href_link.
Note for those who don't know. This mod allows you to create polls which users can vote on.
This is just a translation of Ian C Wilson's Pollbooth V 1.0 english module. Put this file in catalog/includes/languages/japanese/
This is ONLY the language module - you must download Pollbooth V 1.0 to use this.
A much updated version of my Pollbooth add on (at least from the previous contribution)
For those who haven't seen it before it adds a poll box where your customers cn vote on whatever you want.
Admin side lets you configure how the poll(s) will be displayed and allows you to set whether polls are public (anyone can vote) or private (registered users only) plus a lot more.
My thanks got to Peter Fürsicht for providing a German translation and doing some integration work to make it current cvs compatible, and also to Brian Gleason for various bugfixes. (Cheers guys)
Adds a polling booth box similar to those found php-nuke. There is also an admin box but its fairly basic.
Packaged as a standard zip file
Note: Contributions are used at own risk.