Jump to content
Sign in to follow this  
Banshee

Automated phpBB -> Squad.xml

Recommended Posts

As we (Tier1 Operations) are taking so much from the community (see ACE, SixUpdater, Maps, etc) we're glad to be able to give something back.

Today I've cleaned up some code and prepared a neat little tool for other communities to use.

If you are running a phpBB you can use this to generate your Squad.xml to use in Arma2 or other Bohemia Interactive Titles.

In fact we support the generation of multiple Squad.xml files to reflect groups with diffrent ranks, as we are one as well.

With some tweaking, you'll be able to mange your members, their ranks etc. trough the phpBB (as you might allready do) and let the Squad.xml be autogenerated.

We've decided to provide this code under the Creative Commons by-nc-sa 3.0 Licence (https://creativecommons.org/licenses/by-nc-sa/3.0/deed.en).

However if you have any valid input, please let us know here, so we can improve the script even more.

You might also fork the project on github, then sending pull-requests.

You can get the code at https://github.com/zeidlos/Auto-Squad-XML/zipball/master.

Thanks to Bossman from Tier1 who started this job. Awsome!

Thanks to TomNedry for his squad.xsl

Edited by Banshee

Share this post


Link to post
Share on other sites

assuming no because he said it's for phpBB lol. I'm sure you could probably re-write parts of it to fit another forum software.

Share this post


Link to post
Share on other sites

Well it's designed to work with the phpBB database.

If you want to use it with any other database, contact me trough PM, so I can assist you.

For now the xml.php has table names from the phpBB database. However, we could rename that to phpBB.php and create a vBulletin.php to make it work with vBulletin. But for that I'd need access to your database or at least a dump. But we can really figure that out together if you want. Any other sytem like for example Wordpress, PHPNuke, or else would be possible as well, as long as you have access to the database.

With some work, we could as well make it standalone, but that really defeats the purpose of this script.

I'd love to have some more feedback at all if possible. :)

Anyone using this after all?

Edited by Banshee

Share this post


Link to post
Share on other sites

One for IP.Board would be awesome to, especially if membergroups and some automatic functions could be included.

Share this post


Link to post
Share on other sites

Being relatively new to the xml deal..is their a tutorial someplace that would guide me on how to use this ..would be really nice for a squad..thanks for sharing...thats pretty generous..

JC

Share this post


Link to post
Share on other sites

Well, there is a README file inside the ZIP-file with instructions. Are those unclear?

https://github.com/zeidlos/Auto-Squad-XML/blob/master/README

Squad XML Generator by Tier1 Operations (http://tier1ops.eu) v0.2

This work is licenced under the Creative Commons by-nc-sa 3.0 Licence

https://creativecommons.org/licenses/by-nc-sa/3.0/deed.en

*Install instructions*

phpBB Setup:

1. Go to your phpBB admin panel, go to users & groups, click on 'Custom profile fields'

2. Create a new field, called 'arma_player_id' (single text field).

3. Create a new field, called 'xml_remark' (textarea)

4. Create a group for every rank, or note the group_id from your allready existing group.

5. Go to xml.php and change the values in 'ranktogroupid' according to your stuff.

<?php
function ranktogroupid($rank) {
$out=9; # Default to Recruits
switch (ucfirst($rank)) {
 case 'PRCT':
   $out = 8;
   break;
 case 'Recruit':
   $out = 9;
   break;
 case 'Grunt';
   $out = 10;
   break;
 case 'Regular';
   $out = 11;
   break;
 case 'Specialist';
   $out = 12;
   break;
 case 'Corporal';
   $out = 13;
   break;
}

Note here: The numbers are your group ID's. The case 'Regular' is the rank. This 'Regular' String needs to be the same as the filenames. If you change 'Regular' to 'Sgt' you'll need to rename the files accordingly.

XML Generator Setup

1. Copy this code onto a webserver running php-cli (naturally the server that runs your phpBB installation).

2. Change the values of config.inc to your needs.

The config.inc should be pretty self-explaining. You'll obviously need to provide login to your MySQL database and specify the table the installation is running at.

3. If you want, rename the ranks provided and change the pictures.

Note: You'd also need to change the names in the xml.php

4. Run generateXML directly on the shell or trough a cronjob.

5. Have Fun. :)

Anything still unclear?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×