Roster of players online

Applications/Tools written to make running DarkStar easier for the rest of us.
User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Roster of players online

Post by whasf » Fri Sep 21, 2012 9:25 am

Here is the roster that I use, graciously created by someone other than me. If they wish to be known then I'll edit this post.

With that said, if you improve on this it would be nice if you shared it (just reply and attach).

What would be nice to be able to sort by clicking on the column names.

Be sure to edit include\config.inc with your database login information so it can connect. If your DB is on a different machine than this is running on then you need to edit getPlayerData.php and change the hostname at the top of that script (you'll see it).



Thanks,
Attachments
roster.zip
Simple roster application
(3.85 KiB) Downloaded 485 times
-- Whasf

ex0r
Posts: 83
Joined: Wed Aug 29, 2012 10:08 pm

Re: Roster of players online

Post by ex0r » Fri Sep 21, 2012 3:16 pm

Took a look at the code, won't be hard to add in a sort order. Just a couple of statements to check for sort order and sort type

Borfax
Posts: 2
Joined: Tue Jul 24, 2012 1:18 am

Re: Roster of players online

Post by Borfax » Thu Sep 27, 2012 7:08 am

I have added some icons and color to the roster design. I am unsure if you would like to possibly use this style, but I was waiting for a meeting at work and I put this together. I am attaching an image for now, but I can also provide the files if needed. I added swords for regular users and a GM icon for a player with gm status. The design is based off the original script, but I just added icons and changed the color a little. Nothing more... nothing less.
roster_ui.jpg

~Borfax~

mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

Re: Roster of players online

Post by mvd1987 » Mon Nov 05, 2012 11:22 am

hey hey can somebody tell me how i can put the roster in my forum??
i have a phpbb3 forum.

dont really know how i can put it in so hope that somebody can tell me exacly how or has a guide or something like that.

greetings and thanx already
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Roster of players online

Post by whasf » Mon Nov 05, 2012 12:55 pm

It's not for a forum, it's a self-contained web page.
-- Whasf

mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

Re: Roster of players online

Post by mvd1987 » Mon Nov 05, 2012 3:15 pm

no mean how can i use it and put it on my own forum??

i have changed the settings to my datebase so thats oke now but what to do now??
how do i open it so i can watch how's online??

and so i can post it on my forum??


hope you can let me know cause this will be a good thing to have :)

nice on makeing this for us :)

greetings michael and thanx already on the help
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Roster of players online

Post by whasf » Mon Nov 05, 2012 7:30 pm

Put it in a folder in your web server so you can go to it.. Like here how it is http://www.dspt.info/roster.php
So it'd be http://<yourserverIPorHostName>/roster.php
-- Whasf

daiiawn
Posts: 20
Joined: Tue Mar 12, 2013 7:56 am

Re: Roster of players online

Post by daiiawn » Fri Mar 29, 2013 2:10 pm

Does anyone have any suggestions as to why this wont work for me (It may be something glaringly obvious like tables have changed so code wont work).

Im running an apache server, have php set up. I can access the page both locally or remotely, but it doesnt show anything other than the header (no "No users are currently logged on" or player info). My assumption other than it maybe being out of date as it was almost 5 months since the last post here, was that it wasnt connecting to the db, but I have double checked the config.inv and the settings match those of my search/lobby/map servers (apart from there being a port setting there too, but adding a port to the script doesnt help). It is also running on the same server as my DS server, so I havent needed to edit the getPlayerData.php

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Roster of players online

Post by whasf » Fri Mar 29, 2013 2:49 pm

The script doesn't need updates as the server is updated. Hmm... in your php.ini change

Code: Select all

display_errors = on
and restart apache. That should show the error you're getting.
-- Whasf

daiiawn
Posts: 20
Joined: Tue Mar 12, 2013 7:56 am

Re: Roster of players online

Post by daiiawn » Fri Mar 29, 2013 3:03 pm

whasf wrote:The script doesn't need updates as the server is updated. Hmm... in your php.ini change

Code: Select all

display_errors = on
and restart apache. That should show the error you're getting.
Id alreadt set display_errors = On in the hope that would give me some more information, but it doesnt seem to throw anything out.

Its the $.getJSON part of pagebuild.js that isnt fully executing for some reason, if I throw in a
html = 'Test';
replace('PlayerList',html)
before or after the getJSON call then it will show as test, but if I leave it to run through that call, nothing is displaying (other than the header) which is strange because both parts of that path should put something in to html and then call replace on it.

I thought it could just be a browser setting, but I've had a couple of people with different browsers etc try it with same results

Post Reply