Jump to content

Photo
- - - - -

Squad.xml Editor - Open source webtool


  • Please log in to reply
26 replies to this topic
Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 04 April 2011 - 20:08 #1

While managing our active community at 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.airpress...ma_squadxml.htm


Some screenshots:

Posted Image Posted Image Posted Image Posted Image Posted Image





UPDATE: 06apr2011

Remark: To show your "squad.xml" on a website you'll need a DTD and XLS file too. Look here: http://community.bis.../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

Edited by TomNedry, 03 November 2011 - 19:17.
Update


HunterTX
HunterTX

    Lance Corporal

  • Members
  • 43 posts

  • Joined: 21-July 2009

Posted 04 April 2011 - 20:47 #2

Awesome -thanks!

Edited by HunterTX, 04 April 2011 - 20:57.

21st Century Warfare ~
A PvP Arma2/CO Tourny - 21CW.net

Commander1985
Commander1985

    Staff Sergeant

  • Members
  • 238 posts

  • Joined: 30-September 2009

Posted 04 April 2011 - 21:35 #3

Thanks for sharing Tom, now i know how you changed them so fast everytime^^

Download mirrored on Arma2Base.de
http://www.arma2base...&contentid=3363
Posted Image

=WBG=ati
=WBG=ati

    Lance Corporal

  • Members
  • 59 posts

  • Joined: 16-July 2009

Posted 05 April 2011 - 11:45 #4

hmm getting an error here
Parse error: syntax error, unexpected '.' in forum/squadxml/squadxml.php on line 28

Edited by =WBG=ati, 05 April 2011 - 11:52.


Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 05 April 2011 - 17:35 #5

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'];

Edited by TomNedry, 05 April 2011 - 17:41.


Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 06 April 2011 - 13:45 #6

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.bis.../wiki/squad.xml

Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 08 April 2011 - 18:15 #7

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
blade73

    Lance Corporal

  • Members
  • 55 posts

  • Joined: 05-September 2010

Posted 11 April 2011 - 12:53 #8

works great but not the security like .htacces and .htpasswd
Posted Image
Posted Image
Posted Image
www.3para-gu.com

Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 13 April 2011 - 12:07 #9

works great but not the security like .htacces and .htpasswd


What's the problem with ".htaccess" etc. ?

sickboy
sickboy

    Colonel

  • Members
  • 9947 posts

  • Joined: 11-May 2005

Posted 13 April 2011 - 12:11 #10

Neat tool!

blade73
blade73

    Lance Corporal

  • Members
  • 55 posts

  • Joined: 05-September 2010

Posted 14 April 2011 - 14:00 #11

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

Edited by blade73, 14 April 2011 - 14:07.
more info

Posted Image
Posted Image
Posted Image
www.3para-gu.com

Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 14 April 2011 - 14:30 #12

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".

Edited by TomNedry, 14 April 2011 - 14:46.


blade73
blade73

    Lance Corporal

  • Members
  • 55 posts

  • Joined: 05-September 2010

Posted 14 April 2011 - 15:21 #13

thx will try
Posted Image
Posted Image
Posted Image
www.3para-gu.com

blade73
blade73

    Lance Corporal

  • Members
  • 55 posts

  • Joined: 05-September 2010

Posted 15 April 2011 - 20:37 #14

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

Edited by blade73, 18 April 2011 - 15:42.

Posted Image
Posted Image
Posted Image
www.3para-gu.com

blade73
blade73

    Lance Corporal

  • Members
  • 55 posts

  • Joined: 05-September 2010

Posted 18 April 2011 - 20:55 #15

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
Posted Image
Posted Image
Posted Image
www.3para-gu.com

Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 31 October 2011 - 22:38 #16

UPDATE: 31oct2011

Added: non-ASCII characters in textfields will be deleted to keep XML strict
Changed: New download URL, http://arma.airpress...1_1_27oct11.zip

See also http://arma.airpress...ma_squadxml.htm for a quick overview (in german)

nuxil
nuxil

    Sergeant Major

  • Members
  • 1606 posts

  • Joined: 08-March 2007

Posted 31 October 2011 - 23:05 #17

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.

Edited by nuxil, 01 November 2011 - 01:43.


Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 01 November 2011 - 09:11 #18

Good point... Can you give me a link to a russian squad.xml (via PN) so i will able to test it?

nuxil
nuxil

    Sergeant Major

  • Members
  • 1606 posts

  • Joined: 08-March 2007

Posted 01 November 2011 - 09:50 #19

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>


Edited by nuxil, 01 November 2011 - 10:36.


Thread Starter
TomNedry
TomNedry

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 18-December 2006

Posted 03 November 2011 - 19:15 #20

Update 03nov2011

  • Add UTF-8 support
  • Removed "Auto-removes all non-ASCII characters"
  • Readme.txt adopted

See the first post 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...