Page 1 of 1

Manaweb

Posted: 16 Feb 2011, 21:32
by Mpa4Hu
hello, I have some questions regarding manaweb

I'm running php 5.4.2 and mysql 5.0

when I run manaweb it gives me an error

Code: Select all

Fatal error: Call to undefined function _() in L:\home\mana.ge\www\system\application\views\layout\header.php on line 49
in views\layout\header.php I deleted some "_"s

Code: Select all

 $nb->addNavigationItem( new NavigationItem('navigation.mana.main.itemslist',
            [color=#FF0000]_[/color]("Itemslist"), site_url('itemslist') ) );
        $nb->addNavigationItem( new NavigationItem('navigation.mana.main.serverstats',
           [color=#FF0000] _[/color]("Statistics"), site_url('statistics') ) );
so, i'm interesting, are thous necessary ? )))
_____

than in statistics it gives me an error

Code: Select all

[color=#FF0000]A Database Error Occurred[/color]
Error Number: 1054

Unknown column 'money' in 'field list'

SELECT SUM(`money`) AS money FROM (`mana_characters`)
after research i found that money field was deleted after updates but in server_statistics.php is this code

Code: Select all

 private function getPurchasingPower()
    {
        $this->db->select_sum('money');
        $query = $this->db->get(Character::CHARACTER_TBL);
        return $query->row()->money;
    }
what to do, delete function from php or make field in db?
-------

and last, what about to make info page
for example
twm.org/index.php?username=Mpa4Hu

and than full info appears

I can make it if you will implement it in source, but it will take a time, because of the study

sry really bad english >_>

Re: Manaweb

Posted: 17 Feb 2011, 15:56
by Bertram
HI MP4Hu,

thanks for you interest in manaweb. I was hoping that some development would start again sooner or later, but having someone fixing small glitches there would be definitely fine.

1.

Code: Select all

Fatal error: Call to undefined function _() in L:\home\mana.ge\www\system\application\views\layout\header.php on line 49
--> Just to understand correctly, isn't this a function linked to gettext or similar (used to translate?)?

2.
after research i found that money field was deleted after updates but in server_statistics.php is this code
Code:

Code: Select all

private function getPurchasingPower()
    {
        $this->db->select_sum('money');
        $query = $this->db->get(Character::CHARACTER_TBL);
        return $query->row()->money;
    }

what to do, delete function from php or make field in db?
The best thing to do about it, would be to fix it.
First thing to note is that the basic money handling is now done through attributes now.
(This is permit potential other kind of currencies or stackable values in other servers, or even our.)
The attribute id for money is defined here (and named ATTR_GP):
http://gitorious.org/mana/manaserv/blob ... .h#line162
(We're using the base attribute to get the GP value, not the modified one.)

By using somethign similar to that:
http://gitorious.org/mana/manaserv/blob ... p#line1172

You could get the base value of this attribute, hence fixing the money handling in manaweb.

3.

About the info page, of course, any proposal of improvment is welcome, but first of all, you should get familiar with the specifications:

The character's attributes are dynamic and specified in this file:
http://gitorious.org/mana/manaserv/blob ... ibutes.xml
Specs: http://doc.manasource.org/attributes.xml
Note that, just like the ATTR_GP attribute, some of them are "hardcoded" as for their specific use,
but we may expand with new attributes later.

The equipment slots are also dynamic and loaded using this file:
http://gitorious.org/mana/manaserv/blob ... /equip.xml
WIP specs: http://doc.manasource.org/equip.xml

Good luck and best regards.

Re: Manaweb

Posted: 17 Feb 2011, 17:32
by Mpa4Hu
HI Mpa4Hu )))
1.

Code: Select all

Fatal error: Call to undefined function _() in L:\home\mana.ge\www\system\application\views\layout\header.php on line 49
--> Just to understand correctly, isn't this a function linked to gettext or similar (used to translate?)?
yes yes yes, lately i found that i had disabled gettext
gettext have some problems with php 5
2.
after research i found that money field was deleted after updates but in server_statistics.php is this code
Code:

Code: Select all

private function getPurchasingPower()
    {
        $this->db->select_sum('money');
        $query = $this->db->get(Character::CHARACTER_TBL);
        return $query->row()->money;
    }

what to do, delete function from php or make field in db?
The best thing to do about it, would be to fix it.
First thing to note is that the basic money handling is now done through attributes now.
(This is permit potential other kind of currencies or stackable values in other servers, or even our.)
The attribute id for money is defined here (and named ATTR_GP):
http://gitorious.org/mana/manaserv/blob ... .h#line162
(We're using the base attribute to get the GP value, not the modified one.)

By using somethign similar to that:
http://gitorious.org/mana/manaserv/blob ... p#line1172

You could get the base value of this attribute, hence fixing the money handling in manaweb.
sounds like music
I try to fix and report if magic happans
3.

About the info page, of course, any proposal of improvment is welcome, but first of all, you should get familiar with the specifications:

The character's attributes are dynamic and specified in this file:
http://gitorious.org/mana/manaserv/blob ... ibutes.xml
Specs: http://doc.manasource.org/attributes.xml
Note that, just like the ATTR_GP attribute, some of them are "hardcoded" as for their specific use,
but we may expand with new attributes later.

The equipment slots are also dynamic and loaded using this file:
http://gitorious.org/mana/manaserv/blob ... /equip.xml
WIP specs: http://doc.manasource.org/equip.xml

Good luck and best regards.
I need time but i'm sure i can do this (i have done something like this long time ago, far far away)

Re: Manaweb

Posted: 17 Feb 2011, 20:28
by Bertram
Hi Mpa4Hu, ;)
sounds like music
I try to fix and report if magic happans
:arrow: I'm glad you like that kind of music :)
I need time but i'm sure i can do this (i have done something like this long time ago, far far away)
:arrow: Where there is a will, there is a way!

Best regards.

Re: Manaweb

Posted: 18 Feb 2011, 20:51
by Mpa4Hu
hello again ^_^

so... i'v done most work.
seems like someone before me was working on this idea, so i just finished his work.
... i mean, i havn't finished but i finish them soon

hm... i really need english skills

so, i have a question. i'm new in tmw source so tall me please whats the difference between attr_base and attr_mod in mana_char_attr table

at now, i'v inserted attr_base

and at last, how you guys manage, what did you change, what lines deleted, what lines added and etc.
like this
http://gitorious.org/mana/mana/commit/8 ... 05c6d375b0
beacouse i'v changed some files, i fixed some bugs, i added some files, parser, and... i don't really remember what XD
so there is 2 ways

1) you tall me how to manage changes, and i can do everything ones again, so i right down everything i have changed
(it's not hard since i'v done it once)
2) i just give you files that i'm sure i have changed and will work ^_^

Re: Manaweb

Posted: 18 Feb 2011, 22:44
by Crush
Mpa4Hu wrote:so, i have a question. i'm new in tmw source so tall me please whats the difference between attr_base and attr_mod in mana_char_attr table
The base attributes are the attributes how the player assigned the status points.
The modified attributes are the effective values with bonus and malus from equipment and other effects.
and at last, how you guys manage, what did you change, what lines deleted, what lines added and etc.
like this
http://gitorious.org/mana/mana/commit/8 ... 05c6d375b0
beacouse i'v changed some files, i fixed some bugs, i added some files, parser, and... i don't really remember what XD
We are using the version control system GIT. It is a command line based utility which allows you to view which files changed (git status) and what you've changed in them (git diff). It also allows you to create fixed points (git commit) and go back to them (git reset, git checkout). They are like safegames in a video game. And you can send those commits to other people (git push, git format-patch). The people can then merge your changes with theirs (git pull, git am). You can view a history of who contributed commits to the project (git log) and which files were changed by them (git whatchanged). And that's just a small overview of the features of Git.

Unfortunately it is a bit hard to learn, especially when you are not used to working with command-line based tools. But it is very well documented on the web. When you google a bit you will find a lot of good tutorials. We also have some linked on the wiki: http://wiki.themanaworld.org/index.php/Git

Re: Manaweb

Posted: 19 Feb 2011, 12:34
by Mpa4Hu
thx Crush and sorry for such disturbing, but i want to learn )

i have this commit file for example

Code: Select all

commit 998c525e4b190b35e6b97368f2c17d8baf525f9a
Author: Mpa4Hu <ymen9@pisem.net>
Date:   Sat Feb 19 17:25:22 2011 +0500

    testing commit ^_^ small bug
    
    i'v changed header.php, it sad to redirect /'admin/ and must be /admin/

diff --git a/system/application/views/layout/header.php b/system/application/views/layout/header.php
index afb478b..27d0f4d 100644
--- a/system/application/views/layout/header.php
+++ b/system/application/views/layout/header.php
@@ -92,7 +92,7 @@ echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\" ?>"; ?>
             $nb->addNavigationItem( new NavigationItem('navigation.mana.administration.index',
                 _("Admin Interface"),  site_url("admin" )) );
             $nb->addNavigationItem( new NavigationItem('navigation.mana.administration.maintenance',
-                _("Maintenance"),  site_url("'admin/maintenance" )) );
+                _("Maintenance"),  site_url("admin/maintenance" )) );
             $navigation->addNavbox($nb, 90);
         }
 
( i just can't upload it there, so i posted content)


what to do next, where upload this file
git push do not works

Code: Select all

fatal: protocol error: expected sha/ref, got '☻
----------------------------------------------
The git:// protocol is read-only.

Please use the push url as listed on the repository page.
----------------------------------------------'

Re: Manaweb

Posted: 19 Feb 2011, 12:58
by Crush
Mpa4Hu wrote: what to do next, where upload this file
git push do not works
Git push doesn't work because you need to be authorized to push to our central repository. You surely can understand that we don't want any stranger to push unreviewed changes to our sourcecode.

Our usual workflow when dealing with Manasource sourcecode changes is:
1. create a bugtracker ticket on http://bugs.manasource.org
2. attach the patch to the ticket
3. some other developers reviews the patch and gives his/her OK (we have an internal rule that every non-trivial patch needs to be reviewed by at least one other established developer)
4. The creator of the patch pushes it or when he hasn't push rights asks the reviewer to do this.

The steps 1, 2 and 3 can be omitted for trivial changes. Your change is such a trivial change, because it is a 1-line fix of an obvious bug noone can possibly disagree with.

I could push your commit, but I don't feel comfortable with doing this because I've never worked with the Manaweb repository before and while I know some PHP I wouldn't call myself a guru. So I can not be 100% sure that this ' isn't supposed to serve some purpose we are both not aware of. I would really prefer when someone would do this who knows what he is doing. You can surely find such a person on our IRC channel #manasource on irc.freenode.net.

Re: Manaweb

Posted: 19 Feb 2011, 13:32
by Mpa4Hu
ok thx
so i just reported on manasources
http://bugs.manasource.org/view.php?id=298
later i will add equip.xml parser so it can show character equipments

Re: Manaweb

Posted: 21 Feb 2011, 17:04
by Bertram
Hi,

Thanks for the work done!

Best regards.