|
Clanwars report with ease This scripts allows easy updating of your web clanwars page. Demo forms : (not functionnal)
What the script does :When you add a game, the script displays a form you have to fill to add information. Then, for each match it creates a txt file containing these info, in a "/stuff" directory, named something like yyyy-mm-dd_CLAN.txt (assuming you have only one clanwar with this clan this day) Then, it produces two files : for example, result-short.htm and result-matches-1.htm Web pages where you want to include these files must be .shtml document. You can see by yourself what this script allows directly on my clan match page : Step by step installation :1. Download the clanwarscript.zip (hu, done it yet ? :). 2. Modify the very first line of clanwars.pl, to replace #!/usr/bin/perl if necessary. Modify clanwars.var : change path to suit your needs. Other variables will be changed later, from within the cgi itself. Now upload files to your webserver : 3. In your cgi-bin directory : 4. In a non cgi directory : for example, http://yoursite/games/ 5. Then create 3 directories and chmod them 777. For example : icons, data and stuff. All these path and file names can be modified later via the script menus. First run !At this point, you can run the script. Default login and password are : Log as an admin, then click "Modify Login" to change these passwords !! Typically, user account infos should be given to all your clanmates, and admin account info
to a few or no one else. While you are at it, wander through menus to discover the script features. Scoring Units :You can (have to) select a 'scoring unit'. Typically, and by default, there are two available scoring units : frags and flag captured. Categories :If you don't want all your games to be on the same page, use categories. If you have a 50 games and 350 Kb web page, it could be smart for example to categorise them by seasons : create categories 'year 1998', 'year 1999' and 'year 2000' for example. Or you could also create categories with leagues : 'BigCTF season 1', 'BigCTF season 2', and 'DeathMatch Cup' for example. When you create categories, several files, containing your match reports, are produced. Instead of just one result-matches-1.htm, you'll have result-matches-1.htm to result-matches-3.htm In the admin menu, you can modify the name of produced file : use '%d' as a placeholder that will be replaced by the category number, starting from 1. For example : if you name it result-%d.htm, and use no categories, you'll have only result-1.htm Adding / deleting flag icons :Simply add some more icons (use .GIF format) or delete the ones you don't wish to use. You could even turn this into a special feature, like for example an overall rating of your game,
adding icons like 5stars.gif, 4stars.gif, 3stars.gif, ..., or excellent.gif, impressive.gif,
lame.gif, ownage.gif, etc... Customize the templates :I *strongly* suggest you first run the script with the provided templates, so you will easily which part you want to modify. Typically, you can have a clanwars page with both summary and detailed matchs, using template-short.htm and template-match.htm templates, and just the summary on your front/news page (using template-short.htm) To modify templates, write normal html, with special keywords that will be replaced by the script. If you don't want to use a keyword, remove it from the template. If a keyword is mistyped or contains no info, it will add nothing to your page. In template-match.htm : $DATE : date of the clanmatch $MAP : each map played $OURTOTAL : your total score (sum of each map) In template-short.htm : Here, what I call a "Match" is several "Maps" played in a row, against the same clan. $MATCHES : number of matches played, of which : $MAPS maps : number of maps played, of which : Points scored in all maps : $UNIT : scoring unit. Place these 3 keywords between $BEGINREPEAT and $ENDREPEAT so the html code will be duplicated for each scoring unit you have played with (if you added 'Goals' to the units list but didn't play any Demonic Soccer game yet, it won't be printed). Contact, credit :My name is Ozh, ozh@planetquake.com If you use and like my script, drop me a mail to say thank you :) Feel free to recommend it to clans that got their butt kicked :) Disclaimer :I wrote this script for my clan web site. Since some people asked for it, I've released it (after some improvements of course :) This readme file has been written in english which is not my mother tongue. Please excuse any weird sentence you may find :) This script has been tested under Win98 using OmniHTTPd, WinNT using IIS, and Unix using Apache
I guess it will work on any cgi enabled web server. "Man, where and how do I upload this script ?" "Can you add this or that feature ?" "Man, why didn't you just use /{wtf}/\[^omg/\//;$_()]//hpb;/ instead of your lame foreach ?" Ozh
|