Firefox PHP

Topic Poll Module

Posted by Maurice Makaay 
Re: Topic Poll Module
January 06, 2013 01:33AM
Thanks for this module.

How do i customize the code, like by default it shows 4 answer fields instead of 2 answer fields?
Re: Topic Poll Module
January 06, 2013 05:45PM
In topic_poll.php, an empty poll is initialized like this:
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
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login