Jump to content
Sign in to follow this  
TomNedry

Squad.xml Editor - Open source webtool

Recommended Posts

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.airpressuretendency.net/tn_arma_squadxml.htm

Some screenshots:

squadxml_editor_edit.jpgsquadxml_editor_edit_2.jpgsquadxml_editor_overview.jpgsquadxml_editor_overview_2.jpgsquadxml_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

Edited by TomNedry
Update

Share this post


Link to post
Share on other sites

hmm getting an error here

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

Edited by =WBG=ati

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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");

Share this post


Link to post
Share on other sites
works great but not the security like .htacces and .htpasswd

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

Share this post


Link to post
Share on other sites
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
more info

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

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  

×