Module: Topic Poll
Posted by Maurice Makaay
January 06, 2013 11:47AM |
Admin Registered: 18 years ago Posts: 8,532 |
In topic_poll.php, an empty poll is initialized like this:
By extending the "answers" array, you can add as many standard answers as you wish.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Language: PHP// Initialize a new poll. $message["meta"]["mod_topic_poll"] = array ( "question" => "", "answers" => array( 0 => "", 1 => "" ), "votes" => array(), "total_votes" => 0, "votingtime" => 0, // in days, 0 for unlimited "permission" => "user", "active" => 1, "cache_id" => 0, );
By extending the "answers" array, you can add as many standard answers as you wish.
Maurice Makaay
Phorum Development Team



Re: Module: Topic Poll January 07, 2013 07:03AM |
Registered: 10 years ago Posts: 21 |
Re: Module: Topic Poll January 07, 2013 03:10PM |
Registered: 19 years ago Posts: 683 |
Quote
autoven
in the poll editor, can i have more than 2 fields by default? Where can i modify the code?
Modify topic_poll.php to:
Language: PHP// Initialize a new poll. $message["meta"]["mod_topic_poll"] = array ( "question" => "", "answers" => array( 0 => "", 1 => "", 2 => "" ), "votes" => array(), "total_votes" => 0, "votingtime" => 0, // in days, 0 for unlimited "permission" => "user", "active" => 1, "cache_id" => 0, );
Re: Module: Topic Poll February 02, 2013 05:56AM |
Registered: 15 years ago Posts: 7 |
Thanks for very neat module, Maurice. I have one question/request tho: Is it possible to have multiple polls in same thread/post? Basically, I would like to have multiple questions with their own answers in the same thread. This would help our forum members a lot since currently some "voting" that we do is bit taxing.
Thanks!
Thanks!
February 02, 2013 12:10PM |
Admin Registered: 18 years ago Posts: 8,532 |
No, that has not been implemented. It really is "topic poll", so a poll that is linked to a single topic / thread.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



June 06, 2013 11:40AM |
Admin Registered: 17 years ago Posts: 744 |
Hi Maurice,
I get some PHP Notice from the Topic Poll Module when using also Post Preview Module:
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
I get some PHP Notice from the Topic Poll Module when using also Post Preview Module:
PHP Notice: Undefined index: READ in /var/www/.../phorum-5.2.19/mods/topic_poll/topic_poll.php on line 711, referer: [forum.langzeittest.de]
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Topic Poll September 04, 2014 11:02AM |
Registered: 8 years ago Posts: 32 |
Re: Module: Topic Poll September 04, 2014 10:26PM |
Admin Registered: 17 years ago Posts: 560 |
Re: Module: Topic Poll September 05, 2014 01:34AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: Module: Topic Poll September 05, 2014 05:08AM |
Registered: 8 years ago Posts: 32 |
Quote
Scott Finegan
Are you using the Emerald template when you encounter this issue?
edit>> The Classic template would need a matching template in the poll module.
I am using emerald-alt as my standard template, next to the normal emerald, classic and redbirds templates. The module stays in English in all of them..... And yes Dutch is included in the language files of the module. There are currently two Dutch language files for phorum, both of them do not work with the Topic Poll module on my site.
What i have done so far:
Cleaned out cache/cookies of browser
Purge cache
Ran sanity checks
Ran Database integrity
Shut the module off/on
Did all of the above multiple times...
And asked this question...
Would it make any difference if would uninstall and reinstall the module?
Sorry, only registered users may post in this forum.