Forums / Addon Sideboxes / Poll Manager Support Thread

Poll Manager Support Thread

Views: 68,862

Results 21 to 40 of 149
26 Aug 2010, 5:16 AM
#21
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Poll Manager Support Thread

Tim Ware:

Hi Great Mod,
i just tried to use it on Zen Cart v1.3.8a and it doesn't store any data in the database when you click send..

Is there any way to get this mod to work with Zen Cart v1.3.8a?
I just tried it on another site that has Zen Cart v1.3.8a and it worked perfectly.. :unsure: that server runs PHP Version 5.2.8

Does the mod work with PHP Version 5.2.13??

https://www.mitkinsprojects.com where online projects come to life..

26 Aug 2010, 7:01 AM
#22
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

I developed PM with PHP 5.2.9, and I have just migrated to 5.3.2. On both versions I encountered no problems.

What happens after you clicked send? Do you get the statistics displayed? Any JS errors appear?
Can you post or send me the url to the site?

Thanks,
Boudewijn

Boudewijn Sjouke
http://www.chinesedingen.nl

26 Aug 2010, 7:16 AM
#23
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Re: Poll Manager Support Thread

boudewijn:

I developed PM with PHP 5.2.9, and I have just migrated to 5.3.2. On both versions I encountered no problems.

What happens after you clicked send? Do you get the statistics displayed? Any JS errors appear?
Can you post or send me the url to the site?

Thanks,
Boudewijn
Thanks for your reply,

When I click send it just refreshes the page and adds nothing and gives no errors.

However I have found a work around..

If i take the url produced by the site that works and enter it into the site that doesn't.. It works and adds the poll options just as it should..

The site that doesn't have a functioning poll manager backend can be found here: https://www.stillmomentsnursery.com

Thats the only part of the poll manager that doesn't work, the poll_manager.php seems to produce incorrect urls when adding to database. Everything else works great :yes:

The poll is working fine now with the work around. So i guess the best bet would be to wait until my host updates PHP.

Thanks for your help.

https://www.mitkinsprojects.com where online projects come to life..

26 Aug 2010, 7:55 AM
#24
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

Hi Tim,

Ooohhh I was on the wrong track.....
I thought you meant the poll box on the customers site.

Can you tell me the difference between the two URL's?
If youdon't want to post the URL's here, please send them by personal message.
What is the function you try to execute? Send?

As others also may encounter the same problem, I am quite anxious to fix this. At this moment I don't believe it has anything to do with the PHP version......

Boudewijn

Boudewijn Sjouke
http://www.chinesedingen.nl

4 Sep 2010, 1:23 PM
#25
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

Hi all,

I just posted the final 1.0 version of Poll Manager.
It contains fixes based on further testing and feedback given on this forum:

  • Added expandable poll blocks in admin interface
  • Added use of regular message stack for errors in admin interface
  • Fixed poll option renumbering after emptying option(s) in admin interface
  • Fixed empty options disappear after submit of incomplete poll in admin interface
  • Fixed wrong language constants in admin interface
  • Fixed poll manager admin interface doesn't center in FF
  • Fixed wrong number of voters for multiple choice polls in admin interface
  • Added preload of 'loading' image
  • Added configurable poll sidebox layout
  • Moved indicator.gif to images/icons folder

Upgrade instructions are in poll_manager.txt, which is part of the package.

Boudewijn

Boudewijn Sjouke
http://www.chinesedingen.nl

10 Sep 2010, 5:16 PM
#26
mitman avatar

mitman

New Zenner

Join Date:
Sep 2010
Posts:
9
Plugin Contributions:
0

Re: Poll Manager Support Thread

**Hi, please help, i have just installed the poll manager and all is well EXCEPT something has screwed up the position of my website title.

Lumtech should be centered in the oval background but now its shifted to the right, please advise :ohmy:

Otherwise this is great and just what i needed, thanks a lot

lumtech.co.uk**

10 Sep 2010, 5:32 PM
#27
mitman avatar

mitman

New Zenner

Join Date:
Sep 2010
Posts:
9
Plugin Contributions:
0

Re: Poll Manager Support Thread

Oh just realised its only doing it in Firefox :(

10 Sep 2010, 6:25 PM
#28
mitman avatar

mitman

New Zenner

Join Date:
Sep 2010
Posts:
9
Plugin Contributions:
0

Re: Poll Manager Support Thread

INTERNET EXPLORER

FIREFOX

10 Sep 2010, 7:26 PM
#29
mitman avatar

mitman

New Zenner

Join Date:
Sep 2010
Posts:
9
Plugin Contributions:
0

Re: Poll Manager Support Thread

EDIT: Problems solved, how can i delete / Edit my posts? :shocking:

10 Sep 2010, 9:27 PM
#30
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

I think you can't edit posts once they are entered....

Anyway, I'm glad you were able to fix this yourself :smile:

Boudewijn Sjouke
http://www.chinesedingen.nl

14 Sep 2010, 8:02 PM
#31
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Poll Manager Support Thread

excellent.. installed and works first timeon 1.3.9f

great add-on!!

I am unable to answer any private messages for any of the add-on's I am associated with. I have migrated to other cart systems so sadly cannot offer any assistance, all the best and I hope you get your query fixed soon!

23 Oct 2010, 5:26 PM
#32
softcorpse avatar

softcorpse

Zen Follower

Join Date:
Aug 2004
Posts:
96
Plugin Contributions:
0

Re: Poll Manager Support Thread

Hi, im using 1.38a

Installed but I am unable to add any polls, keep getting error:

"Please define at least two poll options!"

All fielsd have been filled out, what am I doing wrong?

Thanks for the mod.

24 Oct 2010, 6:09 AM
#33
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

A possile cause may be that another addon modified some of the standard functions of Zen-Cart. You have other addons installed? Can you check if either of them modified <admin>/includes/functions/html_output.php?

Boudewijn Sjouke
http://www.chinesedingen.nl

4 Nov 2010, 1:51 PM
#34
jack_amp_jill avatar

jack_amp_jill

New Zenner

Join Date:
Aug 2009
Posts:
5
Plugin Contributions:
0

Re: Poll Manager Support Thread

SoftCorpse:

Hi, im using 1.38a

Installed but I am unable to add any polls, keep getting error:

"Please define at least two poll options!"

All fielsd have been filled out, what am I doing wrong?

Thanks for the mod.

I have also same problem I just installed on Zen Cart v1.3.9f/v1.3.9f

There is only one colum to fill options under Option information. When i click add an option , Nothing is happening. No option colum is displaying to put second option info.

Please help us !!!!!!!

Thanks ...........

4 Nov 2010, 1:57 PM
#35
jack_amp_jill avatar

jack_amp_jill

New Zenner

Join Date:
Aug 2009
Posts:
5
Plugin Contributions:
0

Re: Poll Manager Support Thread

boudewijn:

A possile cause may be that another addon modified some of the standard functions of Zen-Cart. You have other addons installed? Can you check if either of them modified <admin>/includes/functions/html_output.php?

i have installed another modules. But i dont think that i changed html_output.php file in admin area.

here is my html_output file code.

<?php
/**
 * @package admin
 * @copyright Copyright 2003-2009 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: html_output.php 14139 2009-08-10 13:46:02Z wilt $
 */

////
// The HTML href link wrapper function
  function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true) {
    global $request_type, $session_started, $http_domain, $https_domain;
    if ($page == '') {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }

    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER . DIR_WS_ADMIN;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL_ADMIN == 'true') {
        $link = HTTPS_SERVER . DIR_WS_HTTPS_ADMIN;
      } else {
        $link = HTTP_SERVER . DIR_WS_ADMIN;
      }
    } else {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }
    if (!strstr($page, '.php')) $page .= '.php';
    if ($parameters == '') {
      $link = $link . $page;
      $separator = '?';
    } else {
      $link = $link . $page . '?' . $parameters;
      $separator = '&';
    }

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( ($add_session_id == true) && ($session_started == true) ) {
      if (defined('SID') && zen_not_null(SID)) {
        $sid = SID;
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
//die($connection);
        if ($http_domain != $https_domain) {
          $sid = zen_session_name() . '=' . zen_session_id();
        }
      }
    }

    if (isset($sid)) {
      $link .= $separator . $sid;
    }

    return $link;
  }

  function zen_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
    if ($connection == 'NONSSL') {
      $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL_CATALOG == 'true') {
        $link = HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG;
      } else {
        $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
      }
    } else {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }
    if ($parameters == '') {
      $link .= 'index.php?main_page='. $page;
    } else {
      $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
    }

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

    return $link;
  }

////
// The HTML image wrapper function
  function zen_image($src, $alt = '', $width = '', $height = '', $params = '') {
    $image = '<img src="' . $src . '" border="0" alt="' . $alt . '"';
    if ($alt) {
      $image .= ' title=" ' . $alt . ' "';
    }
    if ($width) {
      $image .= ' width="' . $width . '"';
    }
    if ($height) {
      $image .= ' height="' . $height . '"';
    }
    if ($params) {
      $image .= ' ' . $params;
    }
    $image .= '>';

    return $image;
  }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
  function zen_image_submit($image, $alt = '', $parameters = '') {
    global $language;

    $image_submit = '<input type="image" src="' . zen_output_string(DIR_WS_LANGUAGES . $_SESSION['language'] . '/images/buttons/' . $image) . '" border="0" alt="' . zen_output_string($alt) . '"';

    if (zen_not_null($alt)) $image_submit .= ' title=" ' . zen_output_string($alt) . ' "';

    if (zen_not_null($parameters)) $image_submit .= ' ' . $parameters;

    $image_submit .= '>';

    return $image_submit;
  }

////
// Draw a 1 pixel black line
  function zen_black_line() {
    return zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');
  }

////
// Output a separator either through whitespace, or with an image
  function zen_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
    return zen_image(DIR_WS_IMAGES . $image, '', $width, $height);
  }

////
// Output a function button in the selected language
  function zen_image_button($image, $alt = '', $params = '') {
    global $language;

    return zen_image(DIR_WS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/images/buttons/' . $image, $alt, '', '', $params);
  }

////
// javascript to dynamically update the states/provinces list when the country is changed
// TABLES: zones
  function zen_js_zone_list($country, $form, $field) {
    global $db;
    $countries = $db->Execute("select distinct zone_country_id
                               from " . TABLE_ZONES . "
                               order by zone_country_id");

    $num_country = 1;
    $output_string = '';
    while (!$countries->EOF) {
      if ($num_country == 1) {
        $output_string .= '  if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
      } else {
        $output_string .= '  } else if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
      }

      $states = $db->Execute("select zone_name, zone_id
                              from " . TABLE_ZONES . "
                              where zone_country_id = '" . $countries->fields['zone_country_id'] . "'
                              order by zone_name");


      $num_state = 1;
      while (!$states->EOF) {
        if ($num_state == '1') $output_string .= '    ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
        $output_string .= '    ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states->fields['zone_name'] . '", "' . $states->fields['zone_id'] . '");' . "\n";
        $num_state++;
        $states->MoveNext();
      }
      $num_country++;
      $countries->MoveNext();
    }
    $output_string .= '  } else {' . "\n" .
                      '    ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
                      '  }' . "\n";

    return $output_string;
  }

////
// Output a form
  function zen_draw_form($name, $action, $parameters = '', $method = 'post', $params = '', $usessl = 'false') {
    $form = '<form name="' . zen_output_string($name) . '" action="';
    if (zen_not_null($parameters)) {
      if ($usessl) {
        $form .= zen_href_link($action, $parameters, 'NONSSL');
      } else {
        $form .= zen_href_link($action, $parameters, 'NONSSL');
      }
    } else {
      if ($usessl) {
        $form .= zen_href_link($action, '', 'NONSSL');
      } else {
        $form .= zen_href_link($action, '', 'NONSSL');
      }
    }
    $form .= '" method="' . zen_output_string($method) . '"';
    if (zen_not_null($params)) {
      $form .= ' ' . $params;
    }
    $form .= '>';
    $form .= '<input type="hidden" name="securityToken" value="' . $_SESSION['securityToken'] . '">';
    return $form;
  }

////
// Output a form input field
  function zen_draw_input_field($name, $value = '~*~*#', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
    $field = '<input type="' . zen_output_string($type) . '" name="' . zen_output_string($name) . '"';

    if ( $value == '~*~*#' && (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) && ($reinsert_value == true) ) {
      $field .= ' value="' . zen_output_string(stripslashes($GLOBALS[$name])) . '"';
    } elseif ($value != '~*~*#' && zen_not_null($value)) {
      $field .= ' value="' . zen_output_string($value) . '"';
    }

    if (zen_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= ' />';

    return $field;
  }

////
// Output a form password field
  function zen_draw_password_field($name, $value = '', $required = false) {
    $field = zen_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);

    return $field;
  }

////
// Output a form filefield
  function zen_draw_file_field($name, $required = false) {
    $field = zen_draw_input_field($name, '', ' size="50" ', $required, 'file');

    return $field;
  }

////
// Output a selection field - alias function for zen_draw_checkbox_field() and zen_draw_radio_field()
  function zen_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $parameters = '') {
    $selection = '<input type="' . zen_output_string($type) . '" name="' . zen_output_string($name) . '"';

    if (zen_not_null($value)) $selection .= ' value="' . zen_output_string($value) . '"';

    if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (zen_not_null($value) && zen_not_null($compare) && ($value == $compare)) ) {
      $selection .= ' checked="checked"';
    }

    if (zen_not_null($parameters)) $selection .= ' ' . $parameters;

    $selection .= ' />';

    return $selection;
  }

////
// Output a form checkbox field
  function zen_draw_checkbox_field($name, $value = '', $checked = false, $compare = '', $parameters = '') {
    return zen_draw_selection_field($name, 'checkbox', $value, $checked, $compare, $parameters);
  }

////
// Output a form radio field
  function zen_draw_radio_field($name, $value = '', $checked = false, $compare = '', $parameters = '') {
    return zen_draw_selection_field($name, 'radio', $value, $checked, $compare, $parameters);
  }

////
// Output a form textarea field
  function zen_draw_textarea_field($name, $wrap, $width, $height, $text = '~*~*#', $parameters = '', $reinsert_value = true) {
    $field = '<textarea name="' . zen_output_string($name) . '" wrap="' . zen_output_string($wrap) . '" cols="' . zen_output_string($width) . '" rows="' . zen_output_string($height) . '"';

    if (zen_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>';

    if ($text == '~*~*#' && (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) && ($reinsert_value == true) ) {
      $field .= stripslashes($GLOBALS[$name]);
    } elseif ($text != '~*~*#' && zen_not_null($text)) {
      $field .= $text;
    }

    $field .= '</textarea>';

    return $field;
  }

////
// Output a form hidden field
  function zen_draw_hidden_field($name, $value = '', $parameters = '') {
    $field = '<input type="hidden" name="' . zen_output_string($name) . '"';

    if (zen_not_null($value)) {
      $field .= ' value="' . zen_output_string($value) . '"';
    } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
      $field .= ' value="' . zen_output_string(stripslashes($GLOBALS[$name])) . '"';
    }

    if (zen_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= ' />';

    return $field;
  }

////
// Output a form pull down menu
  function zen_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
//    $field = '<select name="' . zen_output_string($name) . '"';
    $field = '<select rel="dropdown" name="' . zen_output_string($name) . '"';

    if (zen_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>' . "\n";

    if (empty($default) && isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) ) $default = stripslashes($GLOBALS[$name]);

    for ($i=0, $n=sizeof($values); $i<$n; $i++) {
      $field .= '<option value="' . zen_output_string($values[$i]['id']) . '"';
      if ($default == $values[$i]['id']) {
        $field .= ' selected="selected"';
      }

      $field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>' . "\n";
    }
    $field .= '</select>' . "\n";

    if ($required == true) $field .= TEXT_FIELD_REQUIRED;

    return $field;
  }
////
// Hide form elements
  function zen_hide_session_id() {
    global $session_started;

    if ( ($session_started == true) && defined('SID') && zen_not_null(SID) ) {
      return zen_draw_hidden_field(zen_session_name(), zen_session_id());
    }
  }
5 Nov 2010, 5:56 AM
#36
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

Hi,

The file is not the same as the standard file of version 1.3.9f.
I noted 3 differences, of which the last two should cause PHP errors. If I use the file you posted, the admin interface won't startup.

At the bottom: if ( ($session_started == true) && defined('SID) is missing a quote after SID
and some lines before that: $field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', ''' => ''',
should read: $field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', ''' => ''',

Boudewijn Sjouke
http://www.chinesedingen.nl

10 Nov 2010, 6:24 AM
#37
dazana avatar

dazana

New Zenner

Join Date:
Apr 2009
Posts:
45
Plugin Contributions:
0

Re: Poll Manager Support Thread

How to change black font to white?

10 Nov 2010, 7:22 AM
#38
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

See the instructions in the help file, topic 'LAYOUT ISSUES'.

The definition in the file mentioned can be changed to:

define('PM_POLL_OPTIONS_LAYOUT', 'style="width:99%; color:#ffffff;" class="clearBoth"');

Boudewijn Sjouke
http://www.chinesedingen.nl

4 Dec 2010, 5:13 AM
#39
softcorpse avatar

softcorpse

Zen Follower

Join Date:
Aug 2004
Posts:
96
Plugin Contributions:
0

Re: Poll Manager Support Thread

My html_output is attached. I have no idea if it has been modified or not, site has been running for ages and I have just recently required a poll.

Thanks for the help!

(** attachment removed by moderator *)

5 Dec 2010, 6:27 AM
#40
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Poll Manager Support Thread

SoftCorpse:

My html_output is attached. I have no idea if it has been modified or not, site has been running for ages and I have just recently required a poll.

Thanks for the help!

From the file you sent I can see you run ZC 1.3.8.a, and the file IS standard. So, I installed a clean copy of this version and only installed PM with it. Everything functions as it should.

So, either some other mod is messing up your PM, or I didn't do the right tests. In which case I need more info from you.
Can you point out exactely what steps you do, what you enter and what the result is?

Thanks,
Boudewijn

Boudewijn Sjouke
http://www.chinesedingen.nl