View Full Version : Squad.xml Editor - Open source webtool
TomNedry
Apr 4 2011, 20:08
While managing our active community at www.pzgrenbtl417.eu (http://www.pzgrenbtl417.eu) i had to edit our "squad.xml" about once a week. Not that much work you may think, but some sort of annoying and error-prone...
So i decided to write a small web-based tool and as i found it somewhat useful to me i like to donate it to the community under the GPL3 licence.
Download-Link: http://arma.airpressuretendency.net/tn_arma_squadxml.htm
Some screenshots:
http://www.airpressuretendency.net/squadxml_editor/scrnshots/squadxml_editor_edit.jpg http://www.airpressuretendency.net/squadxml_editor/scrnshots/squadxml_editor_edit_2.jpg http://www.airpressuretendency.net/squadxml_editor/scrnshots/squadxml_editor_overview.jpg http://www.airpressuretendency.net/squadxml_editor/scrnshots/squadxml_editor_overview_2.jpg http://www.airpressuretendency.net/squadxml_editor/scrnshots/squadxml_editor_overview_3.jpg
UPDATE: 06apr2011
Remark: To show your "squad.xml" on a website you'll need a DTD and XLS file too. Look here: http://community.bistudio.com/wiki/squad.xml
UPDATE: 08apr2011
Minor fix. Download file updated.
UPDATE: 31oct2011
Added: non-ASCII characters in textfields will be deleted to keep XML strict
Changed: New download URL
Update: 03nov2011
Add UTF-8 support
Removed "Auto-removes all non-ASCII characters"
Readme.txt adopted
HunterTX
Apr 4 2011, 20:47
Awesome -thanks!
Commander1985
Apr 4 2011, 21:35
Thanks for sharing Tom, now i know how you changed them so fast everytime^^
Download mirrored on Arma2Base.de
http://www.arma2base.de/include.php?path=download&contentid=3363
=WBG=ati
Apr 5 2011, 11:45
hmm getting an error here
Parse error: syntax error, unexpected '.' in forum/squadxml/squadxml.php on line 28
TomNedry
Apr 5 2011, 17:35
hmm getting an error here
Parse error: syntax error, unexpected '.' in forum/squadxml/squadxml.php on line 28
Fixed and download updated...
Occured on webservers with another port than 80 only.
Download the new archive or just go to line 28 in "squadxml.php" and replace
$_SERVER["SERVER_PORT"]..$path_parts['dirname'];
by
$_SERVER["SERVER_PORT"].$path_parts['dirname'];
TomNedry
Apr 6 2011, 13:45
Remark: As asked several times via PM: To show your "squad.xml" on a website you'll need a DTD and XLS file too. Look here: http://community.bistudio.com/wiki/squad.xml
TomNedry
Apr 8 2011, 18:15
Minor fix and download updated...
To patch manually just go to your "squadxml_save.php" and search for line 61. Remove:
require_once("/squadxml.php");
and set instead:
require_once("squadxml.php");
blade73
Apr 11 2011, 12:53
works great but not the security like .htacces and .htpasswd
TomNedry
Apr 13 2011, 12:07
works great but not the security like .htacces and .htpasswd
What's the problem with ".htaccess" etc. ?
Sickboy
Apr 13 2011, 12:11
Neat tool!
blade73
Apr 14 2011, 14:00
What's the problem with ".htaccess" etc. ?
and this is being renamed to .htaccess
AuthUserFile /www/****/squadxml/squadxml.php/.htpasswd
AuthType Basic
AuthName ""
<Files "squadxml.php">
Require valid-user
</Files>
<Files "squadxml_del.php">
Require valid-user
</Files>
<Files "squadxml_edit.php">
Require valid-user
</Files>
<Files "squadxml_save.php">
Require valid-user
</Files>
getting an error on port 80
both files are in that squadxml folder
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Apache/2.2.14 (Unix) PHP/5.2.17
TomNedry
Apr 14 2011, 14:30
and this is being renamed to .htaccess
AuthUserFile /www/****/squadxml/squadxml.php/.htpasswd
Your path is wrong... It has to be:
AuthUserFile /www/****/squadxml/.htpasswd
"squadxml.php" isn't a part of the path, but a file in the same directory as ".htpasswd". I have to mention that "/www/****..." is also just only an educated guess. To get the correct path, just create a new file and name it e.g. "phpinfo.php". Open it in a text-editor and paste:
<?php phpinfo(); ?>
Save it and copy it to your "squadxml" directory. Go to your browser and go for "http://yourDomain.com/squadxml/phpinfo.php". You'll get a status report about your webserver configuration. Search for:
_SERVER["DOCUMENT_ROOT"]
You'll see your root path, something like: "/directory/directory2/htdocs/squadxml". This is the path you will need left of "/.htpasswd".
blade73
Apr 14 2011, 15:21
thx will try
blade73
Apr 15 2011, 20:37
oki have right path but nogo so im going back to the old one again cheers for the help anyway
Edit: oki fixed some minour path problems lol
nice work tom
blade73
Apr 18 2011, 20:55
getting a error when trying to delete someone :
Warning: require_once() [function.require-once]: Unable to access /squadxml.php in /home/****'/squadxml/squadxml_del.php on line 38
Warning: require_once(/squadxml.php) [function.require-once]: failed to open stream: No such file or directory in /home/****/squadxml/squadxml_del.php on line 38
Fatal error: require_once() [function.require]: Failed opening required '/squadxml.php' (include_path='.:/usr/local/lib/php') in /home/****/squadxml/squadxml_del.php on line 38
TomNedry
Oct 31 2011, 21:38
UPDATE: 31oct2011
Added: non-ASCII characters in textfields will be deleted to keep XML strict
Changed: New download URL, http://arma.airpressuretendency.net/download/squadxml_tomnedry_v1_1_27oct11.zip
See also http://arma.airpressuretendency.net/tn_arma_squadxml.htm for a quick overview (in german)
UPDATE: 31oct2011
Added: non-ASCII characters in textfields will be deleted to keep XML strict
bad idea. only ascii control chars should be removed. 0x00 - 0x1f and 0x7f . by doing this you have no utf8 support. meaning example russian players cant use this.
you should also set the encoding to utf-8 instead of using iso-xxxx.
the game uses utf8 so there is no need to restric this to ascii only. remember. ther is a vast majority that are russian players in this game.
TomNedry
Nov 1 2011, 08:11
Good point... Can you give me a link to a russian squad.xml (via PN) so i will able to test it?
no. sorry. i dont know any russian clans.
just wanted to give you a heads up. it doesnt only affect russians. it will affect all charset that are outside the ascii range. example æøå.
but with the help of google translator. 1 min to put a example together.
<?xml version="1.0"?>
<?DOCTYPE squad SYSTEM "squad.dtd"?>
<?xml-stylesheet href="squad.xsl?" type="text/xsl"?>
<squad nick="Моя Россия клана">
<name>[-Моя Россия клана-]</name>
<email></email>
<web>www.России-дом-страница.ru</web>
<picture>logo.paa</picture>
<title>Моя Россия клана</title>
<member id="123456789" nick="солдат1">
<name>солдат1</name>
<email></email>
<icq></icq>
<remark>Тяжелая работа никогда никого не убивал, но почему бы рискнуть!</remark>
</member>
<member id="987654321" nick="солдат2">
<name>солдат2</name>
<email>/email>
<icq></icq>
<remark>Никогда не стойте между собакой и гидрант!</remark>
</member>
</squad>
TomNedry
Nov 3 2011, 18:15
Update 03nov2011
Add UTF-8 support
Removed "Auto-removes all non-ASCII characters"
Readme.txt adopted
See the first post (http://forums.bistudio.com/showpost.php?p=1891393&postcount=1) for links...
The UTF-8 support was tested with German-"Umlaute" (e.g. ä, ü, etc.). I would appreciate it to get a link to a live "squad.xml" with cyrillic letters. Please PN me...
Sorry for highjacking this thread. But before opening a new one just to ask if ppl are intrested, I'll do it here. :)
We've created a tool that reads the info from a phpBB database and generates the XML files. You could put that into a cron job and run it regulary. That's neat if you update your roster frequently.
Anyone intrested in that? Will require initial setup once and just a few adjustments if you change stuff like ranks or else. But other than that it works like a charme. :)
TomNedry
Nov 7 2011, 18:27
I'm sure that someone will be interested... Just post the stuff!
BTW: Why a cron job? I'm assuming that you're using a form with some sort of "Apply" button to write to the database. Just run the XML update process with the same script (after confirmation of the database entry of course) and you're done...
I'm sure that someone will be interested... Just post the stuff!
BTW: Why a cron job? I'm assuming that you're using a form with some sort of "Apply" button to write to the database. Just run the XML update process with the same script (after confirmation of the database entry of course) and you're done...
Released it in another thread. Didn't want to hijack yours too much.
Why a cronjob? Didn't want to edit the phpBB core files. Updates to the database are done trough the phpBB admin interface.
That tool uses phpBB usergroups and custom profile fields to determine your player ID, your rank, etc.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.