If anyone has the codes for the Galaxy AJAX application, can they share them?
Galaxy AJAX
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
I managed to get it to work with the js code I added to page.galaxy.default.tpl, but I couldn't stop the page from refreshing. Can anyone help?
-
change in abstractgamepage.php
PHP Source Code
this ist the new part
your ajaxscript can now call game.php?page=galaxy&ajax=2
this prevents loading the whole site
then change at the end of showgalaxypage.class.php
it only contains the part of the new table you want to innerHTML
so alle in your tpl befor the script part -
mimikri wrote:
change in abstractgamepage.php
PHP Source Code
this ist the new part
your ajaxscript can now call game.php?page=galaxy&ajax=2
this prevents loading the whole site
then change at the end of showgalaxypage.class.php
it only contains the part of the new table you want to innerHTML
so alle in your tpl befor the script part
-
-
you might have to change the tpl files acording to your game.
made it in 2moonz ant there all images are in webp format, wich ist much smaller when otheres without loosing noticable quality.
you could paste your tpl inside the the galaxy_table_wrapper in the galaxy.default.tpl,
and also in the galaxy.ajax.tpl but there is no wrapper around it. -
Ok I can change it my friend, is there a script example on github that I can look at, or do you have one?
-
here you can see it running ingame
and here it is the github commit
since the galaxy.js was changed you have to clear the cache in the browser, reloading with ctrl + f5, should do it. -
mimikri wrote:
here you can see it running ingame
and here it is the github commit
since the galaxy.js was changed you have to clear the cache in the browser, reloading with ctrl + f5, should do it.
Player Name: mimikri
Password: 123456 -
yes first version had this issues, updated the files
in both tpl files the first form shall be without &ajax2, and in the glaxy.js ajax=2 is added to the url
then the error with white page is gone when entering numbers
don't forget to press ctrl + f5, to get the new galaxy.js in the browser. -
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0
-
Users Online 7
7 Guests
-
Similar Threads