Page 1 of 1

Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:05
by Krock
The clients already receive all data to make this possible:

Image

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:33
by sfan5
How do you open a web browser from C++? (cross-platform & reliable)

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:40
by Krock
sfan5 wrote:How do you open a web browser from C++? (cross-platform & reliable)

For every system an other code thing? It wouldn't be like there are 1000 diffrent based operating systems around which would be needed to support.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:53
by PilzAdam
What about security? I heard some people have Javascript enabled by default in their browsers.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:56
by Krock
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

Are clickable links in OpenOffice a security risk?

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:58
by sfan5
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

"No program should be allowed to open a web browser for the user, the user might still be using Internet Explorer 6.0"
Is this a joke?

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 15:58
by PilzAdam
Krock wrote:
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

Are clickable links in OpenOffice a security risk?

AFAIK the link is displayed and you need to Ctrl + click.

sfan5 wrote:
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

"No program should be allowed to open a web browser for the user, the user might still be using Internet Explorer 6.0"
Is this a joke?

See above; the link should be displayed.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 16:32
by rubenwardy
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.


I don't really give a s*** about JavaScript being enabled.

Adding this will make the game more user friendly. And it could do with some more user friendliness.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 18:36
by twoelk
safest and most bloated way may be to add a little html-parser / tiny-browser thingy to Minetest. This could also be used to show help pages or add an easily extendable manual. Might enlarge download size by a large margin though.

Now where was that cross platform browser of old? ... HotJava? .... Javagator? ... Javazilla?

/me runs and hides

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 18:40
by CraigyDavi
I like this idea, it would be very useful for the game.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 18:43
by twoelk
maybe the luakit project has something that might be used?

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 18:47
by Calinou
I agree, but show the URL first and ask for a confirmation. The URL would then open in the default browser.

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 21:57
by kaeza
sfan5 wrote:How do you open a web browser from C++? (cross-platform & reliable)

https://github.com/aseprite/aseprite/bl ... er.cpp#L69
Of course, sanitize the URL first :P

Re: Homepage visit button for public server list

PostPosted: Mon May 05, 2014 23:21
by LazyJ
I think the idea of showing a Minetest server's homepage is a good one. It would help better promote Minetest as a whole to the newcomers, it would provide more information about a particular server to those who are curious and want to know more before joining, and it would make it easier for players who frequent several servers to keep up with events, issues, and updates of that server (provided the homepage is maintained).

The concerns about java... why not use the "Lynx" web browser? However, from the perspective of user-friendliness, Lynx is a very poor choice.

But then I remembered what the Lynx web browser's interface looks like and the idea of a formspec menu came to mind. Something like kaeza's Wiki mod.

So here's an idea. Add a login menu button that will display a plain-text (*.txt) file from the server. This plain-text file in a formspec would allow room for more information to be written and viewed (scrollbars are nice), detailing the "must know" stuff like the server's rules and code of conduct, locations of interest on the server, links (that the user would have to copy/paste or manually transcribe) to the server's Minetest.net forum threads, web pages, wiki's, etc.

This idea is not as convenient as clicking on a hyper-link and having a web browser pop-up but it would accomplish a good-sized portion of the purpose of going to a Minetest server's website all the while being a compromise between security concerns and user convenience.

Re: Homepage visit button for public server list

PostPosted: Tue May 06, 2014 03:35
by BrandonReese
LazyJ wrote:So here's an idea. Add a login menu button that will display a plain-text (*.txt) file from the server. This plain-text file in a formspec would allow room for more information to be written and viewed (scrollbars are nice), detailing the "must know" stuff like the server's rules and code of conduct, locations of interest on the server, links (that the user would have to copy/paste or manually transcribe) to the server's Minetest.net forum threads, web pages, wiki's, etc.

This idea is not as convenient as clicking on a hyper-link and having a web browser pop-up but it would accomplish a good-sized portion of the purpose of going to a Minetest server's website all the while being a compromise between security concerns and user convenience.


https://github.com/bremaweb/news

Re: Homepage visit button for public server list

PostPosted: Tue May 06, 2014 04:18
by LazyJ
Thanks, Brandon ;)

I'll check the "News" mod out. Simple + usefull = good

Re: Homepage visit button for public server list

PostPosted: Tue May 06, 2014 09:30
by mauvebic
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

I even heard that some people stopped using dot-matrix printers. Insane huh?

Re: Homepage visit button for public server list

PostPosted: Sat May 24, 2014 16:00
by Krock
Is this idea already R.I.P or is someone going to write the codes for it?

Re: Homepage visit button for public server list

PostPosted: Mon May 26, 2014 02:46
by cheapie
mauvebic wrote:I even heard that some people stopped using dot-matrix printers.

Not me!



LazyJ wrote:So here's an idea. Add a login menu button that will display a plain-text (*.txt) file from the server. This plain-text file in a formspec would allow room for more information to be written and viewed (scrollbars are nice), detailing the "must know" stuff like the server's rules and code of conduct, locations of interest on the server, links (that the user would have to copy/paste or manually transcribe) to the server's Minetest.net forum threads, web pages, wiki's, etc.


I think I like this idea best.

Re: Homepage visit button for public server list

PostPosted: Sun Jun 01, 2014 13:30
by celeron55
This is easy to do in a way that works in Windows and Linux.

I'm not sure about the security issues, because, I mean, people click links all the time everywhere and links aren't disallowed on this forum either.

Do modern BSDs support xdg-open?

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
#include "os.h"
#include <stdio.h>

#ifdef WIN32
#include <windows.h>
void os_launch_browser(const char *url)
{
    fprintf(stderr, "INFO: Launching browser to open \"%s\"\n", url);
    ShellExecute(0, "open", url, 0, 0, SW_SHOWDEFAULT);
}
#else
#include <unistd.h>
void os_launch_browser(const char *url)
{
    fprintf(stderr, "INFO: Launching browser to open \"%s\"\n", url);
    char prog[] = "/usr/bin/xdg-open";
    char url2[1000];
    snprintf(url2, 1000, "%s", url);
    char *argv[3];
    argv[0] = prog;
    argv[1] = url2;
    argv[2] = NULL;

    pid_t pid = fork();
    if(pid == 0){
        execvp(prog, argv);
        _exit(1);
    }
}
#endif


(Code taken from the codebase of http://8dromeda.net/ternadim.html)

Re: Homepage visit button for public server list

PostPosted: Sun Jun 01, 2014 14:07
by Jordach
PilzAdam wrote:
Krock wrote:
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

Are clickable links in OpenOffice a security risk?

AFAIK the link is displayed and you need to Ctrl + click.

sfan5 wrote:
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.

"No program should be allowed to open a web browser for the user, the user might still be using Internet Explorer 6.0"
Is this a joke?

See above; the link should be displayed.

Minecraft already shows the link and prompts on opening said link, so that's a no brainer, it also allows disabling the option to open links as well as opening in default browser and always open links on click (ignores the prompt, can be set to do nothing on link click), which could possibly implemented easily and safely.

Re: Homepage visit button for public server list

PostPosted: Mon Jul 07, 2014 08:22
by prestidigitator
Jordach wrote:Minecraft already shows the link and prompts on opening said link, so that's a no brainer, it also allows disabling the option to open links as well as opening in default browser and always open links on click (ignores the prompt, can be set to do nothing on link click), which could possibly implemented easily and safely.

The no-brainer is that Minecraft uses Java. Though it took a while for desktop integration to get to the API, once it did the portability of the platform made it possible to open a browser from an application on any OS and graphical desktop.

But I have a simpler solution than worrying about browsers, and it takes care of more than being able to visit a URL. Fix the clipboard itegration. Then URLs can be displayed and copied to the browser, even if it doesn't quite give the ease of single-click navigation. They could also be copied from the browser to chat, and to formspecs. Also, allow text to be selected in the console (F10). That way text could be copied OUT of chat, too. Not to mention that it would help here with debugging.

Re: Homepage visit button for public server list

PostPosted: Fri Jul 11, 2014 00:40
by Wuzzy
I am for this suggestion as long as the full URL is made visible. I won’t click the button if I don’t know where it is leading to; it would make the button useless to me.
Even if I can assume my browser is secure (Haha!) some troll server could link you to some pedobears which might get you in trouble in countries where data retention is common and the sole possession of pedobears is a crime.

Re: Homepage visit button for public server list

PostPosted: Fri Jul 11, 2014 08:28
by Krock
There's are tooltips which could show up the URL. [revision needed]

Re: Homepage visit button for public server list

PostPosted: Mon Jul 21, 2014 14:04
by Pitriss
prestidigitator wrote:But I have a simpler solution than worrying about browsers, and it takes care of more than being able to visit a URL. Fix the clipboard itegration. Then URLs can be displayed and copied to the browser, even if it doesn't quite give the ease of single-click navigation. They could also be copied from the browser to chat, and to formspecs. Also, allow text to be selected in the console (F10). That way text could be copied OUT of chat, too. Not to mention that it would help here with debugging.


+1