News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Additional Polls

Started by Windy, January 06, 2009, 08:12:57 AM

Previous topic - Next topic

iksa

I believe there is a bug in the package-info.xml file of this mod. It says this installs only on 2.0 RC4. I believe this mod would be fully functional also on any other 2.* version. At least I got it installed just fine on my 2.0.3 when I first removed that restriction from package-info.xml.

Arantor

It's not a bug, it just hasn't been updated by the author for a little over 2 years (when 2.0 RC4 was the then-current version of SMF)

The fact it works is more a testament to the lack of change in SMF for polls since then.

There's always the emulate option in the package manager to avoid editing the package.

iksa


borish

This mod fails to install in SMF 2.0.9 (with 2.0 RC4 emulation). I get an error for a replacement operation in Sources/Display.php for

$context['show_view_results_button'] = $context['allow_vote'] && (!$context['allow_poll_view'] || !$context['poll']['show_results'] || !$context['poll']['has_voted']);
$context['poll']['show_view_results_button'] = $context['poll']['allow_vote'] && (!$context['poll']['allow_poll_view'] || !$context['poll']['show_results'] || !$context['poll']['has_voted']);

dougiefresh

Here is what SMF 2.0 RC4 through SMF 2.0.8 has in Sources/Display.php:
$context['show_view_results_button'] = $context['allow_vote'] && (!$context['allow_poll_view'] || !$context['poll']['show_results'] || !$context['poll']['has_voted']);

Here is what SMF 2.0.9 has in Sources/Display.php:
$context['show_view_results_button'] = $context['allow_vote'] && $context['allow_poll_view'] && !$context['poll']['show_results'];

Suggested change to that operation (requires edits to the mod):
$context['poll']['show_view_results_button'] = $context['poll']['allow_vote'] && $context['poll']['allow_poll_view'] && !$context['poll']['show_results'];

jack_1985

Hi everyone,

I installed this mod at SMF 2.0.8. It is functional, but the following error pops up:

Quote8: Undefined index: poll_hide
in Polls.php
Line: 737

This error appears when someone tries to edit a poll that they have created. The visibility of the votes also seems to reset, when a poll is edited.

Does anyone have any ideas what the cause of this could be, or how it could be fixed?

Any suggestions would be greatly appreciated!  :)

dougiefresh

@jack_1985: Without seeing your Sources\Polls.php file, I (and probably anyone else) couldn't even begin to help you....

jack_1985

Thank you for your reply, dougiefresh. It is much appreciated. I have attached the Polls.php file like you suggested.

If you would be willing to take a look, please note that no changes have been made to this file except the ones required by this mod. I have also double-checked all of those changes myself, and as far as I could tell everything appears to be correct...

Could the problem perhaps lay elsewhere?

jack_1985

Could someone please have a look if they you can find a spare minute? :)

dougiefresh

Quote from: jack_1985 on January 14, 2015, 08:48:13 AM
Hi everyone,

I installed this mod at SMF 2.0.8. It is functional, but the following error pops up:

Quote8: Undefined index: poll_hide
in Polls.php
Line: 737

This error appears when someone tries to edit a poll that they have created. The visibility of the votes also seems to reset, when a poll is edited.

Does anyone have any ideas what the cause of this could be, or how it could be fixed?

Any suggestions would be greatly appreciated!  :)
I'm sorry.  I completely lost track of things....

In Sources/Poll.php, change this line (at line 737):
$_POST['poll_hide'] = (int) $_POST['poll_hide'];
to this statement:
$_POST['poll_hide'] = (int) isset($_POST['poll_hide']) ? $_POST['poll_hide'] : 0;

Hope this helps you.

jack_1985

Thanks dougiefresh!

The error has disappeared. :)

But when editing an existing poll, the visibility option always resets to "show results to everyone". It's only possible to select "run for XXX days" when you first post the poll.

Is that normal?

dougiefresh

Quote from: jack_1985 on February 27, 2015, 05:51:16 AM
But when editing an existing poll, the visibility option always resets to "show results to everyone". It's only possible to select "run for XXX days" when you first post the poll.

Is that normal?
Wouldn't have the faintest.  I'll be honest with ya, I've worked 67 hours in 6 days and I don't feel like looking through the code to try and figure out what is going on right now, as it's not my mod....

Gwenwyfar

#212
Anyone knows if this can this work with ssi_showPoll by poll ID? (if you use topic id it just grabs the first poll)

(Just asking before I go around seeing if I can find out a way... and if I do I'll post it here later :) )
"It is impossible to communicate with one that does not wish to communicate"

Gwenwyfar

Didn't find a way yet, but you can change the topic's poll id in the database to change what shows up in the ssi poll for that topic. Maybe making ssi work by poll id would solve this.
"It is impossible to communicate with one that does not wish to communicate"

Stanyy

Bug Report:

For multiple choice polls (e.g make two choices). When a 'guest' votes for two choices, the first option in the poll becomes bold instead of the the two choices the guest voted for. This is somewhat misleading because the correct votes are actually being recorded.
I also noticed that this only happens when more than one option is selected. If only one option is selected, the correct choice is shown in bold text.

Logged users do not experience this problem though.

nend

Small bug

When viewing results the "View Results" button is still active with the "Voting Options" button.

Display.template.php
Code
$context['show_view_results_button'] = $context['poll']['show_view_results_button'];

Small work around
$context['show_view_results_button'] = !$context['poll']['allow_return_vote']?$context['poll']['show_view_results_button']:false;

bharat

I am looking for additional polls for version 2.0, is it going to be avalaible?

Shambles

Quote from: bharat
I am looking for additional polls for version 2.0, is it going to be avalaible?

What do you mean? I have this mod installed in 2.0.15

Dwev

Quote from: Shambles on January 21, 2018, 03:50:14 PM
What do you mean? I have this mod installed in 2.0.15

I tried installing it in SMF 2.0.15 (with a custom theme) and it screwed up my forum so badly that I to replace all SMF files from my backup.

So an update would be very welcome, because I would really like to be able to use this Mod.

-Rock Lee-

Quote from: Dwev on February 09, 2018, 10:33:49 AM
Quote from: Shambles on January 21, 2018, 03:50:14 PM
What do you mean? I have this mod installed in 2.0.15

I tried installing it in SMF 2.0.15 (with a custom theme) and it screwed up my forum so badly that I to replace all SMF files from my backup.

So an update would be very welcome, because I would really like to be able to use this Mod.

Nor emulating the version installed correctly? What theme was he using?


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Advertisement: