Releases: FriendsOfFlarum/polls
1.3.0
The database structure was modified in this update. You must run php flarum migrate
after updating.
Feature changes
- Added ability to link images in poll options. Must be enabled in admin panel. Image URLs must be fully qualified. Images are displayed under each option label.
Integration changes
Only important if you have a custom script using the Flarum REST API to create polls automatically.
The REST API syntax for creating polls via POST /api/discussions
was modified.
Previously an array of strings would be sent as data.attributes.poll.relationships.options
. This has been replaced by an array of objects (keys answer
, imageUrl
) sent as data.attributes.poll.options
to support more option attributes.
The older syntax is deprecated but will continue to be supported for a few versions.
Developer changes
The extensibility of the extension was improved by refacting the code into more methods.
The virtual DOM returned by the components is still almost entirely identical so there should be very little risk of breaking changes.
- Added
CreatePollModal.prototype.fields
ItemList. - Added
CreatePollModal.prototype.data
view sub-method. - Added
DiscussionPoll.prototype.viewOption
view sub-method. - Added
ListVotersModal.prototype.optionContent
andListVotersModal.prototype.voteContent
view sub-method. - Added
SavingPollAttributes
PHP event to hook into the poll (not options) saving. - Implemented
PollOptionValidator
(was unused previously).
This update was sponsored by annonny
1.2.1
1.2.0
- Use official Flarum
ComposerState
fields API to hold poll data. This allows other extensions to interact with Polls in new ways.
1.1.0
1.0.5
User profile bugfix
Fixed issue when browsing posts that contain polls on the user profile #40
1.0.2
- Fix Pusher integration
- Add width transition to active background of poll options
Address inconsistency between frontend and backend abilities
Bundled output for commit b7ea4d9f0a55e05e2d2f3791dcec2c65885c4819 Includes transpiled JS/TS. [skip ci]
Flarum/core 1.0 ready
Bundled output for commit 52e02711a1c5546f35a0def96782789b4f083205 Includes transpiled JS/TS. [skip ci]
Fix ability to view votes
- Fixed issue introduced in 0.3.3/0.4.0 where having "View results without voting" permission would allow you to see voters of private polls.
Compatible with Flarum beta 16 only.
If you are updating from version 0.3.2 or older, check the update instructions in the 0.4.0 release notes.