The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Poll only to see for

Go down

Solved Poll only to see for

Post by Liesbeth* on April 9th 2018, 5: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, 8:26 am; edited 1 time in total

Liesbeth*
Forumember

Female Posts : 45
Reputation : 3
Language : Nederlands

http://pspismagic.actieforum.com/

Back to top Go down

Solved Re: Poll only to see for

Post by APE on April 9th 2018, 6:26 pm

No sadly this is all done server side.



avatar
APE
Manager
Manager

Male Posts : 11845
Reputation : 1169
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Poll only to see for

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

Okay thank you for your answer

Liesbeth*
Forumember

Female Posts : 45
Reputation : 3
Language : Nederlands

http://pspismagic.actieforum.com/

Back to top Go down

Solved Re: Poll only to see for

Post by Wecoc on April 9th 2018, 10: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
Wecoc
Forumember

Male Posts : 54
Reputation : 25
Language : Catalan, Spanish, English

http://www.mundo-maker.com/

Back to top Go down

Solved Re: Poll only to see for

Post by Liesbeth* on April 11th 2018, 8: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:
$(function (){
$('[href*="vote=viewresult"]').remove()
});

I now use the script above in java


Liesbeth*
Forumember

Female Posts : 45
Reputation : 3
Language : Nederlands

http://pspismagic.actieforum.com/

Back to top Go down

Solved Re: Poll only to see for

Post by pedxz on April 11th 2018, 9:44 am

Hey,
Something like this?

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

Male Posts : 80
Reputation : 13
Language : português

http://ajuda.forumeiros.com/u62843

Back to top Go down

Solved Re: Poll only to see for

Post by Liesbeth* on April 11th 2018, 12:40 pm

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

Liesbeth*
Forumember

Female Posts : 45
Reputation : 3
Language : Nederlands

http://pspismagic.actieforum.com/

Back to top Go down

Solved Re: Poll only to see for

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

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

Liesbeth*
Forumember

Female Posts : 45
Reputation : 3
Language : Nederlands

http://pspismagic.actieforum.com/

Back to top Go down

Solved Re: Poll only to see for

Post by APE on April 17th 2018, 7:43 pm

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



avatar
APE
Manager
Manager

Male Posts : 11845
Reputation : 1169
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum