Jump to content

Photo
- - - - -

Automated phpBB -> Squad.xml


  • Please log in to reply
8 replies to this topic
Thread Starter
Banshee
Banshee

    Sergeant

  • Members
  • 147 posts

#1

Posted 07 November 2011 - 20:46

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://creativecomm...-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/z.../zipball/master.

Thanks to Bossman from Tier1 who started this job. Awsome!
Thanks to TomNedry for his squad.xsl

Edited by Banshee, 07 November 2011 - 20:50.


Medic8402
Medic8402

    Private First Class

  • Members
  • 24 posts

#2

Posted 04 January 2012 - 01:44

banshee_ Will this work even if someone is not using phpBB?

gossamersolid
gossamersolid

    Second Lieutenant

  • Members
  • 4453 posts
  • LocationOntario, Canada

#3

Posted 04 January 2012 - 20:14

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.
logo.png
ArmA 3 - GWAR3
ArmA 2 - PCDF | Gossamer's Warfare
PC - i5 3570K | EVGA GTX 780 ACX | 16GB DDR3

Thread Starter
Banshee
Banshee

    Sergeant

  • Members
  • 147 posts

#4

Posted 18 January 2012 - 09:10

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, 18 January 2012 - 09:17.

Posted Image
Tactics | Teamwork | Training

Linux Arma Server Skype Chat

Alderman
Alderman

    Staff Sergeant

  • Members
  • 276 posts

#5

Posted 18 January 2012 - 09:15

One for IP.Board would be awesome to, especially if membergroups and some automatic functions could be included.
Executive Director / Chairman
Military Gaming Organization
http://militarygaming.org
Ph: (800) 601-2798 - Fax: (800) 601-2948

Thread Starter
Banshee
Banshee

    Sergeant

  • Members
  • 147 posts

#6

Posted 18 January 2012 - 11:44

As I said, PM me for the dirty details, please.
Posted Image
Tactics | Teamwork | Training

Linux Arma Server Skype Chat

wormeaten
wormeaten

    Sergeant

  • Members
  • 135 posts

#7

Posted 21 January 2012 - 18:04

Nice. :yay:

I will try this on our RGG forum.

Thanks m8. ;)

Diesel Tech JC
Diesel Tech JC

    Staff Sergeant

  • Members
  • 264 posts

#8

Posted 22 January 2012 - 02:03

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

Thread Starter
Banshee
Banshee

    Sergeant

  • Members
  • 147 posts

#9

Posted 02 February 2012 - 13:51

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

https://github.com/z...b/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://creativecomm...-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?
Posted Image
Tactics | Teamwork | Training

Linux Arma Server Skype Chat