PlaneShift
Development => PlaneShift Mods => Topic started by: derula on February 24, 2010, 10:25:52 am
-
Unfortunately, with PS Legacy taken offline today (2023/5/1), this script is currently broken.
Inspired by and blatantly stealing the idea of this (http://www.hydlaaplaza.com/smf/index.php?topic=36145.0), I made a little script that checks character statuses.
It will only query the Laanx server every 10 minutes at most and save the result for later. It's open for everyone to use it.
Click here for details. (http://psstatus.uglyhorst.de/)
Here's a simple usage example:
http://psstatus.uglyhorst.de/Idiotbrain.png
=> (http://psstatus.uglyhorst.de/Idiotbrain.png)
You can also make it create a complete list of characters, via comma separation:
http://psstatus.uglyhorst.de/Idiotbrain,Randomdude,Slaughterking.png
=> (http://psstatus.uglyhorst.de/Idiotbrain,Randomdude,Slaughterking.png)
For an advanced usage example, see my sig (yes, that would be see psstatus.uglyhorst.de/Jamona.png).
If you have any improvement suggestions, or want to "register" for advanced usage, tell me :)
-
I think thats pretty cool :)
-
I think thats pretty cool :)
Thanks :) I hope it will be useful for someone.
Also, if someone wants to profit from the status page parsing the script does, this link (http://psstatus.uglyhorst.de/chars_array.txt) will give you a serialized PHP array with online characters (with the same 10 minute precision). This way, you can just write
$chars = unserialize(file_get_contents('http://psstatus.uglyhorst.de/chars_array.txt'));
in PHP and have an array of chars currently online. (Except if the server has been unreachable on last check, then $chars will be false.)
Alternately, you can refer to this plain text list (http://psstatus.uglyhorst.de/chars_list.txt).
Both are sorted alphabetically (well at the moment they aren't, but will be in less than 10 minutes xD Edit: yup, now they are).
Enjoy :)
-
Fixed for Skylab. Not that anyone apart from me ever used it, but what the hell.
Also, it will stay online at the same address - and the "advanced usage" offer will stay open for anyone.
And also, as the new server is in Europe, it will reload the names list faster when it does so.
-
Well, still - thank you. Well possible that one could base an "offline buddy list" on it. Some day...
-
Ahm..offline buddy list as in being able to have a buddy list even while not being logged in? (http://www.hydlaaplaza.com/smf/index.php?topic=36145.0)
-
This question might seem stupid, but I want to clarify: Do we just put that link straight into our sig or whatever, or do we have to do something with it first?
-
(http://psstatus.uglyhorst.de/Dracaeon.png)
-
This question might seem stupid, but I want to clarify: Do we just put that link straight into our sig or whatever, or do we have to do something with it first?
You should put something like this in your sig:
[img]http://psstatus.uglyhorst.de/Dracaeon.png[/img]
-
Baja likes it.
Thanks a lot derula :)
oh, I've added a link to your page, hope it's ok
-
Wonderful! \\o//
-
Boeven bows to Derula with respect :thumbup:
-
Nice idea with the link, thanks Bajazag :)
And thanks Illysia and BoevenF :) I hope you'll enjoy using it.
-
I really like the idea of this.
Would it be possible for you to change the white background to a transparent one?
EDIT
(removed sample image)
Thanks, Derula
May the light guide you.
-
Would it be possible for you to change the white background to a transparent one?
Sure. Actually, I just re-enabled a commented-out line that did exactly this.
(I disabled that because I thought the colors might be badly readable, but I never bothered to test it. And then I only used mine as a large image instead of the text version and no one else used it so I didn't care. But I agree, now that some use it, the white background looks rather ugly. And I think the text color is readable pretty well.)
Edit: Also, I've added a new feature. You can have all your characters listed at once now (result see my sig), e.g.:
[img]http://psstatus.uglyhorst.de/Ash, Peter; Pikachu| freedommaster,MaStErFiGhTeR.png[/img]
will result in:
(http://psstatus.uglyhorst.de/Ash, Peter; Pikachu| freedommaster,MaStErFiGhTeR.png)
(Just to demonstrate improved error tolerance too.)
(Obviously, "advanced usage" will only work if just a single character is specified)
-
Updated script to use new server.
Edit: Fixed bug in PHP example on the website ^^'
Edit2: I have added a more complex example.
-
Just added another feature to the script.
You can now use an URL like,
http://psstatus.uglyhorst.de/MyForumName:These,Are,My,Characters.png
and it will show only "MyForumName is currently online." if one of your characters is, or "~ offline" if all are offline.
For example,
http://psstatus.uglyhorst.de/derula:Jamona,Togh,Aburan,Jana.png
will only show my nickname, displaying it as online, if either of the specified characters is logged in, or offline otherwise:
(http://psstatus.uglyhorst.de/derula:Jamona,Togh,Aburan,Jana.png)
If you only specify an alias and a single character name, it works as well.
I also fixed a few bugs that would occur when the script fails to determine the online status of people.
(Btw., my offer to replace anyone's text online description with an image is still there, and extended to multiple characters. That was also the point of this update)
-
:thumbup:
-
Regarding your example: I suppose it is recommendable to omit any spaces?
-
Regarding your example: I suppose it is recommendable to omit any spaces?
Depends on your software I guess. Works with spaces for me; the code for the example contained spaces, I guess SMF auto-escapes them. Firefox also auto-escapes spaces.
Main reason for me to use spaces was to make it more readable. So yeah, if unsure, remove the spaces.
Edit: Just saw that apparently SMF doesn't auto-escape them. Works for me nonetheless, but I guess you're right. *edits post*
-
The script had a small outage today and maybe parts of yesterday because I was changing hosts. It's fixed now... hopefully. It should work correctly again in about 10 minutes. Please tell me if there's still problems after that!
-
Thanks Derula, it's ok so far :P
-
Update: 'cause my webhost apparently decided to block outgoing UDP traffic now without informing me, my status script stopped working like a month ago (possibly longer). I disabled the enhanced server check features now (nobody was using them anyway) and the script should work again.
Sorry for the inconvenience. Feel free to contact me if things break again.
-
Update: A little over a week ago, my webspace went through a migration, and the status script broke as a consequence. I didn't have much time to deal with it, but it is fixed now.
-
Thank you for your efforts, now and in the past.
-
Thank you derula. \\o//
-
You're welcome :)
-
Added an improved JSON API, adopting a proposal by Neeno. Added short descriptions for the functions I've implemented to far, see the new section "Advanced JSON API" at http://stuff.incertitu.de/planeshift/status%20script (http://stuff.incertitu.de/planeshift/status%20script). New functions can be implemented easily, so if someone has a suggestion, just say a word, and maybe I'll do that!
-
Hi Derula o/. If you happen to see this, the status script says it can't connect to the database now.
-
Illy o/
That's strange... well, there was a server migration a few weeks ago, but it worked fine after that... I'll have a look, thanks for letting me know.
Edit: I see the problem. There's actually two different versions live right now... one works and one doesn't. I wanted to make the old version redirect to the new version at some point, but never got around to doing it.
This is broken:
http://psstatus.uglyhorst.de/Illysia:Illysia,Danao,Zandral.png
(http://psstatus.uglyhorst.de/Illysia:Illysia,Danao,Zandral.png)
This works:
http://ps.incertitu.de/Illysia:Illysia,Danao,Zandral.png
(http://ps.incertitu.de/Illysia:Illysia,Danao,Zandral.png)
I'll fix the old version when I get around to it... maybe today / tomorrow, or on Monday... in the meantime, you can use the new link.
Sorry for the inconvenience - I checked the new link after the server change but didn't think the old one could be broken if the new one isn't.
Edit 2: Fixed already :P that was faster than I thought it would be.
-
Haha, thank you Derula. <3
-
Any time! ...except if I'm busy or don't feel like it or have finally moved on to serious life :P
-
(For people new to this topic, this is about these images you can put in your forum signature: (https://ps.incertitu.de/Example.png))
This thing has had a good run over the past decade.
Many things have happened in the meantime, such as the European GDPR regulation and a new Unreal Engine based client.
Currently, I'm in the process of moving all my websites to a new server.
I have two questions to this community regarding my PS status script:- Does it make sense to keep it around?
- If yes, do I need to change anything to make it work with PSUnreal?
Currently, the way it works is by loading this page (https://planeshift.teamix.org/index.php?page=char_stats) every minute.
If PSU runs on a different server, I would have to make some changes.
If it doesn't provide this page at all, it would be more complicated to adjust my script.
I tried to figure it out myself, but couldn't find anything definitive.
So any feedback or information would be appreciated.
-
Thanks for your PS status script. Currently user facing web stuff for PSUnreal is not yet deployed as the PSUnreal server currently has no domain name and the apps have not been adapted to the newer PHP version on the PSUnreal server. Also its IP address will change when the legacy Crystal Space PlaneShift server is decommissioned.
I suggest you wait for the decommissioning of the old server and till the PSUnreal server will get a domain name. Also the PHP apps need to be adapted to the newer PHP version on the PSUnreal server. So I suggest you have a little more patience. I bet there will be some char statistics page for PSUnreal as well, but that of course is up to Talad. Whether it looks the same or different is also up to him.
So I suggest you give it a bit more time. I think it will be easy enough to become aware when a char stats page for PSUnreal becomes available :)
-
Thanks @Damola for the details, actually I think that works out pretty well because I would have to get my thing to work with a newer PHP version as well. I guess I will let the current version run for PS legacy for now while that server is alive, and then move it to my new webhost and make adjustments for PSUnreal when the web frontend becomes available.
I just might need a little push when that happens because I'm not actively following PS development and stuff :)
-
Well, not sure I remember to post when PSUnreal char online status page is available. Well one of us or someone else will remember, so that will be fine.