PlaneShift

Development => PlaneShift Mods => Topic started by: derula on February 24, 2010, 10:25:52 am

Title: PS status script [LEGACY]
Post 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:
Code: [Select]
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:
Code: [Select]
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 :)
Title: Re: PS status script
Post by: Rigwyn on February 24, 2010, 10:44:05 am

I think thats pretty cool :)


Title: Re: PS status script
Post by: derula on February 24, 2010, 12:45:32 pm
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
Code: [Select]
$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 :)
Title: Re: PS status script
Post by: derula on May 01, 2010, 07:19:07 am
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.
Title: Re: PS status script
Post by: LigH on May 01, 2010, 02:59:27 pm
Well, still - thank you. Well possible that one could base an "offline buddy list" on it. Some day...
Title: Re: PS status script
Post by: Aiwendil on May 01, 2010, 03:41:53 pm
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)
Title: Re: PS status script
Post by: Dracaeon on May 05, 2010, 03:32:45 pm
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?
Title: Re: PS status script
Post by: weltall on May 05, 2010, 09:44:15 pm
(http://psstatus.uglyhorst.de/Dracaeon.png)
Title: Re: PS status script
Post by: derula on May 06, 2010, 12:43:40 pm
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:
Code: [Select]
[img]http://psstatus.uglyhorst.de/Dracaeon.png[/img]
Title: Re: PS status script
Post by: Bajazag on May 06, 2010, 02:09:30 pm
Baja likes it.
Thanks a lot derula  :)

oh, I've added a link to your page, hope it's ok
Title: Re: PS status script
Post by: Illysia on May 06, 2010, 02:31:03 pm
Wonderful!  \\o//
Title: Re: PS status script
Post by: BoevenF on May 07, 2010, 09:03:38 am
Boeven bows to Derula with respect  :thumbup:
Title: Re: PS status script
Post by: derula on May 07, 2010, 05:13:54 pm
Nice idea with the link, thanks Bajazag :)

And thanks Illysia and BoevenF :) I hope you'll enjoy using it.
Title: Re: PS status script
Post by: Bonifarzia on May 23, 2010, 05:09:14 am
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.
Title: Re: PS status script
Post by: derula on May 24, 2010, 03:50:11 pm
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.:
Code: [Select]
[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)
Title: Re: PS status script
Post by: derula on July 17, 2010, 12:51:22 pm
Updated script to use new server.

Edit: Fixed bug in PHP example on the website ^^'

Edit2: I have added a more complex example.
Title: Re: PS status script
Post by: derula on June 13, 2011, 01:16:03 pm
Just added another feature to the script.

You can now use an URL like,

Code: [Select]
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,

Code: [Select]
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)
Title: Re: PS status script
Post by: BoevenF on June 13, 2011, 04:52:45 pm
 :thumbup:
Title: Re: PS status script
Post by: LigH on June 14, 2011, 02:03:06 am
Regarding your example: I suppose it is recommendable to omit any spaces?
Title: Re: PS status script
Post by: derula on June 15, 2011, 02:29:35 pm
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*
Title: Re: PS status script
Post by: derula on November 22, 2011, 01:52:21 pm
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!
Title: Re: PS status script
Post by: BoevenF on November 22, 2011, 06:41:18 pm
Thanks Derula, it's ok so far :P
Title: Re: PS status script
Post by: derula on December 08, 2013, 10:59:38 am
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.
Title: Re: PS status script
Post by: derula on November 02, 2014, 10:36:29 am
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.
Title: Re: PS status script
Post by: bilbous on November 02, 2014, 11:44:19 am
Thank you for your efforts, now and in the past.
Title: Re: PS status script
Post by: Illysia on November 02, 2014, 03:25:38 pm
Thank you derula. \\o//
Title: Re: PS status script
Post by: derula on November 26, 2014, 03:57:39 pm
You're welcome :)
Title: Re: PS status script
Post by: derula on November 29, 2014, 12:41:34 pm
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!
Title: Re: PS status script
Post by: Illysia on April 15, 2017, 01:45:06 am
Hi Derula o/. If you happen to see this, the status script says it can't connect to the database now.
Title: Re: PS status script
Post by: derula on April 15, 2017, 05:34:10 pm
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:
Code: [Select]
http://psstatus.uglyhorst.de/Illysia:Illysia,Danao,Zandral.png(http://psstatus.uglyhorst.de/Illysia:Illysia,Danao,Zandral.png)

This works:
Code: [Select]
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.
Title: Re: PS status script
Post by: Illysia on April 16, 2017, 06:51:16 pm
Haha, thank you Derula. <3
Title: Re: PS status script
Post by: derula on April 17, 2017, 06:34:13 am
Any time! ...except if I'm busy or don't feel like it or have finally moved on to serious life :P
Title: Re: PS status script
Post by: derula on February 25, 2023, 11:13:09 am
(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: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.
Title: Re: PS status script
Post by: Damola on February 25, 2023, 02:26:13 pm
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  :)
Title: Re: PS status script
Post by: derula on February 25, 2023, 03:46:16 pm
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 :)
Title: Re: PS status script
Post by: Damola on March 04, 2023, 05:56:23 am
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.