web links and media? server or client mod? even possible?

Post Reply
User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

web links and media? server or client mod? even possible?

by christoferlevich » Post

What are the abilities of minetest in regards of creating clickable links from with in the game to open a web browser?
I do not mean emulate a working in-game browser, I mean either embedding a link in a punchable node and/or formspec that could launch a custom website for various purposes.

I would use it specifically for educational purposes (open web page - read article - complete a brief google form quiz - obtain a password - unlock whatever was locked with password - continue in-game activity).

While on the subject - can videos be embed? Homedecor has a cool plasma tv that uses an animated png - but is there anyway to throw a low res video clip into the thing/ That might be mind blowing.

Is this something that I might be able to do through a client side mod?

I am not asking anyone to make this - just wondering if anyone knows the possibilities or how to approach such a requirement? I am certain that making it work cross platform might be an issue, but I would sure like to create the function for my set of student Lenovo Laptops (Win10). lol
everything can be a learning experience...

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

Found this on a lua forum -
For now, I am only trying to get it to work in Windows (as my students are 100% windows) but I am certain once I figure that out it can be made universal. The code I am trying to use is "(os.execute("start http://google.com"))" If I get it working its Win only - but I will add other OSes later.
everything can be a learning experience...

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

I cant find anything on setting up an os.execute event in Minetest. :(
everything can be a learning experience...

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

Re: web links and media? server or client mod? even possible

by rubenwardy » Post

There is no way without client modifications in c++*

* Except if it's in singleplayer, then you can get them to disable mod security and use os.execute, but this is not recommended
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

So there is no known what to adjust, modify or turn off mod security on server side or its so unsafe no one talks about it? C++ is another learning curve for another day for me I think... plus I don't think messing with the client is too wise for me. :)

btw - I am speaking out of ignorance because I have no idea what kind of dangers would be exposed without mod security
Last edited by christoferlevich on Fri Jul 21, 2017 18:55, edited 1 time in total.
everything can be a learning experience...

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

Re: web links and media? server or client mod? even possible

by rubenwardy » Post

turning off mod security on the server won't open a page on the client - it will open the page on the server.
and I very much recommend against turning it off, see viewtopic.php?f=18&t=17601
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

rubenwardy wrote:turning off mod security on the server won't open a page on the client - it will open the page on the server.
and I very much recommend against turning it off, see viewtopic.php?f=18&t=17601
I trust you completely - as an avid reader of your modding site... I am just trying to think out of the box and use some of my strengths (web design) to bring more eye candy and umph. In learning this from you, I may have to take the path of mastering formspec... lol - but it looks very stiff...
everything can be a learning experience...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: web links and media? server or client mod? even possible

by sofar » Post

The minetest console has larger issues: It's already really difficult to copy and paste text into it, for instance. Once that is fixed, people could just copy and paste links into their browsers, which would partially solve the problem already.

This needs to be fixed in the engine, not in mods, anyway, so mod security isn't an issue.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

So what you are saying is I should be leaning C++ if I want to advance those kind of functions in minetest? :) I'll try!
everything can be a learning experience...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: web links and media? server or client mod? even possible

by sofar » Post

christoferlevich wrote:So what you are saying is I should be leaning C++ if I want to advance those kind of functions in minetest? :) I'll try!
In this case, yes. There are many things that could be done in Lua, but this isn't one of them. Unfortunately, solving this in C++ isn't likely an easy task.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

The modding community is awesome and none of them seem too interested in charging for freelance - PERHAPS - I could find a C++ coder to clean and fix it. Would that be way out of bounds? All I want is Minetest to kick major butt... right now it kicks butt, but its not major butt... :)
everything can be a learning experience...

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: web links and media? server or client mod? even possible

by Sokomine » Post

sofar wrote: The minetest console has larger issues: It's already really difficult to copy and paste text into it, for instance. Once that is fixed, people could just copy and paste links into their browsers, which would partially solve the problem already.

This needs to be fixed in the engine, not in mods, anyway, so mod security isn't an issue.
Might be a good situation for CSM. To my knowledge, client side mods can already monitor the chat (even send messages). If such a mod where to search for urls and expose them somewhere it could work. Maybe with the chatlog mod and an external script that monitors the database the mod logs its data to.
A list of my mods can be found here.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

I was thinking maybe running minetest in a wrapper... I found someone doing it with java, but I haven't tried it yet. Client side seems to make sense, but Sofar's statement leads me to be a little cautious. The fact that there are bugs like that (meaning, something that essentially is holding back minetest from performing in ways teacher's will want) - it becomes a question of whether or not it is worth trying to work around the bug or move to a more advanced gaming engine. Maybe this is why, in part, there are many projects that are simply abandoned? Maybe its all the stupid LUAJit memory crashes (which to a non-programer seems crazy on a pc with 20gigs of ram)? Maybe its the fact that it can be difficult to determine which mods are truly solid and functioning from broken mods?

For me - it makes no difference. I will be MT for the foreseeable future. I will invest time, effort, money, and whatever I have to in order to get a stable educational sub game for Minetest that teachers won't be scared from (I have to make client management easier and or automated)... I just don't really know how and where to start yet. lol
everything can be a learning experience...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: web links and media? server or client mod? even possible

by sofar » Post

Sokomine wrote:Might be a good situation for CSM. To my knowledge, client side mods can already monitor the chat (even send messages). If such a mod where to search for urls and expose them somewhere it could work. Maybe with the chatlog mod and an external script that monitors the database the mod logs its data to.
yeah, very good idea, it could at a minimum offer the hyperlinks in a formspec field, from where they may end up copied.

User avatar
christoferlevich
Member
Posts: 325
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

Re: web links and media? server or client mod? even possible

by christoferlevich » Post

Just reading things - what about the insecure environment request? https://github.com/minetest/minetest/bl ... .txt#L3046
everything can be a learning experience...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: web links and media? server or client mod? even possible

by sofar » Post

christoferlevich wrote:Just reading things - what about the insecure environment request? https://github.com/minetest/minetest/bl ... .txt#L3046
I assume you want to open hypertext links in an external browser?

The best way to facilitate that would be to implement the functionality in the core, since every OS does things differently anyway. You also ... absolutely ... do not want lua mods to be able to open URLs since that is just going to lead to spam and malvertising. So doing this anywhere near Lua would imho be undesired (at best).

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests