[Mod] Vote Block [vote]
[Mod] Vote Block [vote]
Ten minutes of googling got me nothing, so I stitched this nice little mod together. This mod adds a vote block. It can be configured to have 5 options, and one question. After submitting, anyone can vote (including the owner) howbeit only once.
Edit: Options left empty are removed when the form is submitted for voting.
Depends: None.
GitHub: https://github.com/joshuamars/minetest-mod-vote
Download: https://github.com/joshuamars/minetest- ... master.zip
Edit: Options left empty are removed when the form is submitted for voting.
Depends: None.
GitHub: https://github.com/joshuamars/minetest-mod-vote
Download: https://github.com/joshuamars/minetest- ... master.zip
Last edited by JoshMars on Fri Mar 10, 2017 21:25, edited 3 times in total.
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [mod] Vote Block [vote]
Lol ok
- Tmanyo
- Member
- Posts: 196
- Joined: Mon Sep 29, 2014 01:20
- GitHub: Tmanyo
- IRC: Tmanyo
- In-game: tmanyo
- Location: United States
- Contact:
Re: [Mod] Vote Block [vote]
I made something like this for a server I host around election time.
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Vote Block [vote]
It appears you changed the name back
Re: [Mod] Vote Block [vote]
Hi,
Very interesting mod !
A few few suggestions :
- Calling this mod "Poll" or "Simple Poll", would avoid confusion.
- Unused answers in the poll (blank or left to default) should not appear in the list when voting.
- intllib support (I already did this localy, i might help...)
- Maybe an expiry time.
Thanks.
Very interesting mod !
A few few suggestions :
- Calling this mod "Poll" or "Simple Poll", would avoid confusion.
- Unused answers in the poll (blank or left to default) should not appear in the list when voting.
- intllib support (I already did this localy, i might help...)
- Maybe an expiry time.
Thanks.
-
- Member
- Posts: 3476
- Joined: Sun Jul 12, 2015 22:51
- GitHub: BBmine
- IRC: BBmine
- In-game: Baggins
- Location: USA
Re: [Mod] Vote Block [vote]
Nice mod for my birthday :D (My BD is on Feb 14)
Re: [Mod] Vote Block [vote]
Updated: empty options are removed on poll submit.
Re: [Mod] Vote Block [vote]
This mod seems to be broken now :(
I can fill the form but I can't vote, black form is shown.
luacheck utility throws more errors than previous version, complaining about unused variables.
I'll try to give more information later.
Anyway, I made replacement images for the poll and wield image (Licence CC BY).
It needs this code to display properly :
I can fill the form but I can't vote, black form is shown.
luacheck utility throws more errors than previous version, complaining about unused variables.
I'll try to give more information later.
Anyway, I made replacement images for the poll and wield image (Licence CC BY).
It needs this code to display properly :
Code: Select all
node_box = {type="fixed",fixed={-0.5,-0.5,0.5,0.5,0.5,0.45}},
- Attachments
-
- vote_wi.png (1.54 KiB) Viewed 1373 times
-
- vote_front_a.png (1.2 KiB) Viewed 1373 times
Last edited by Peppy on Sat Mar 11, 2017 15:36, edited 1 time in total.
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Vote Block [vote]
You still need to rename this mod
Using the same name breaks the dependency system - no longer does depending on "vote" mean your depending on the API provided by my mod.
It also leads to user confusion, by having two mods that work drastically differently called the same thing. For example, a user may look in depends.txt and then install the wrong mod.
It also leads to potentially confusing conflicts, for example one of our mods overriding the other in load order eg: if one is in the subgame, and the other is in the mod folder.
To change your mod's name, change [vote] to something else such as [voteblock], then replace all instances of vote in your mod to the new name. This includes node names and variable names.
Using the same name breaks the dependency system - no longer does depending on "vote" mean your depending on the API provided by my mod.
It also leads to user confusion, by having two mods that work drastically differently called the same thing. For example, a user may look in depends.txt and then install the wrong mod.
It also leads to potentially confusing conflicts, for example one of our mods overriding the other in load order eg: if one is in the subgame, and the other is in the mod folder.
To change your mod's name, change [vote] to something else such as [voteblock], then replace all instances of vote in your mod to the new name. This includes node names and variable names.
Re: [Mod] Vote Block [vote]
lol too much work. Do it yourself and Ill pull it.
Re: [Mod] Vote Block [vote]
Fixed the blank dropdown issue
Re: [Mod] Vote Block [vote]
The Options won't accept comas anymore, this is a problem for me.
Need mod name change too...
Thanks.
Need mod name change too...
Thanks.
Re: [Mod] Vote Block [vote]
I need a function to escape out characters like that.
Re: [Mod] Vote Block [vote]
Code: Select all
minetest.formspec_escape(text)
Re: [Mod] Vote Block [vote]
Wow lol. I rlly should read that methods page on the wiki
Re: [Mod] Vote Block [vote]
Added minetest.formspec_escape -- thanks bell07
- Wuzzy
- Member
- Posts: 4788
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Vote Block [vote]
@rubenwardy: We definitely should make it a requirement for mods to have an unique name before they are allowed to be moved to Mod Releases, unless there is a VERY good reason for using a duplicate name.
Ignorant modders refusing to use an unique name should not be rewarded by moving their mods to Mod Releases.
http://krock-works.16mb.com/MTstuff/modSearch.php
Ignorant modders refusing to use an unique name should not be rewarded by moving their mods to Mod Releases.
Google is useless for finding Minetest mods. Use this search engine instead:Ten minutes of googling got me nothing
http://krock-works.16mb.com/MTstuff/modSearch.php
Re: [Mod] Vote Block [vote]
lol wuzzy that search engine is useless too. I actually try that first.
Re: [Mod] Vote Block [vote]
Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.
- Wuzzy
- Member
- Posts: 4788
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Vote Block [vote]
What are you talking about? Typing in “vote” yields the correct result:JoshMars wrote:lol wuzzy that search engine is useless too. I actually try that first.
http://krock-works.16mb.com/MTstuff/mod ... t=0&q=vote
Both rubenwardy's and your mod appear.
Re: [Mod] Vote Block [vote]
Rubenwardy's mod thread title says :JoshMars wrote:Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.
[Mod] Vote (with Kick voting) [0.1] [vote] - an API
What is misleading ?
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Vote Block [vote]
Kick is an example, the main part of the mod is the vote apiJoshMars wrote:Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.
Like how awards provides default awards
Re: [Mod] Vote Block [vote]
wuzzy I meant I was looking for a mod that was a block that you could vote from, and I couldn't find one. Obviously rubenwardys [vote] is not what I was looking for.
-
- Member
- Posts: 46
- Joined: Sat Aug 18, 2018 19:30
- In-game: init.lua
- Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
Re: [Mod] Vote Block [vote]
like this mod so mutch! :-)
- Attachments
-
- vote.png (13.36 KiB) Viewed 1373 times
Who is online
Users browsing this forum: Google [Bot] and 2 guests