Topic Poll Module
Posted by Maurice Makaay
Re: Topic Poll Module January 05, 2013 07:33PM |
Registered: 12 years ago Posts: 21 |
Re: Topic Poll Module January 06, 2013 11:45AM |
Admin Registered: 20 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
my blog linkedin profile secret sauce
Re: Topic Poll Module September 23, 2024 09:46AM |
Registered: 17 years ago Posts: 50 |
Hi
Moving from PHP 7.4 to 8.3,
Is there a newer version of the mod than 1.0.20?
Edit: I just realised I'm on the wrong topic, and I found 1.0.22 for 5.2. I'll test and get back on the proper topic if needed. The part below is still valid though.
On a totally different subject, I get "your IP address or network is blocked" for 45.66.41.68 and I had to use a VPN to get here. The IP space belongs to Inalan, a Greek fibre-only connectivity provider. Whatever the reason it is blocked, it is not me. Could you please unblock it?
Edited 1 time(s). Last edit at 09/23/2024 09:56AM by zenon.
Moving from PHP 7.4 to 8.3,
[23-Sep-2024 12:31:10 UTC] PHP Fatal error: Uncaught Error: Call to undefined function each() in /path/to/phorum/mods/topic_poll/topic_poll.php:389 Stack trace: #0 /path/to/phorum/common.php(1909): phorum_mod_topic_poll_read() #1 /path/to/phorum/read.php(754): phorum_hook() #2 {main} thrown in /path/to/phorum/mods/topic_poll/topic_poll.php on line 389The offending line is
and the cause is that each() was deprecated since 7.2 and was removed in 8.Language: PHPlist ($message_id, $message) = each($messages);
Is there a newer version of the mod than 1.0.20?
Edit: I just realised I'm on the wrong topic, and I found 1.0.22 for 5.2. I'll test and get back on the proper topic if needed. The part below is still valid though.
On a totally different subject, I get "your IP address or network is blocked" for 45.66.41.68 and I had to use a VPN to get here. The IP space belongs to Inalan, a Greek fibre-only connectivity provider. Whatever the reason it is blocked, it is not me. Could you please unblock it?
Edited 1 time(s). Last edit at 09/23/2024 09:56AM by zenon.
Sorry, only registered users may post in this forum.