Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: diva_uno - helmikuu 13, 2005, 06:09:16 AP

Otsikko: Hide poll results...
Kirjoitti: diva_uno - helmikuu 13, 2005, 06:09:16 AP
Just wondering is there a way that poll results can be hidden and only seen by the moderator or admin? This way you can have a hidden poll where the results are revealed at a certain time.
Otsikko: Re: Poll Files...
Kirjoitti: diva_uno - helmikuu 14, 2005, 06:35:30 IP
Ok...Now I see why noone answered this question. I never use polls on my board and finally checked them out and found my answer.

But if possible...I wanted to know what are all the files that work with poll.php to make it work within the board. Like there is a form that is added into a post what has all the poll features. Just wondering what are all the files that are included.
Otsikko: Re: Hide poll results...
Kirjoitti: Oldiesmann - helmikuu 14, 2005, 08:36:16 IP
It can be done, and there are several ways to do it:

1. Add a custom permission for it
2. Give your mods and global mods the "moderate board" permission (although this is a powerful one)
3. Modify Display.php and Display.template.php to let them view it (easiest way)

I don't have as much time as I'd like to look at this at the moment, but it can be done.

The poll info is handled by three files:
Display.php - loads the poll info and handles poll-related permissions
Poll.template.php - outputs the actual poll
Poll.php - functions related to the poll (voting, editing, etc.)
Otsikko: Re: Hide poll results...
Kirjoitti: diva_uno - helmikuu 15, 2005, 07:47:56 AP
Thanks so very much... ;D