[Mod] Vote Block [vote]

User avatar
JoshMars
Member
 
Posts: 103
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [mod] Vote Block [vote]

by rubenwardy » Tue Feb 14, 2017 18:33

A mod with this mod name already exists - please rename to voteblock

viewtopic.php?t=12829
 

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

Re: [mod] Vote Block [vote]

by JoshMars » Tue Feb 14, 2017 19:13

Lol ok
 

User avatar
Tmanyo
Member
 
Posts: 151
Joined: Mon Sep 29, 2014 01:20
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://rrhmsservers.weebly.com/
Servers I Host:
Xtremetest
Vault-81
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Vote Block [vote]

by rubenwardy » Wed Feb 15, 2017 17:37

It appears you changed the name back
 

Peppy
Member
 
Posts: 11
Joined: Sun Nov 06, 2016 07:34

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.
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: [Mod] Vote Block [vote]

by BBmine » Wed Feb 22, 2017 00:36

Nice mod for my birthday :D (My BD is on Feb 14)
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 

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

Re: [Mod] Vote Block [vote]

by JoshMars » Fri Mar 10, 2017 21:24

Updated: empty options are removed on poll submit.
 

Peppy
Member
 
Posts: 11
Joined: Sun Nov 06, 2016 07:34

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 :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
node_box = {type="fixed",fixed={-0.5,-0.5,0.5,0.5,0.5,0.45}},
Attachments
vote_wi.png
vote_wi.png (1.54 KiB) Viewed 7251 times
vote_front_a.png
vote_front_a.png (1.2 KiB) Viewed 7251 times
Last edited by Peppy on Sat Mar 11, 2017 15:36, edited 1 time in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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: 103
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Sat Mar 11, 2017 20:38

lol too much work. Do it yourself and Ill pull it.
 

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

Re: [Mod] Vote Block [vote]

by JoshMars » Sat Mar 11, 2017 20:39

Fixed the blank dropdown issue
 

Peppy
Member
 
Posts: 11
Joined: Sun Nov 06, 2016 07:34

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: 103
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Thu Mar 16, 2017 12:14

I need a function to escape out characters like that.
 

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

Re: [Mod] Vote Block [vote]

by bell07 » Thu Mar 16, 2017 15:41

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.formspec_escape(text)
 

User avatar
JoshMars
Member
 
Posts: 103
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: 103
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re: [Mod] Vote Block [vote]

by JoshMars » Fri Mar 17, 2017 19:48

Added minetest.formspec_escape -- thanks bell07
 

User avatar
Wuzzy
Member
 
Posts: 2161
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
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
JoshMars
Member
 
Posts: 103
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: 103
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: 2161
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.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

Peppy
Member
 
Posts: 11
Joined: Sun Nov 06, 2016 07:34

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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: 103
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.
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 9 guests

cron