[Mod] Vote Block [vote]

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

[Mod] Vote Block [vote]

by JoshMars » Tue Feb 14, 2017 18:20

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-mod-vote/archive/master.zip
Last edited by JoshMars on Fri Mar 10, 2017 21:25, edited 3 times in total.
 

User avatar
rubenwardy
Moderator
 
Posts: 5545
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

User avatar
Tmanyo
Member
 
Posts: 196
Joined: Mon Sep 29, 2014 01:20
Location: United States
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo

Re: [Mod] Vote Block [vote]

by Tmanyo » Tue Feb 14, 2017 22:12

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
 

User avatar
rubenwardy
Moderator
 
Posts: 5545
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Mod] Vote Block [vote]

by Peppy » Wed Feb 15, 2017 19:05

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.
 

User avatar
BBmine
Member
 
Posts: 3460
Joined: Sun Jul 12, 2015 22:51
Location: USA
GitHub: BBmine
IRC: BBmine
In-game: Baggins
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Mod] Vote Block [vote]

by Peppy » Sat Mar 11, 2017 15:27

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 :

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) Not downloaded yet
vote_front_a.png
(1.2 KiB) Not downloaded yet
Last edited by Peppy on Sat Mar 11, 2017 15:36, edited 1 time in total.
 

User avatar
rubenwardy
Moderator
 
Posts: 5545
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Vote Block [vote]

by rubenwardy » Sat Mar 11, 2017 15:31

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.
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Mod] Vote Block [vote]

by Peppy » Thu Mar 16, 2017 09:00

The Options won't accept comas anymore, this is a problem for me.

Need mod name change too...

Thanks.
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

bell07
Member
 
Posts: 534
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Fri Mar 17, 2017 01:32

Wow lol. I rlly should read that methods page on the wiki
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh
 

User avatar
Wuzzy
Member
 
Posts: 3243
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Vote Block [vote]

by Wuzzy » Fri Mar 17, 2017 20:47

@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.

Ten minutes of googling got me nothing

Google is useless for finding Minetest mods. Use this search engine instead:
http://krock-works.16mb.com/MTstuff/modSearch.php
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Fri Mar 17, 2017 21:03

lol wuzzy that search engine is useless too. I actually try that first.
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Fri Mar 17, 2017 21:04

Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.
 

User avatar
Wuzzy
Member
 
Posts: 3243
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Vote Block [vote]

by Wuzzy » Fri Mar 17, 2017 22:31

JoshMars wrote:lol wuzzy that search engine is useless too. I actually try that first.

What are you talking about? Typing in “vote” yields the correct result:

http://krock-works.16mb.com/MTstuff/mod ... t=0&q=vote

Both rubenwardy's and your mod appear.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Peppy
Member
 
Posts: 32
Joined: Sun Nov 06, 2016 07:34
Location: France
IRC: Peppy
In-game: Peppy

Re: [Mod] Vote Block [vote]

by Peppy » Fri Mar 17, 2017 23:35

JoshMars wrote:Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.

Rubenwardy's mod thread title says :
[Mod] Vote (with Kick voting) [0.1] [vote] - an API

What is misleading ?
 

User avatar
rubenwardy
Moderator
 
Posts: 5545
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Vote Block [vote]

by rubenwardy » Fri Mar 17, 2017 23:45

JoshMars wrote:Ooh, btw, rubenwardy should change his mod name to [votekick], because it is misleading.


Kick is an example, the main part of the mod is the vote api
Like how awards provides default awards
 

User avatar
JoshMars
Member
 
Posts: 106
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Sat Mar 18, 2017 15:40

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.
 

User avatar
Isja Krass
Member
 
Posts: 25
Joined: Sat Aug 18, 2018 19:30
Location: Bavaria, Germany
In-game: isjakrass

Re: [Mod] Vote Block [vote]

by Isja Krass » Mon Aug 20, 2018 15:57

like this mod so mutch! :-)

Image
Attachments
vote.png
(13.36 KiB) Not downloaded yet
[ OK ] signature status
 


Return to WIP Mods



Who is online

Users browsing this forum: IcyDiamond and 3 guests