Check out the "Digging into wordpress book by: "by Chris Coyier and Jeff Starr."

Counterstrike Server Info Plugin for WordPress

Posted on August 16, 2009 by Marty

Counterstrike server info plugin for wordpress was inspired by [rick gold] a relative of mine who enjoys a good Lan party & who is now back on the scene resurrecting his old Clan base -H-omeless.


wp-cs-server-info-headerPlaying games such as Counterstrike, Battlefield, Call of Duty, Their new website (by me) is running on wordpress, he was asking me if any such plugins existed that could pull the server information from his CS game server and publish it on his website sidebar, including the current map and current number of players on the server.

So I set about looking into the possibility of building such a plugin, so was born

`wp-cs-server-info plugin`

This plugin uses the `CStrike 1.6 Server Query class` by Markus Schanz

Features

  • Widget Control Panel
  • Enable disable server values
  • Current Map image

Installation

Install

  1. Unzip the `wp-cs-server-info.zip` file.
  2. Upload the the `wp-cs-server-info` folder to your `wp-contents/plugins` folder.

Activate

  1. In your WordPress Administration, go to the Plugins page
  2. Activate the plugin `WP CS SERVER INFO`.
  3. Navigate to the Widgets page, `->Appearance->Widgets` .
  4. Drag the `wp-cs-server-info` module to the sidebar that’s in use.
  5. Enter the Widget Title, Server IP & Port Number (mandatory).
  6. Select the options to Show on the front end.
    default={MapName, ServerIP, Port, Map Image}
  7. Visit your homepage (or were the sidebar will be loaded)and you should see the server info.

If you find any bugs or have any ideas, please mail me.

Changelog

1.0: Added Options to widget to show different server values
0.9 beta: Added widget control panel.
0.8 beta: Added more map images.
0.7 beta: Tested up to wp 2.7.
0.6 beta: Added strip_tags, stripslashes to user input.
0.5 beta: Created separate php pages for Functions, Widget, Widget_control.
0.4 beta: Tidy up code on main plugin php file.
0.3 beta: Removed Admin Options page for future releases.
0.2 beta: Fixed Cstrike Class Include with Absolute paths
0.1 beta: Created Admin Options Page for adding servers.

Screen-shots

Widget Module to be Dragged to appropriate sidebar

screenshot_01

Widget Control panel.
display each option using the check boxes.

screenshot_02

The Output on the front-end.
*Default options selected.

screenshot_03

Frequently Asked Questions

Q: The front end web page doesn’t load properly after widget was added
A: This could be that your host doesn’t allow connections from their network of servers to the game server, so all communications to and from the server wont happen, “Check Back soon for more Updates!”

Donate

If you really like it! Feel free to leave a Donation.


Download

The plugin is now hosted at the wordpress repository you can click the download link to visit the page and download. if it doesn’t work chances are its your web-hosts server network blocking connection.

Comments (11)

 

  1. Marty says:

    I welcome any and all Feedback for the plugin, I’m also looking to do something else with the features, so ideas and suggestions is always welcome too…

  2. mishka says:

    wordpress 2.9.2

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\web\www\blog\wp-content\plugins\wp-cs-server-info\inc\lib\class_cstrike.php on line 349

  3. Marty says:

    @mishka unfortunately it looks like the cs script cant comunicate with your cs server, this will be down to your host blocking the required ports, which are needed in order to talk to the cs server.. :(

    theres not much you can do, I’ve seen this a few times now, I’m currently working on a work around so it can be used on as many different servers as possible. please check back soon for more updates.

  4. Hi Marty! tnx for your efforts in coding this plugin. I’m enduring the same problem as mischka and was wondering if the problem is on the side of the Webspace- or the Counterstrikehost?

  5. Marty says:

    the problem seems to be with the Webspace and or the cs server, were its being hosted…
    [**UPDATE**]
    The plugin is nearing ver 2.0 with new features plus new connection methods to open the doors to a lot of people having issues connecting.
    stay tuned for future upgrades…

  6. Hey Marty!
    tnx alot for your quick answer! I’ve got ure plugin up and runnin now! I changed the hosting location of my WordPress.CMS from Piranho to my own server and its running now – maybe y
    ou can add a funktion to not display your copyright directly in the plugin !? – we are a rather big source community und would like to show your copyright on a extra page

    Looking very forward to version 2.0!

    Greetings from Germany

    Matthias “nichtschwimmer” Seidl

  7. Marty says:

    @nichtschwimmer

    the best to way to remove the linkback is either edit the source code directly, using the built in wordpress plugin editor or edit the default stylesheet using the built in theme editor, and depending on your page structure the code below should hide the link back..

    #counterstrike-server-info-widget a {
    display:none;
    }

  8. So it’s ok with you !? I just feel better asking… Keep up the good work!

  9. marty says:

    @der.nichtschwimmer yes….

  10. got another one for you your plugin works problemlessly with WP 2.9.2

    cheers Matthias

  11. marty says:

    Could you elaborate a little? error messages?

Leave a Reply

Data Recovery Software