News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[smf 2.0.9] ssi_showPoll bug

Started by inter, February 25, 2015, 04:55:53 AM

Previous topic - Next topic

inter

Sorry for my English

Deaks

can you provide more information is it a full ban? post ban?  do you have any other ssi mods installed that may interfere with this function? can you provide steps to replicate easier?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

yup...  we would need more information.


At the moment, based on the description that you have given, I actually don't see a real bug...

1- you make poll result visible to guests
2- you make the poll/results display using SSI


So, why is it a problem that poll results are displayed to guests (banned or not)?

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

Do note that the only ban that would be effective in that case is IP ban (because he is a guest). If the accesses from another IP, then he's like any other guest (non-banned)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

inter

if the voting results can only look after the vote, but guests can still see them
Sorry for my English

margarett

So the ban isn't really important?

Please confirm if this is the scenario:
* Your guests are allowed to view poll results
* Your poll is configured to show results only after the vote
* Normal guests on the forum can't see the results
* Guests via SSI can see the results

Is that it?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

inter

#6
* poll is configured to show results only after the vote
* Guests via SSI can see the results (Simple Portal mod)
Sorry for my English

Deaks

Quote from: Ρουνικ on February 25, 2015, 10:24:14 AM
do you have any other ssi mods installed that may interfere with this function? can you provide steps to replicate easier?

these are also important a few mods are known to interfere with SSI
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

also....    can guests actually VOTE?

If they can not vote, then I think they are going to see the results.
I believe that is how the logic works...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

And the fact SP is involved may make this an SP bug...

margarett

I confirm this.

I create a poll, set it to show results after someone has voted.

I vote and see the results


A guest cannot see the ongoing results


Using ssi_showPoll as a guest the result IS SHOWN



<?php

// Include the SSI file.
require(dirname(__FILE__) . '/SSI.php');

if (!empty(
$user_info['is_guest']))
echo 'I am a guest </br>';
else
echo 'I am a user! </br>';
ssi_showPoll ($topic=9$output_method='echo');

?>
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Oldiesmann

This is weird. The code for that function specifically shows results if you're hiding them and the person viewing the poll can't vote...

$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && !$allow_vote) || $is_expired;

The code to display the poll in the topic actually takes into account whether or not you've voted. For now you can get rid of the "|| ($row['hide_results'] == 1 && !$allow_vote)" part to prevent it from showing results to those who can't vote. It doesn't fix the issue of showing results if you've already voted, but it'll solve the bigger issue until a proper fix is determined.
Michael Eshom
Christian Metal Fans

Ninja ZX-10RR

Yo Oldiesmann, did you have the time to look into this by any chance? Because it's been nearly 6 months and I was wondering whether you could push a proper fix into 2.0.11 or if it's strictly simpleportal-related (if that is the case, being in Support Team, I'd like to know).
Thanks
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

live627


Ninja ZX-10RR

Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Advertisement: