EOSERV Forum > Seose > character/staff lists in your website [release]
Topic is locked.
Page: << 1 >>
character/staff lists in your website [release]
Author Message
Post #32454 character/staff lists in your website [release]

If you have ever wanted to view some simple data about your characters / staff members on your web server, look no further. Here is my source code for some functions that parse the data from the xini documents. It is in no way a substitute for webcp, but i think it serves as a good base for theway which you can read data from an xini file with php (assuming you have a basic knowledge of programming syntax). The characters and staff members are mutually exclusive, they will not show up in each others comprehensive lists.


Working Example: [I need a web server :-\]

The example uses old seose data from when i ran seose (now using eoserv).
Just a couple installation notes:
  1. You need to scroll down to line 137 of parse.php and change the directory to wherever your seose root folder is. You NEED the // at the end of the file name, like it is now, because the first '/' is used as an escape character.
  2. You need to set up an appropriate directory structure. First, make sure it is the seose default "[seoseroot]/Users/Characters" for your characters folder. Then, in the "[seoseroot]/Users/" folder make two new folders named 'staff' and 'Charmod' respectively. 
  3. Set folder permissions for your users folder to allow FULL CONTROL to all users. PHP needs write access.
I include a styles.css template that uses a basic color scheme but doesn't really do anything interesting with the tables displayed. You should probably modify this and make it look prettier because right now it doesn't look all that great. Also, the pages are a frameset, and you need to linkto the xini.html file in order for it to work correctly. See example above.

I think thats just about everything...Feel free to edit it / add to it, just be sure to give me (Ethan Moffat) credit in some way (even if you just comment the script).
---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
15 years, 11 weeks ago
Post #32456 Re: character/staff lists in your website [release]

wow, impressive! I'm going to download this for sure ^.^ Thank You for releasing ;D

15 years, 11 weeks ago
Post #32457 Re: character/staff lists in your website [release]

Yes php does need full access.


---
Web developer, currently looking for graphic artists / designers.
15 years, 11 weeks ago
Post #32458 Re: character/staff lists in your website [release]

This is nice for Seose users. However, I have a concern. Does this get the information everytime its loaded? If so, this is a potential issue. I suggest you cache it and only reload the information every 5? minutes or so. 

15 years, 11 weeks ago
Post #32463 Re: character/staff lists in your website [release]

it loads the data from the xini files in the Characters directory each time the page is loaded via the link in the top frame. i never really thought of caching the data, thanks for the suggestion :D

edit: i updated the rar file hosted on my site, the script now caches the data into two files that expire after 5 minutes. it should create two text files, staffcache.txt and charcache.txt, that store staff data and character data respectively. i'm not sure if this is what you meant but i think it will improve performance as it reads one file instead of every single character file every time.

---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
15 years, 11 weeks ago
Post #32478 Re: character/staff lists in your website [release]

wow this gonna be fun :) so my server will have a player rank now

15 years, 11 weeks ago
Post #32484 Re: character/staff lists in your website [release]

Just thought I'll let you know, that it shows incorrect data for player levels.

This is really nice of you to release this script, but it is pretty damn hard to customize the look of it. Took me quite long to implement it into my website's layout. I ended up having  to re-write most of it, some of it I ripped out as it wasn't nessecary in the final layout. Postedcredits in my recent news pages, and will also include in the website credits, but that's another time..

---
Web developer, currently looking for graphic artists / designers.
15 years, 11 weeks ago
Post #32486 Re: character/staff lists in your website [release]

ok i apologize for that level error. i completely forgot about how i did the calculating levels thing when i posted this. Seose doesn't store the characters actual level in the xini file, so i worked around that by dividing the amount of skill points (for spells) by the amount of skill points per level that the server is configured to use, which in my case, was 10. so if you want to fix that, go to lines 63 and 142 (assuming its unedited) and you should see a value divided by 10, change that 10 to whatever your skill points per level is. You need to change both of those because it uses two separate functions.

i probably should have made a config.php file for this...oh well. sorry about that. 

---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
15 years, 11 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Seose > character/staff lists in your website [release]