Some Doubts about openogame
ok, so im new,
i have a working Version, and it is very good.
Where can i add the Dark MAtter thing?
Is there a script for that?, or i have to put it in the DB, by hand? what is the field in the DB?
How do i get the statistics, to update automatic? how do i program the cron for this?
Thanks
Re: Some Doubts about openogame
Quote:
Originally Posted by
chicosoft
the DB, by hand? what is the field in the DB?
How do i get the statistics, to update automatic? how do i program the cron for this?
Thanks
1) Go to; %dir%/templates/OpenGame/ and open left_menu.tpl with notepad++ (i strongly dont recommend notepad (1), cus i edited with it and then page was white, then i tried notepad++ and all works) and search for "Ranking" link. After a href=" modify adress to "admin/statbuilder.php"
Exemple:
Code:
<th><a href="admin/statbuilder.php" accesskey="k" target="{mf}">Ranking</a></th>
2) go to %dir%/admin/ and open statbuilder.php
at start of file (before <?php) add this:
Code:
<html>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://LINK_TO_WEB/stat.php?range={user_rank}">
</html>
Exemple:
[code]
Code:
<html>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://vgame.oo.lv/server1/stat.php?range={user_rank}">
</html>
3) In statbuilder.php search for authlevel (after 2. step - 24line for me) and change 1/2/3 to 0 (maybe 0 is default...)
I dont know another way, but this is one and only idea what i got
Of couse you can copy all what is in statbuilder.php, but its really hard...
ps. Sry for my bad english :huh:
Re: Some Doubts about openogame
I manage to put automatic statistics in Open Ogame :D
What did i do...
I use linux, for hosting my ogame site so i used the cron for schedule the statistics...
What did i do?
1 - i installed the links(text based Internet browser)
2 - i modify the statbuilder.php file, so anyone can update the statistics.
3 - I created a script called statistics.sh with this code:
Code:
#/bin/bash
echo -----------------------------------------------------
links2 -dump http://mysite/openogame/admin/statbuilder.php
date
echo -----------------------------------------------------
4 - i added this line to crontab(here it updates statistics every 5 minutes) :
Code:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/chico/statistics.sh >> /var/log/ogame.log
What does the statistics script do?
It updates the statistics, and prints the date. so when the cron runs, it sends the output with a date to the log file.
It is pretty stupid i know, but it is a simple way to do the job and log it, and it can do ever 12 Hours or anytime i schedule it to run... :w00t:
Re: Some Doubts about openogame
another thing, who do i know what version do i use?
how can i upgrade that? i think it has the SQL injection problem in the options tpl...
but i do not know what version do i use...
Re: Some Doubts about openogame
woah, that seemed very interesting, a linus auto updater... care to release the code here?
:P lol and about your files, just download rov11 and rip everything you want, nothing is locked or encrypted, open, modify and take anything you want :D thats the nice thing about my files.
Re: Some Doubts about openogame
but i like the version i have, it says Xnova, 0.8...
is it bad?? lol
The code, for autoupdade the statistics, is here... i posted above...