Advertisement:

Author Topic: [smf 2.0.9] ssi_showPoll bug  (Read 9441 times)

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
[smf 2.0.9] ssi_showPoll bug
« on: February 25, 2015, 04:55:53 AM »
Sorry for my English

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,024
  • Gender: Male
    • BryanRunicDeakin on Facebook
    • @bryandeakin on Twitter
    • Bryan Deakin dot Com
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #1 on: February 25, 2015, 10:24:14 AM »
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?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,122
  • Gender: Male
    • Kindred-999 on GitHub
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #2 on: February 25, 2015, 11:13:04 AM »
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)?

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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #3 on: February 25, 2015, 11:52:27 AM »
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

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

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #4 on: February 25, 2015, 12:51:54 PM »
if the voting results can only look after the vote, but guests can still see them
Sorry for my English

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #5 on: February 25, 2015, 12:56:16 PM »
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

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

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #6 on: February 25, 2015, 01:03:32 PM »
* poll is configured to show results only after the vote
* Guests via SSI can see the results (Simple Portal mod)
« Last Edit: February 25, 2015, 01:17:28 PM by inter »
Sorry for my English

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,024
  • Gender: Male
    • BryanRunicDeakin on Facebook
    • @bryandeakin on Twitter
    • Bryan Deakin dot Com
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #7 on: February 25, 2015, 01:16:23 PM »
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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,122
  • Gender: Male
    • Kindred-999 on GitHub
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #8 on: February 25, 2015, 03:59:35 PM »
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...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,065
    • Arantor on GitHub
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #9 on: February 26, 2015, 12:58:09 AM »
And the fact SP is involved may make this an SP bug...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #10 on: February 26, 2015, 07:48:36 AM »
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



Code: [Select]
<?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

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

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #11 on: February 26, 2015, 03:59:10 PM »
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...

Code: [Select]
$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
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,135
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #12 on: August 02, 2015, 12:29:45 AM »
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

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,265
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #13 on: August 02, 2015, 12:56:38 AM »
I think this is in 2.0.10.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,135
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: [smf 2.0.9] ssi_showPoll bug
« Reply #14 on: August 02, 2015, 12:59:59 AM »
*thumbs up*
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