Page 1 of 2

Roster of players online

Posted: Fri Sep 21, 2012 9:25 am
by whasf
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,

Re: Roster of players online

Posted: Fri Sep 21, 2012 3:16 pm
by ex0r
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

Re: Roster of players online

Posted: Thu Sep 27, 2012 7:08 am
by Borfax
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~

Re: Roster of players online

Posted: Mon Nov 05, 2012 11:22 am
by mvd1987
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

Re: Roster of players online

Posted: Mon Nov 05, 2012 12:55 pm
by whasf
It's not for a forum, it's a self-contained web page.

Re: Roster of players online

Posted: Mon Nov 05, 2012 3:15 pm
by mvd1987
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

Re: Roster of players online

Posted: Mon Nov 05, 2012 7:30 pm
by whasf
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

Re: Roster of players online

Posted: Fri Mar 29, 2013 2:10 pm
by daiiawn
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

Re: Roster of players online

Posted: Fri Mar 29, 2013 2:49 pm
by whasf
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.

Re: Roster of players online

Posted: Fri Mar 29, 2013 3:03 pm
by daiiawn
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