Page 1 of 1
PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-04 22:03
by wenzul
PRSpy website widget
Displays clan members currently playing on PR:BF2 Project Reality servers
May you have recognized this sweet PRSpy widget on some PR clan websites like 3dAC and KSK.
blip2 has already started a
thread about this in the restricted PR:BF2 SA Private Forums.
I just wanna reshare
this project for those who are webadmins but do not hold the role PR serveradmin.
Have fun!
Example

This widget is optimized for Chromium. Please report any incompatibilities with other browsers or just do a pull request.
Standalone Version
- Copy standalone/prspy/ into the root directory of your site.
- Configure the widget settings in standalone/index.php.
Code: Select all
// refresh interval of widget in ms
var interval = 30000;
// you can list more than one, e.g. ["[3dAC]", "[KSK]"];
var clantags = ["[KSK]"];
// show clantag in popup before name (values: true, false)
var showtag = false;
// prspy data url
var prspydata = '/prspy/serverdata.php';
- Copy the distinguished sections of standalone/index.php into your corresponding template page.
Joomla Module
- Run make.bat to import web files from standalone version. This is necessary to avoid duplicate files in version control which have to be adjusted twice during changes.
- Copy joomla_module/mod_prspy/ into the modules folder of your Joomla! installation.
- Acitvate and configure the settings in the administration backend.

Tested with Joomla!-Version 2.5.24.
Wordpress Plugin
- Run make.bat to import web files from standalone version.
- Copy wordpress_plugin/prspy-widget into the wp-content/plugins/ folder of your Wordpress installation.
- Acitvate and configure the settings in the administration backend.
Tested with Wordpress Version 4.0.
Settings
- Clantags ([KSK],[3dAC],...) defines the clantag(s) which will be filtered.
- Show clantags (true, false) defines wether clantags are shown before names or not.
- Interval (ms) defines the refresh interval of the PRSpy widget in milliseconds.
PRSpy data url (prspy/serverdata.php) defines a relative or absolute URL to PRSpy JSON data.
The file
serverdata.php retrieves
https://www.realitymod.com/prspy/json/s ... on?$time() and deliver it from the same domain. It avoids blocking messages like unsafe script by different browsers.
Libraries (included)
Links
Contributors
- Original Concept: [3dAC] blip2
- Improvements, Joomla Module and Flags/Scores: [KSK] wenzul
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 09:50
by MaSSive
Would this work for SMF forum and WP site? I assume it cant be that hard to make it work under WP widgets, but I dont know about SMF.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 10:02
by wenzul
MaSSive wrote:Would this work for SMF forum and WP site? I assume it cant be that hard to make it work under WP widgets, but I dont know about SMF.
I don't know SMF forum and never used WP. For the standalone version you just have to add some CSS/JS imports in your header, the settings in a script block or move it into a JS file and add a div-structure in the page body. Should be easy to insert in your template.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 10:11
by MaSSive
Ok Ill test this and if ( when ) I make it work, Ill postback result. It does search based on user tags ( prefix ) on PR servers right? Has nothing to do with registered users and databases, from the quick look Ive done?
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 10:31
by wenzul
MaSSive wrote:Ok Ill test this and if ( when ) I make it work, Ill postback result.
Ok, so you are using WP? Maybe we can also create a WP plugin.
MaSSive wrote:It does search based on user tags ( prefix ) on PR servers right? Has nothing to do with registered users and databases, from the quick look Ive done?
Yes, it uses
JSON server data and checks for the first letters of player names.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 10:41
by MaSSive
That would be great. I can setup a quick WP installation for testing, and give you admin access and FTP access to site root. You can add me on skype ( not always online ) so we can communicate over this. If you agree this (WP ) plugin is also public and added to project.
Im not sure but for this to work with WP, this should be added to themes, functions.php file, as an quick solution but for much better look and feel it can be developed as a plugin or customizable widget with different styles.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-05 22:18
by wenzul
MaSSive wrote:Im not sure but for this to work with WP, this should be added to themes, functions.php file, as an quick solution but for much better look and feel it can be developed as a plugin or customizable widget with different styles.
I have just tried to create a wordpress plugin. I used wordpress 4.0. It is implemented as a widget. You have to add it to a site area. Maybe it will work for you right away.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-06 15:10
by MaSSive
Great thanks, but make.bat wont work for me on win 7U x64...
Xcopy - Copy files and folders | Windows CMD | SS64.com
I can confirm its working on WP4, and will try standalone on Simple Machines Forum, no reason it should not work. Great job and thanks a lot. When I figure out a way to make it work on SMF Ill post a procedure.

Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-09-06 16:13
by wenzul
MaSSive wrote:Great thanks, but make.bat wont work for me on win 7U x64...
Thanks for the hint. I have just replaced xcopy with robocopy. Should work now.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-11-27 10:32
by Arab
Is there a way for PRSpy to show what the next map is for a server technically?
Posted: 2014-11-27 11:35
by UTurista
No... All information comes from a query made to the server and the awnser that we got does not include the next map. A solution is replacing the native query service by a python one but the last one who tried it said it caused to much server instability
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2014-11-27 16:27
by wenzul
Yes, right now there is no data about that.
The popup is based on
serverdata.json.
Posted: 2014-11-28 00:04
by AncientMan
If the server has pr_maplist in the server text, it'll be replaced by the next maps. You can see this at the moment on a few servers in PRSPY.
i.e. "ServerText":"Welcome to a Project Reality server!||- Qwai River Co-op Inf|- Ramiel Co-op Inf|- Saaremaa Co-op Alt|- Kashan Desert Co-op Std|- Operation Archer Co-op Std"
But its pretty broken and doesn't work right, so most servers don't put it in.
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2017-01-17 20:24
by pr|Optic
How do i load this Widget on xenforo i cannot figure it out
[SSG] Multi-Gaming Clan
Re: PRSPY Widget for webpage: clan members currently playing
Posted: 2018-02-09 18:59
by Darojax
Thanks for the great Widget!
Is there any way to make certain players not display on the widget? F.ex. people strealing clan tags : )