Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Pollbooth v2.0


Ian

Recommended Posts

Hi

 

I have installed

 

pollbooth_v2.2b (amended files & uploaded files & completed a successful sql)

poll_booth_fix_v2_3 (used this new file instead of the one above)

pool_delete (amended this file with my site address & used this file instead of the original above)

 

but I get the following message whenI click on Poll in Admin

 

Warning: main(DIR_WS_LANGUAGES/pollbooth.php): failed to open stream: No such file or directory in /home/XXXXX/public_html/XXXXX/admin/polls.php on line 3

 

Fatal error: main(): Failed opening required 'DIR_WS_LANGUAGES/pollbooth.php' (include_path='.:/usr/share/php') in /home/XXXX/public_html/XXXXX/admin/polls.php on line 3

 

I have checked everything is uploaded & amended, but OBVIOUSLY I have done something wrong! :blink:

I have tried to reason this with my limited knowledge, but am stuck & would be VERY grateful if I could get some help with this please. :D

 

Thank you. :thumbsup:

 

Julie

Link to comment
Share on other sites

  • Replies 356
  • Created
  • Last Reply

Top Posters In This Topic

Hi

 

I have installed

 

pollbooth_v2.2b (amended files & uploaded files & completed a successful sql)

poll_booth_fix_v2_3 (used this new file instead of the one above)

pool_delete (amended this file with my site address & used this file instead of the original above)

 

but I get the following message whenI click on Poll in Admin

I have checked everything is uploaded & amended, but OBVIOUSLY I have done something wrong! :blink:

I have tried to reason this with my limited knowledge, but am stuck & would be VERY grateful if I could get some help with this please. :D

 

Thank you. :thumbsup:

 

Julie

 

 

this would be because it is not seeing includes/applicationtop.php. this must proceed the language check on line 3

 

require('includes/application_top.php');

 

if you require further assistance email me at icethenet (@) hotmail.com

Link to comment
Share on other sites

this would be because it is not seeing includes/applicationtop.php. this must proceed the language check on line 3

 

require('includes/application_top.php');

 

if you require further assistance email me at icethenet (@) hotmail.com

Hi Kerry

 

Thanks for your help. I put that line on the line before but got more errors!

 

This is my admin/polls.php file, which I assume is causing the errors??

 

<!-- polls //-->
<?php
require(DIR_WS_LANGUAGES . $language . '/pollbooth.php');
 $hide = tep_hide_session_id();

function pollnewest() {
	global $customer_id, $HTTP_GET_VARS;
	if (DISPLAY_POLL_HOW==3) {
			$extra_query=" and pollID='" . DISPLAY_POLL_ID . "'";
			}
	if (!isset($customer_id)) {
			$extra_query.=" and poll_type='0' ";
			}
	if (DISPLAY_POLL_HOW==2) {
			$order = 'voters DESC';
			 } else {
			$order = 'timestamp DESC';
			}
	$query= tep_db_query("select pollid, catID FROM phesis_poll_desc where poll_open='0'".$extra_query."and catID != 0 order by ".$order);
	$count=tep_db_num_rows($query);
	$result = tep_db_fetch_array($query);
	$pollid = false;
	if ($count>0) {
	   if ($HTTP_GET_VARS['cPath']) $mypath = $HTTP_GET_VARS['cPath'];
	   if ($HTTP_GET_VARS['products_id'])$mypath = tep_get_product_path($HTTP_GET_VARS['products_id']);
	   if ($mypath) {
		 $sub_cat_ids = split("[_]", $mypath);
		 for ($i = 0; $i < count($sub_cat_ids); $i++) {
		   if ($sub_cat_ids[$i] == $result['catID']) $pollid = $result['pollid'];
		 }
	   }
	}

	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);

	$count=tep_db_num_rows($query);
		   if ((!DISPLAY_POLL_HOW==0 || $count==1) && !$pollid) {
			if ($result=tep_db_fetch_array($query)) {
					$pollid = $result['pollid'];
			}
	} elseif (!$pollid) {
			mt_srand((double) microtime() * 1000000);
			$rand = mt_rand(1,$count);
			for($i=0;$i<$rand;$i++) {
					$result=tep_db_fetch_array($query);
					$pollid = $result['pollid'];
					}
	}
	return $pollid;
}
if (basename($PHP_SELF) !='pollbooth.php') {
$pollid=pollnewest();
if ($pollid) {
?>
 <tr>
	<td>
<?php
	$poll_query=tep_db_query("select voters from phesis_poll_desc where pollid=$pollid and poll_open='0'");
	$poll_details=tep_db_fetch_array($poll_query);
	$title_query = tep_db_query("select optionText from phesis_poll_data where pollid=$pollid and voteid='0' and language_id = '" . $languages_id . "'");
	$title = tep_db_fetch_array($title_query);
	$info_box_contents = array();
	  $info_box_contents[] = array('align' => 'center',
						   'text'  => _POLLS
						  );
	  new infoBoxHeading($info_box_contents, false, false);
	  $url = tep_href_link('pollbooth.php', 'op=results&pollid='.$pollid);
	$content = "<tr><td colspan=\"2\" class=\"main\">" . $title['optionText'] . "</td></tr>";
	 $content .=  "<input type=\"hidden\" name=\"pollid\" value=\"".$pollid."\">\n";
	  $content .=  "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">\n";
	for ($i=1;$i<=8;$i++) {
		  $query=tep_db_query("select pollid, optiontext, optioncount, voteid from phesis_poll_data where (pollid=$pollid) and (voteid=$i) and (language_id=$languages_id)");
		  if ($result=tep_db_fetch_array($query)) {
						  if ($result['optiontext']) {
				   $content.= "<tr class=\"pollOptRow\"><td class=\"pollBoxRow\"><input type=\"radio\" name=\"voteid\" value=\"".$i."\" class=\"radio\"></td><td class=\"pollBoxRow\">".$result['optiontext']."</td></tr>";
				   }
				}
	}
	$content .= "<tr class=\"pollFooter\"><td colspan=\"2\"><center><input type=\"submit\" value=\""._VOTE."\"></center>\n</td></tr>";
	$query=tep_db_query("select sum(optioncount) as sum from phesis_poll_data where pollid=$pollid");
	$query1=tep_db_query("select count(pollid) as comments from phesis_comments where pollid=$pollid and language_id=$languages_id");
	$result1 = tep_db_fetch_array($query1);
	$comments1  = $result1['comments'];
	if ($result=tep_db_fetch_array($query)) {
			$sum=$result['sum'];
	}
	$content .= "<tr class=\"pollFooter\"><td colspan=\"2\" class=\"pollBoxText\"><center>[ <a href=\"" . tep_href_link('pollbooth.php', 'op=results&pollid=' .$pollid, 'NONSSL')."\"><u>"._RESULTS."</u></a> ]</td></tr>";
	$content .= "<tr class=\"pollFooter\"><td class=\"pollBoxText\"><center>" . $sum . " "._VOTES."</center>\n</td><td class=\"pollBoxText\"><center>" . $comments1  . " "._COMMENTS."</center>\n</td></tr>";
$info_box_contents = array();
$info_box_contents[] = array('form' => '<form name="poll" method="post" action="'. tep_href_link('pollcollect.php') .'">',
						   'align' => 'left',
						   'text'  =>   $content
						  );
new infoBox($info_box_contents);
?>
	</td>
 </tr>
<?php
} elseif (SHOW_NOPOLL==1) {
?>
 <tr>
	<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
						   'text'  => _NOPOLLS
						);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
						  'text'  => _NOPOLLSCONTENT
						 );
new infoBox($info_box_contents);
?>
	</td>
 </tr>
<?php
}
}
?>
<!-- polls-eof //-->

& this is my admin/column_left.php which is as per instructions, but as you can see the added line is different. Do I need to do something here?

 

<?php
/*
 $Id: column_left.php,v 1.15 2002/01/11 05:03:25 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'configuration.php');
 require(DIR_WS_BOXES . 'catalog.php');
 require(DIR_WS_BOXES . 'modules.php');
 require(DIR_WS_BOXES . 'customers.php');
 require(DIR_WS_BOXES . 'taxes.php');
 require(DIR_WS_BOXES . 'localization.php');
 require(DIR_WS_BOXES . 'reports.php');
 require(DIR_WS_BOXES . 'tools.php');
 require(DIR_WS_BOXES . 'header_tags_controller.php');
 require('includes/boxes/polls.php');   
?>

 

The only other thing I have done different is to put the Poll box in the includes/column_left.php instead of the includes/column_right.php as I do not have a right column. I haven't made any changes elsewhere.

 

Hope this helps finding a solution or pointing finger to the solution to my problem. :(

 

Thanks hugely.

 

Julie

Link to comment
Share on other sites

OK I have been looking at this very carefully. I have noticed a couple of differences. Please could you tell me which way to go with this?

 

In the install.txt it says:

 

filenames.php in /admin/includes

 

define('FILENAME_POLLBOOTH', 'pollbooth.php');

define('FILENAME_POLLS', 'polls.php');

 

but there is no filenames.php.txt in the download files as there is with the other amendments. So is this correct to add?

 

In the install.txt it says:

 

english.php in includes/languages

add to the end

 

// Poll Box Text

define('_RESULTS', 'Results');

define('_POLLS','Polls');

define('_VOTE', 'VOTE');

define('_VOTES', 'Votes');

define('_NOPOLLS','No eligible polls');

define('_NOPOLLSCONTENT','There are no polls that you are eligible for, however you can still view the results of other polls<br><br><a href="pollbooth.php">['._POLLS.']');

 

but in the other includes/languages/english.php.txt it says:

 

//

// Poll Box Text

define('_RESULTS', 'Results');

define('_POLLS','Polls');

define('_VOTE', 'VOTE');

define('_VOTES', 'Votes');

define('_COMMENTS', 'Comments');

define('_NOPOLLS','No eligible polls');

define('_NOPOLLSCONTENT','There are no polls that you are eligible for, however you can still view the results of other polls<br><br><a href="pollbooth.php">['._POLLS.']');

define('TEXT_DISPLAY_NUMBER_OF_COMMENTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> comments)');

 

I assume I am to use the latter?

 

This is the confusing one! In the install.txt it says:

 

application_top.php in /admin/includes

add

 

 

// entry/item info classes

require(DIR_WS_CLASSES . 'poll_info.php');

require(DIR_WS_CLASSES . 'configuration_info.php');

 

but in the admin/includes/application_top.php.txt it says this:

 

 

define('FILENAME_POLLS', 'polls.php');

 

 

 

 

 

// entry/item info classes

 

require(DIR_WS_CLASSES . 'poll_info.php');

 

These two are completely different :blink: so what do I do here?

 

The only other ?? is with the admin/includes/column_left.php as I mentioned in my last post.

 

PLEASE could someone give me some advice on these confusing instructions?

 

Thank you

julie

Link to comment
Share on other sites

OK. Me again! Here's one for you...Do as the install says & ignore the odd files in the download, & upload them all again.

 

I guess one of them was in the wrong place...but you've guessed it IT WORKS now!!

 

I did have to re name the latest download as it says pool_delete.php but it should say poll_delete.php, but I'm sure that wasn't the culprit. I also changed the admin/includes/column_left.php from:

 

require('includes/boxes/polls.php');

 

to:

 

require(DIR_WS_BOXES . 'polls.php');

 

 

I think I just have to be very very carefull with all those .polls when I upload to the live site. :blush:

 

Thanks for your help & this is a great little extra.

 

Julie

Link to comment
Share on other sites

OK. Me again! Here's one for you...Do as the install says & ignore the odd files in the download, & upload them all again.

 

I guess one of them was in the wrong place...but you've guessed it IT WORKS now!!

 

I did have to re name the latest download as it says pool_delete.php but it should say poll_delete.php, but I'm sure that wasn't the culprit. I also changed the admin/includes/column_left.php from:

 

require('includes/boxes/polls.php');

 

to:

 

require(DIR_WS_BOXES . 'polls.php');

I think I just have to be very very carefull with all those .polls when I upload to the live site. :blush:

 

Thanks for your help & this is a great little extra.

 

Julie

 

ok sorry I had a very busy day and I just got time to help you and you have already solved the problem.

Good for you. I am sorry if the contribution is not in the best shape but I really am so busy I don't have time to work on it. Well anyway enjoy!!!!

Link to comment
Share on other sites

I have 3 simple questions:

 

#1

 

In my poll manager I set my polls to be random 0

 

Description:

Decides how the poll shown in the side box is chosen.

0 = Random

1 = Latest

2 = Most Popular

3 = Specific Poll ID

 

but it's not randomizing at all???? any ideas why?

 

#2

 

When I do a double vote under my cookie crumb area I get a double black box and I can't read the text of what's it's saying. How do I change that box color because in style css it's not there???

 

#3

 

how do I change the comments color left my voters?

 

I really hope someone can help because I've been waiting patiently with no responses from my previous posts.

 

If you need to check my site please check it out here:

http://www.tsurishopjapan.com/pollbooth.php?op=list

 

Thanks,

 

Nigelman

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I'm getting the following error, when I vote on the poll:

 

Warning: require(includes/languages/dutch/FILENAME_POLLBOOTH) [function.require]: failed to open stream: No such file or directory in /home/eroticapaleisnl/HTML/catalogus/pollbooth.php on line 5

Fatal error: require() [function.require]: Failed opening required 'includes/languages/dutch/FILENAME_POLLBOOTH' (include_path='.:/usr/local/lib/php') in /home/eroticapaleisnl/HTML/catalogus/pollbooth.php on line 5

 

And in the admin, all text from the poll is with underscores like:

TABLE_HEADING_ID TABLE_HEADING_TITLE TABLE_HEADING_VOTES etc.

 

Does anybody know a solution?

I'm using Pollbooth v2.3

Link to comment
Share on other sites

Hello,

 

I'm getting the following error, when I vote on the poll:

 

Warning: require(includes/languages/dutch/FILENAME_POLLBOOTH) [function.require]: failed to open stream: No such file or directory in /home/eroticapaleisnl/HTML/catalogus/pollbooth.php on line 5

Fatal error: require() [function.require]: Failed opening required 'includes/languages/dutch/FILENAME_POLLBOOTH' (include_path='.:/usr/local/lib/php') in /home/eroticapaleisnl/HTML/catalogus/pollbooth.php on line 5

 

And in the admin, all text from the poll is with underscores like:

TABLE_HEADING_ID TABLE_HEADING_TITLE TABLE_HEADING_VOTES etc.

 

Does anybody know a solution?

I'm using Pollbooth v2.3

 

Follow the Directions and Install it properly

your missing /includes/filenames.php step

should be something like define('FILENAME_POLLBOOTH', 'pollbooth.php');

Link to comment
Share on other sites

hiho,

i installed this contribution without problems, but i need to know, in the admin controll pannell when i want to set:

 

Enable or Disable poll comments.

0 = Disable

1 = Enable

 

If i put:

Allow Comments = 0

 

nothing will change...nothing , i can still add comments in my store,

 

the same thing with:

Allow people to vote more than once.

0 = No (recommended)

1 = yes (Useful for testing)

 

so if i put Allow multiple votes = 1

nothing will change...

 

 

any solution? it seem that only default configuration work...

Link to comment
Share on other sites

Hello...

 

Two questions related with this contribution...

 

On Admin side, when we click on "Edit Poll" on the bottom of the page exist 3 links

 

 

Add Comment | Vote Now | Other Polls

 

 

On Add Comment after i add any comment if i press Continue the page it's redirected to something like http://127.0.0.1/loja-auto/admin/http://12...p;pollid=1?post , and appear one Forbiden page....

 

On the Vote Now, and if i choose to vote when i press vote the link goes to http://127.0.0.1/loja-auto/admin/pollcollect.php, but on admin directory don't exist any pollcollect.php file...

 

 

So my question is, those two links on admin side are working on this contribution??? Any one solve those two preblems???

 

 

Best Regards

Jo?o Carrolo

Link to comment
Share on other sites

Hello...

 

Two questions related with this contribution...

 

On Admin side, when we click on "Edit Poll" on the bottom of the page exist 3 links

Add Comment | Vote Now | Other Polls

On Add Comment after i add any comment if i press Continue the page it's redirected to something like http://127.0.0.1/loja-auto/admin/http://12...p;pollid=1?post , and appear one Forbiden page....

 

On the Vote Now, and if i choose to vote when i press vote the link goes to http://127.0.0.1/loja-auto/admin/pollcollect.php, but on admin directory don't exist any pollcollect.php file...

So my question is, those two links on admin side are working on this contribution??? Any one solve those two preblems???

Best Regards

Jo?o Carrolo

 

reinstall it the right way so the catalog side pollboth is on the catalog side.

you have to pay very close attention to detail

Link to comment
Share on other sites

Hello...

 

Two questions related with this contribution...

 

On Admin side, when we click on "Edit Poll" on the bottom of the page exist 3 links

Add Comment | Vote Now | Other Polls

On Add Comment after i add any comment if i press Continue the page it's redirected to something like http://127.0.0.1/loja-auto/admin/http://12...p;pollid=1?post , and appear one Forbiden page....

 

On the Vote Now, and if i choose to vote when i press vote the link goes to http://127.0.0.1/loja-auto/admin/pollcollect.php, but on admin directory don't exist any pollcollect.php file...

So my question is, those two links on admin side are working on this contribution??? Any one solve those two preblems???

Best Regards

Jo?o Carrolo

 

install it right and don't get the admin side confused with the catalog side this time

Link to comment
Share on other sites

I wish it would rotate between my various polls instead of just my newly made one.....

 

This mod has issues be warned because there isn't any help for this thread that's for sure. Sorry to be rude but I've been checking this thread for 2 months with 0 help on this.

 

Sorry but it had to be said!

 

Nigelman :thumbsup:

Link to comment
Share on other sites

I wish it would rotate between my various polls instead of just my newly made one.....

 

This mod has issues be warned because there isn't any help for this thread that's for sure. Sorry to be rude but I've been checking this thread for 2 months with 0 help on this.

 

Sorry but it had to be said!

 

Nigelman :thumbsup:

 

Your Absolutly Right All contributions are use at your own risk !!!!!!!!!!!!

 

If your not a programmer I would recomend that you hire one to do the work for you.

I have limited time and have no time to answer all requests.

I can only tell you this. This contribution works if installed properly. not 100% but it works

if you want polls on your store then with a little work it can be made to work on any store.

I however cannot work on all requsts for work. If you install my contributions then I know they

work as I have seen them on store after store. I have installed it in many stores.

 

Enough said!

 

If you ask questions like how to change colors your not going to get a response from me.

If there is another user that can help you then maybe they will but I don't think anyone will.

If you don't know how to do basic programming then I would suggest using ScriptLance.com

I am there and often take OSC bids if not me someone else will give you a most excellent price.

Link to comment
Share on other sites

  • 2 weeks later...

Hey Guys, love the pollbooth contrib!

 

can some one please help me in moving the pollbooth from the infobox and into the index.php (replace the new products box) this would be so great - a good feature on my site.

 

Any ideas?

 

Thanks

 

Mitchell

Link to comment
Share on other sites

Hey Guys, love the pollbooth contrib!

 

can some one please help me in moving the pollbooth from the infobox and into the index.php (replace the new products box) this would be so great - a good feature on my site.

 

Any ideas?

 

Thanks

 

Mitchell

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...