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?
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
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
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?
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
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);
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).
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?
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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.