We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Polls ready for immediate commercial release!

Development and Programming

simplyee's avatar
simplyee
104 posts
about 17 years ago
simplyee's avatar simplyee

Duh! I’m a little dense sometimes…I was over thinking…

Anyway, another issue:

Everything works with the ajax, and it’s cool, except wihen I use the chart tag. The chart is there and updates, but sets off my error debugging, so there’s an issue somewhere.

Can you look and see Leevi, thanks…been trying for several hours and going nowhere. Trying to get some same functionality as your example in the docs.

My main:

{exp:weblog:entries
    weblog="lg_polls" limit="1"}
    {embed="sample_group/_poll"
      entry_id="{entry_id}"
      poll_question="{poll_question}"
      entry_date="{entry_date format="%D, %F %d, %Y - %g:%i:%s"}"
      expiration_date="{expiration_date format="%D, %F %d, %Y - %g:%i:%s"}"
      ajax_return="sample_group/_ajax_poll"
      return=""
    }
  {/exp:weblog:entries}

The _poll:



The _ajax_poll:

{exp:weblog:entries
  weblog="lg_polls"
  entry_id="{post_entry_id}"
  show_future_entries="yes"
  show_expired="yes"
  limit="1"
  rdf="off"
  disable="categories|category_fields|member_data|pagination|trackbacks"
}
  {embed="sample_group/_poll"
    entry_id="{entry_id}"
    poll_question="{poll_question}"
    entry_date="{entry_date format="%D, %F %d, %Y - %g:%i:%s"}"
    expiration_date="{expiration_date format="%D, %F %d, %Y - %g:%i:%s"}"
    ajax_return="sample_group/_ajax_poll"
  }
{/exp:weblog:entries}

What am I missing?

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Would anyone know if there is a way to get the {results_answers} and {exp:lg_polls:chart} to update with the ajax submission?

The setup I’m following is exactly what is spelled out in the docs and it works like a treat! However, the answers and chart need a refresh to display the submitted votes. This seems to be the case with Leevi’s example provided on the docs page as well.

I’m wondering if someone has figured out a way to have get the answers chart show the users results immediately?

I understand this my not be possible but it never hurts to ask.

——- Additional question ——- Another thing I’ve noticed is that the form does not clear on ajax-update so the users selection remains active after the submission. Anyone figure out how to clear?

Thanks

       
Tyssen's avatar
Tyssen
756 posts
16 years ago
Tyssen's avatar Tyssen

I’ve copied the basic template code from the documentation, but the answers to my questions don’t show up. The question does, but not the answer. Any idea, what might cause that?

       
Tyssen's avatar
Tyssen
756 posts
16 years ago
Tyssen's avatar Tyssen

Sorry, worked it out - I had another custom field called answer. :red:

       
Clearpeak's avatar
Clearpeak
413 posts
16 years ago
Clearpeak's avatar Clearpeak

Hi LG,

I’ve got LG Polls configured and installed and I’ve got a test poll entry in the polls weblog.

I’m getting the following error:

No poll found for entry: 188

Entry 188 is the test poll. I haven’t tried to display my entries yet but at least thought the tag would show my poll question. Here is the template:



Any ideas what I’m doing wrong?

Thanks

       
Clearpeak's avatar
Clearpeak
413 posts
16 years ago
Clearpeak's avatar Clearpeak

LG,

I guess my problem was that I needed to hit full save rather than quick save when creating the entry. Works fine now.

Besides all my results I just want to show the answer name for my “winning” answer–the one with the most votes. Is there a way to do that?

Thanks

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

I’m still not too sure why I can’t get a refresh of my poll with the “ajax” submit.

Votes are tallied. My “submission” indicator displays but the poll does not refresh.

I’ve not deviated at all from the examples provided in the documentation. I do have one question though. In the documentation the “ajax_return” parameter refers to a template within a template group of

ajax_return="_components/_ajax_poll"

I’m using the underscore character as my “hidden template indicator”. Can “_ajax_poll” be a hidden template, or should it be a normal template to enable it to be loaded via ajax?

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Wondering if anyone has used Leevi’s module to serve as a voting module.

The idea being that rather that placing the “poll question” and “poll answers” in a single template, that the “poll question” and a specific “poll answer” be placed/targeted and displayed in a specific entry.

Almost like using reverse relationships.

The result being that the voting takes place from certain entries in which only one poll answer is provided indicating that if selected, the user is selecting (voting for) the entry they are viewing.

Did I explain that clearly?

Anyone try this?

Thanks

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I’m having a couple errors crop up for me, in addition to one other issue. First off, I’m using:

LG Polls 1.0.6 ExpressionEngine 1.6.6 Build 20081212

Notice: Undefined variable: EE in /home/mysite/public_html/system/extensions/ext.lg_polls_controller.php on line 659 Fatal error: Call to a member function new_entry_form() on a non-object in /home/mysite/public_html/system/extensions/ext.lg_polls_controller.php on line 659

I cannot save a poll.

One other issue that cropped up is the fact that this version of the Extension does not check for the presence of CP jQuery, so it will load jQuery in the head even if it is already loaded, breaking some functionality. To fix that, in ext.lg_polls_controller.php around line 758 I wrapped the calles to jQuery and jQuery UI like this:

$r = '';
            
if (isset($EXT->version_numbers['Cp_jquery']) === FALSE && empty($SESS->cache['scripts']['jquery']) === TRUE)
{
            
$r .=  "\n< script type='text/javascript' charset='utf-8' src='" . $this->settings['jquery_path'] . "'>< /script>
\n< script type='text/javascript' charset='utf-8' src='/".$PREFS->default_ini['system_folder']."/modules/lg_polls/scripts/jquery.ui-1.0/jquery-ui.min.js'>< /script>
\n";
$SESS->cache['scripts']['jquery'] = TRUE;
}
            
$r .="< script type='text/javascript' charset='utf-8' src='/".$PREFS->default_ini['system_folder']."/modules/lg_polls/scripts/lg_polls_publish.js'>< /script>
\n<link rel='stylesheet' type='text/css' media='screen' href='/".$PREFS->default_ini['system_folder']."/modules/lg_polls/styles/lg_polls_admin.css' >";
            
$out = str_replace("</head>", $r . "</head>", $out);
       
aircrash's avatar
aircrash
293 posts
16 years ago
aircrash's avatar aircrash

I posted this in the other LG Polls thread, but this one appears newer, so I’m reposting here:

I just installed LG_Poll, and it broke my control panel. I uploaded all of the files as specified in the instructions, and clicked the link to install the module. When I click the install link, it just loads a blank page. If I go back, it shows the module is not installed, and when I try to load the extensions manager, I also get a blank page.

I’m running EE 1.6.7, and it is installed on a subdomain.

Seems to be a problem with the ext.lg_polls_controller.php file. If I remove that from the extensions manager, everything works fine (except LG Polls).

       
matt romaine's avatar
matt romaine
50 posts
16 years ago
matt romaine's avatar matt romaine

not sure where feature requests should go for LG Polls, but would be nice to be able to map each answer to an entry, so that we can use extra meta-data for a poll answer, and allow flexible styling of each answer.

       
Les McKeown's avatar
Les McKeown
133 posts
16 years ago
Les McKeown's avatar Les McKeown

Leevi, any idea I’d be getting these error messages + my config settings for LG Polls won’t ‘stick’? (I’ve checked the lg_cache permissions and they’re fine, I have the two default fields configured…):

Notice: Undefined index: Lg_polls_CP in /path/to/system/modules/lg_polls/mcp.lg_polls.php on line 184

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path/to/system/modules/lg_polls/mcp.lg_polls.php on line 413

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path/to/system/modules/lg_polls/mcp.lg_polls.php on line 413

[...repeated 12 times]

Any ideas?

       
Casey Reid's avatar
Casey Reid
82 posts
16 years ago
Casey Reid's avatar Casey Reid

I’m having an issue where a member’s only poll is allowing duplicate submissions even though I’ve specific to NOT let users vote more than once. The issue is that the “Member ID” check does not appear to be working. The cookie check works, but if the user clears out their cookies, they can vote again (and have been, those sneaky bastards).

Has anyone experienced issues with the Member ID check not working? My template code is basically just the default that is provided in the LG Poll Docs.

       
Argyll's avatar
Argyll
67 posts
16 years ago
Argyll's avatar Argyll

I think Leevi may have gone missing…

Does anyone know if LG Polls can show the same poll at two different locations using different CSS? I’m baffled where this div tag comes from:

<div class='lg-poll' id='lg-poll-22'>

I do not see anything like that in my template. Each poll is shown inside this div.

       
grantmx's avatar
grantmx
1,439 posts
16 years ago
grantmx's avatar grantmx

I’m having an issue with LG Polls no longer allowing more than two answers. For some reason it doesn’t work any longer. I haven’t added any new modules or extensions, so I don’t see a conflict.

Running EE 1.6.7 Build: 20090515 Polls version 1.0.6

       
1 2 3 4

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.