ninuxorg / nodogsplashninux

NoDogSplash-0.9_beta9.9.6 with htdocs folder(s) from Ninux (check out the different git branches)
GNU General Public License v2.0
7 stars 3 forks source link

Links to external web pages are broken #7

Closed zioproto closed 9 years ago

zioproto commented 12 years ago

From the Ninux splash page in master branch all the links to the external web pages are broken. Instead of the external site the user is redirected again to the splash page, because the auth token has not been sumbitted yet.

This could be fixed this way:

to link the example web site http://olsr.org, you should do:

href=\"/nodogsplash_auth/?redir=http://olsr.org/&tok=$tok\"

the problem is that $tok is correctly replaced with the token in nodogsplash only in the splash.html file (read the README file) and we have HTML code included from external file, so we have to find a solution to this.

zioproto commented 12 years ago

My javascript skills are still to low for the complete solution but here: https://github.com/ninuxorg/nodogsplashninux/blob/master/htdocs/splash.html#L33

In splash.html line 33 I tried something like this:

$("#page_content").html(page_body.replace("tok","token"));

and it works,

so now is matter of saving the actual token in a Javascript var and dear with the escapes of the $ sign

zioproto commented 12 years ago

I succeeded in using the token in the external pages https://github.com/ninuxorg/nodogsplashninux/commit/abe0b383337efd6b8bd3a0eef722bf126ef589fb

now the links have to be reworked