The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Poll only to see for

    avatar
    Liesbeth*
    Forumember


    Female Posts : 68
    Reputation : 6
    Language : Nederlands
    Location : DSF Mod

    Solved Poll only to see for

    Post by Liesbeth* April 9th 2018, 4:36 pm

    Can a poll be set up with a script so that only the administrator can see the poll.
    I mean the button view results is then invisible to the members, only to see for the staff.

    I now have a script but then we see nothing until we have voted
    And it is difficult for a tie, so it is useful if the staff can see the results


    Last edited by Liesbeth* on April 17th 2018, 7:26 am; edited 1 time in total
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Poll only to see for

    Post by Ape April 9th 2018, 5:26 pm

    No sadly this is all done server side.



    Poll only to see for Left1212Poll only to see for Center11Poll only to see for Right112
    Poll only to see for Ape_b110
    Poll only to see for Ape1010
    avatar
    Liesbeth*
    Forumember


    Female Posts : 68
    Reputation : 6
    Language : Nederlands
    Location : DSF Mod

    Solved Re: Poll only to see for

    Post by Liesbeth* April 9th 2018, 5:32 pm

    Okay thank you for your answer
    Wecoc
    Wecoc
    Forumember


    Male Posts : 144
    Reputation : 111
    Language : Catalan, Spanish, English

    Solved Re: Poll only to see for

    Post by Wecoc April 9th 2018, 9:15 pm

    Sorry. What APE said is true the results themselves are managed server side, but please don't close this topic yet.

    It's not easy but I believe technically it still can be done. It would still be possible to hide the "View results" button of the poll on all members but admins, and also replace the poll in result mode with a text "Only admins can see the results of this poll" or something like that (this would be better via template if possible, to make sure the user doesn't cheat)

    But I have a question: After voting, the members should be able to see the results then, or neither in that case? blackeye
    Probably it would be useful if you post the script you are using currently.
    avatar
    Liesbeth*
    Forumember


    Female Posts : 68
    Reputation : 6
    Language : Nederlands
    Location : DSF Mod

    Solved Re: Poll only to see for

    Post by Liesbeth* April 11th 2018, 7:01 am

    No, if members vote, members can see the results. That can not be changed anyway. I want to post the javascript that I use now.

    hide:

    I now use the script above in java

    Poll only to see for Cd236wy8
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: Poll only to see for

    Post by tikky April 11th 2018, 8:44 am

    Hey,
    Something like this?

    Code:
    $(document).ready(function(){
     
      var level = _userdata["user_level"];
     
      if ( level === 0 ) {
      $('a[href*="?vote=viewresult"]').remove();
      }
     
    });
    avatar
    Liesbeth*
    Forumember


    Female Posts : 68
    Reputation : 6
    Language : Nederlands
    Location : DSF Mod

    Solved Re: Poll only to see for

    Post by Liesbeth* April 11th 2018, 11:40 am

    Thank you, as I can see it now it works on my test forum. Apply now to test my real forum.
    avatar
    Liesbeth*
    Forumember


    Female Posts : 68
    Reputation : 6
    Language : Nederlands
    Location : DSF Mod

    Solved Re: Poll only to see for

    Post by Liesbeth* April 17th 2018, 7:25 am

    Thank you pedxz this script works perfectly members can not see the managers. The topic can, in my opinion, be locked.
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Poll only to see for

    Post by Ape April 17th 2018, 6:43 pm

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    Poll only to see for Left1212Poll only to see for Center11Poll only to see for Right112
    Poll only to see for Ape_b110
    Poll only to see for Ape1010

      Current date/time is September 22nd 2024, 11:35 pm