Comment 'Thx Leonid S for the...' to 'Una Macros & Poll module'
  • Thx Leonid S for the answer. But I tried both, they do not show any results. Tried in raw and html blocks, nothing is shown. 

    I wonder why, because the other macros work very well, so I dont think I did it completely wrong with the macros for result and answer. What could be the reason? 

    I tried both variations voters visible/hidden and results visible/hidden

    image_transcoder.php?o=bx_froala_image&h=4264&dpx=2&t=1606385674

    Could it be that the system takes care of the users privacy?

    Since this macro allows to show result for every poll even private one, then it's unsafe to use it directly, if you want to use any service method directly then you can use service block in Developer module.

    • Are Macros in dev service blocks allowed?

      Tried a service block in studio/dev/pages/homepage and entered the macro { {~bx_polls:get_block_poll_answers[...]~} } 

      I get the message TOKEN expired. So the Block will not be saved. 

      • No, in the Developer app you should use the code like (Content field of the block):

        array (

          'module' => 'bx_polls',

          'method' => 'get_block_results',

          'params' => 

          array (

        0 => {poll_id}

        )

        )

        • Sorry LeonidS, just to inform You, Dev dont let me create a service block with this code. The saving process becomes endless and finally the new created block is not saved. 

          I have entered the right [poll_id]

          note. actually not really urgent but may be in some weeks...