Virtual War Frequently Asked Questions $Date: 2005/09/02 17:25:49 $

 

 

 

 

 

 


1. Requirements

What are the requirements for Virtual War to run properly?

  • Webserver supporting PHP (at least Version 4.0.3)
  • MySQL
  • GD library for thumbnail and general image handling (GD2 for truecolor support)
To use all features of the program safe mode must be disabled.

We recommend the latest stable versions.

 

How do i find out if my site supports PHP and has MySQL?

The easiest way to find out if your site supports PHP is to create a simple PHP file.
Name it info.php. The file should look like this:

info.php

<?php
phpinfo();
?>







Then upload it to your webspace and execute it, by entering the path to the file in your browsers adress bar. (http://www.yoursite.com/info.php)
If it displays only the content of the file, your webspace doesn't support PHP, if a PHP info page is displayed, PHP is ready to use.
For MySQL infos contact your hosting company.

 

I'm using a content management system (CMS) like PHPNuke, PostNuke, PHPKIT or Mambo. Will Virtual War work together with my CMS now?

The regular version of Virtual War is only limited usable with a modular CMS like PHPNuke, PostNuke, PHPKIT or Mambo.
There are some modified version of Virtual War available, which make it possible to use Virtual War within the CMS.

Below we listed possibilities for the most common CMS:

Name of CMS appropriate Virtual War Version Author
PHPNuke Virtual War v1.5 R9 BlackBox V2 http://www.phpnuke-clan.com
  Virtual War v1.5 R9 BlackBox, PHP-Nuke http://www.vwar.dk
PostNuke Virtual War v1.5 R9 BlackBox, Post-Nuke http://www.vwar.dk
PHPKit useable with include.php (Example: include.php?src=/vwar/war.php) -
Mambo no known possibility so far -
e107 no known possibility so far -

2. Installation Issues

How do i configure the file _config.inc.php?

Versions >= 1.5.0:

Since version 1.5.0 there's no need to configure the file manually.
You'll be asked for the required information during the installation process.

Versions < 1.5.0:

Open the File _config.inc.php and fill in your Database Connection Data:

  • Replace yourmysqlhostname with the Hostname of your MySQL Database.
  • Replace yourmysqlusername with the Username of your MySQL Database.
  • Replace yourmysqlpassword with the Password of your MySQL Database.
  • Replace yourmysqldatabasename with the Name of your MySQL Database.

Example:

$sql["hostname"] = "localhost"; // Hostname of the MySQL-Database
$sql["username"] = "root"; // MySQL Username
$sql["password"] = "g35hgf"; // MySQL Password
$sql["database"] = "web25_1"; // MySQL Database Name

 

What is "chmod" and how do i set this?

CHMOD changes the access permissions or modes of files or directories.
The need to apply permissions depends on the system used on your webserver

Unix/Linux based Systems:

The way, how to set these permissions depends on your ftp-client.
Most ftp-clients are using the same way. (right-click on file/directory and choose chmod)
For further Instructions read the manual of your ftp-client.

Windows based Systems:

If the filesystem is FAT32 you don't need to apply permissions. Every file or directory will automatically be set to 777.
If the filesystem is NTFS you have to set the access permissions directly in your windows filesystem.

 

I get an error message during installation:
"Warning: Supplied argument is not a valid MySQL result resource in /.../.../_class_db.php on line ..."!

This error appears, if you configured the _config.inc.php in a wrong way.

See » How do i configure the _config.inc.php?

 

I get error 404 "File Not Found" during installation!

This error appears, if you configured the _config.inc.php in a wrong way.

See » How do i configure the _config.inc.php?

Especially check your 'hostname' - setup!
If your hostname is set to 'localhost' then replace it by '127.0.0.1' (or the other way round).

 

I get error 505 "Internal Server Error" during installation!

This error appears, if you configured the _config.inc.php in a wrong way.

Please see » How do i configure the _config.inc.php?

 

I get errors like "Notice: Undefined index: step in XYZ.php on line XYZ" during installation!

This errors are the result of your php error reporting settings.

  • you work with a local php installation, then you have to edit your local php.ini
    Search for error_reporting = and set it to:

php.ini:

error_reporting = E_ALL & ~E_NOTICE



  • If the problem occurs on your webspace, you can override the providers error reporting settings by opening your _config.inc.php.
    Below <?php put error_reporting(E_ALL & ~E_NOTICE);
_config.inc.php:

<?php
// set error reporting
error_reporting(E_ALL & ~E_NOTICE);

$PHP_SELF = (isset($_SERVER)) ? $_SERVER["PHP_SELF"] : $HTTP_SERVER_VARS["PHP_SELF"];
if (eregi("config.inc.php", $PHP_SELF))
{
    header("Location: war.php");
    die();
}
/* #####################################################################################

...

?>

 

I get an error message during installation:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /.../.../_class_db.php on line ...

This error appears, if you configured the _config.inc.php in a wrong way.

See » How do i configure the _config.inc.php?

 

I get an error message during installation:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'xxxxxx' (Using password: xxx) in /.../.../_class_db.php on line ...

In that case your MySQL database refuses access with the data specified in _config.inc.php!

Possible reasons:
  • wrong password specified
  • no password specified
  • wrong username
  • no username specified
See » How do i configure the _config.inc.php?

 

I downloaded the update package, how do i perform the update now?

  • Update Guide:

    1. Upload the Update Directory included in the Update Package to your Virtual War Directory.
    2. Run update.php in the Update Folder to update to the desired Version.
    3. Upload the changed Files included in the Update Package (overwrite your existing Files!)

    Note:
    You can merge Step 1 & 3 (simply upload all Files in the Package to your Virtual War Directory (overwrite existing ones!))

 

Is it possible to install Virtual War into an existing, non empty database?

Yes, you can install Virtual War into any existing MySQL database.
You'll be asked for the required data during the installation process.

The installation offers you 2 options:
  • Continue without clearing the database (which means an additional installation. all "old" MySQL data remains untouched!)
  • Clear all existing content before continue installing (be very careful with this option! you'll delete ALL existing content!)

 

Is it possible to install more than 1 Virtual War into the same database?

Yes, you can install as many copies of Virtual War into the same database as needed.
You'll be asked for "number of Virtual War installation" during the installation process.
Simply enter the number or string which signifies this installation.

e.g. if you set "number of Virtual War installation" to "2", all tables will be extended by the prefix "2"

 

Does any information get lost when updating to a newer version?

No information get lost, if you follow the update instructions exactly.
The update script will perform all neccessary operations automatically.
Existing templates will be overwritten only when they are a part of the update.

The update will never touch your existing font and color settings.

 

What is a MySQL?

MySQL (SQL = Structured Query Language)

MySQL is a multithreaded, multi-user, SQL (Structured Query Language) relational database server (RDBS).
MySQL is available either under the GNU General Public License (GPL) or under other licenses when the GPL is inapplicable to the intended use.
Unlike projects such as Apache, MySQL is owned and sponsored by a single for-profit firm, MySQL AB.
The MySQL trademark and copyright are owned by the Swedish company MySQL AB.
The company develops and maintains the system, selling support and service contracts, as well as commercially-licensed copies of MySQL, and employing people all over the world who communicate over the internet.
Two Swedes and a Finn founded MySQL AB: David Axmark, Allan Larsson and Michael "Monty" Widenius.

See » Wikipedia for more details.

 

What is a database server?

The database server is a piece of software that manages a database.

 

Where do i get the log-in data for my MySQL database from?

You'll get this data from your hosting company.
In most cases the value for the database server is 'localhost' or '127.0.0.1')

3. General

I can't login to Admin Control Panel!

Currently the login process requires a valid cookie.
(*maybe sessions without cookies will be implemented in a further version*)

Therefore possible reasons can be:
  1. Your browser doesn't accept cookies: Please check the respective options in your browser.
  2. wrong VWar Cookie-Settings: modify the value for 'Cookie-Domain' in VWar's 'General Settings'. Correct the value with a database management tool (e.g. PHPMyAdmin) if necessary.
  3. the option for 'register_long_arrays' is turned 'Off' in your php.ini. Only your hosting company/administrator of your webserver can change this value.

 

I added a game, but this game doesn't appear (isn't selectable) in the challenge form!

You have to add valid locations for this game. Once there exist locations for the game it will be selectable in the challenge form.
You can add a game this by using the "Add Location" link in your Admin Control Panel.
Games with status "inactivated" are not selectable.

 

I can't add a war, cause there are no games selectable!

Games are only available if there are locations set for this game.
Check if you have added some locations for this Game.
You can do this by using the "Add Location" link in your Admin Control Panel.
Games with status "inactivated" are not selectable.

 

I got a non framed site. What should i do now?

There are two Files (_header.php,_footer.php), just place your site content in there or simply include it, so that Virtual War builds the content and the rest around the main layout

Note:
Please note that Virtual War uses a Header Template with a Style and Head Definition. If you like to include Virtual War like mentioned above, you disable the Header Template. Just go to Admin Control Panel, open "edit templates", select the header template (called 'header') and click "edit".
You can completely delete the template content or you comment it out by placing <!-- and --> on the top and on the bottom. (we suggest the 2nd method)

Also see the directory "examples" for integration-problems!

 

I included Virtual War in my page and now my colors differ to the rest of my pages!

In that case please deactivate the header template.
Just go to your admin control panel, select 'Modify Template', pick the template header and set it's status to deactivated.

 

What is the ACP?

The ACP is the Administrator Control Panel.

 

Where can i configure my Virtual War?

You can configure your Virtual War in the ACP (See » What is the ACP?).
The ACP is located at http://www.yoursite.com/vwar/admin/index.php (if you kept the original Virtual War structure).
The ACP offers you all neccessary options to maintain your Virtual War.

 

I get errors like
"Notice: Undefined index: step in XYZ.php on line XYZ" when i open up any of the Virtual War pages (war.php, member.php aso)!

See » I get errors like "Notice: Undefined index: step in XYZ.php on line XYZ" during installation!

 

Which place holders are available for WarMailing?

All place holder are case sensitive!
The following place holders are available for WarMailing:
  • [ownname] - Your Team Name
  • [ownnameshort] - Your Team Tag
  • [ownnhomepage] - Your Team Homepage
  • [oppname] - Opponent Name
  • [oppnameshort] - Opponent Tag
  • [opphomepage] - Opponent Homepage
  • [added_by] - Member who added the War
  • [updated_by] - Member who modified the War
  • [target_user] - Member who receive the Mail
  • [maps] - Maps that will played
  • [day] - Day of War
  • [day_extend] - Extended Version of "Day of War"
  • [weekday] - Day of War (as Name)
  • [month] - Month of War
  • [month_name] - Month of War (as Name)
  • [year] - Year of War
  • [hour] - Hour of War
  • [minute] - Minute of War
  • [servername] - Server Name
  • [serverip] - Server IP
  • [info] - Additional Information
  • [join_link] - Link to Next Actions
  • [playerperteam] - Players per Team
  • [team] - The playing Team

 

I get an error: Missing data for "$str[xyz]"

The language variable which you entered don't exist in english.inc.php.
To add custom language data from hacks click on "Add Language" in your ACP and select the language file of the hack.
But normally all hacks add their language data automatically.

We recommend all hack developers to use functions_install.php and functions_customize.php respectively the function addLanguageVars.
You find more information about this function and the syntax of a language file in docs/DEVGUIDE.html.

 

When I add an opponent with a visiting card I get an error: "Not all required fields were filled correctly!"

The visiting card of the opponent doesn't exist or the data in it are smaller than 380 bytes.

 

When I use the upload feature in the ACP I get an error: "Not all required fields were filled correctly!"

It seems that this error occurs when file uploads aren't allowed in your php.ini.
If you work with a local php installation: open your php.ini and change file_uploads to "On".

Otherwise upload the file manually into the folder which will be shown (local file) in the add form.

 

How do i remove the big text 'Virtual War 1.5.0' above the script?

  • Go to: Administrator Control Panel -> Settings / Admin -> Modify Template -> Modify and open the template 'header'.
  • Search for:

    <td align="right"><font style="font-family: verdana, arial, helvetica; font-size: 19px; font-weight: bold; color: #8A8C8E;"><i>Virtual War v1.5.0</i></font></td>




  • Remove the text and save the modified template

 

How/Where do i change the appearance (font family and font size) of the files located in folder "extra/"?

  • Open the respective file (e.g. lastactions.php) with a text editor
  • define font family and font size with CSS; simply place the associated code before the PHP-Code (<?php ...)

    <STYLE type="text/css">
        body { background-color: #FFF; }
        p,ul,td { font-size: 9pt; }
        font,td { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000; }
    </STYLE>
    <?php
    /* #####################################################################################
    *
    * $Id: FAQ_EN.html,v 1.16 2005/09/02 17:25:49 mabu Exp $
    *
    * This notice must remain untouched at all times.
    *
    * Modifications to the script, except the official addons or hacks,
    * without the owners permission are prohibited.
    * All rights reserved to their proper authors.
    *
    * ---------------------------------------------
    * http://www.vwar.de || Copyright (C) 2001-2004
    * ---------------------------------------------
    *
    * #####################################################################################
    */

    // ####################################### CONFIGURATION ###############################

    // path to your main vwar-directory (with final ' / ')
    // -> from the site, where this extra is included!
    // -> use absolute path if you have it included in files with different directories!
    // (e.g. /home/www/htdocs/mysite.com/vwar/)
    // -> if included in your _header.php/_footer.php, it is normally: './'
    // -> if this extra is an site on its own, use: './../'
    $vwar_xroot = "";

 

My problem isn't listed in this faq! What can i do now?

The best way to solve an unlisted problem is to post it in our forums, located at http://www.vwar.de.
This ensures, that all Virtual War users can participate in the solution process.

4. Handling

What links are available to access parts of the script directly?

* xxx means any of the mentioned values
(e.g. in member.php?xxx, xxx could have the value action=mail, what results in member.php?action=mail)


war.php?xxx*
  • showgame=xxx - displays entries for the specified game
  • showgametype=xxx - displays entries for the specified game type
  • showmatchtype=xxx - displays entries for the specified match type
  • sortby=gamename - sort entries by game name
  • sortby=gametypename - sort entries by gametype name
  • sortby=matchtypename - sort entries by matchtype name
  • sortby=oppname - sort entries by the opponent name
  • sortby=dateline - sort entries by date
  • sortorder=asc - sort entries ascending
  • sortorder=desc - sort entries descending
  • action=nextaction - displays the next actions page
  • action=nextaction&display=today&formgame=xxx - displays todays next actions for the specified game
  • action=nextaction&display=status&formgame=xxx - displays the next actions for wars without status for the specified game
  • action=oppinfo&oppid=xxx - displays the details of the specified opponent
  • action=details&warid=xxx - displays the details for the specified war
  • action=screen&screenid=xxx - displays the specified screenshot
  • action=comment&warid=xxx - displays all comments for the specified war
  • action=signup&warid=xxx - displays the signup page for the specified war
  • action=logout - deletes all cookies set by the script (you'll have guest status then)
  • action=forgotpw - opens the forgot password form for members


stats.php?xxx*
  • showgame=xxx - displays the statistics page for the specified game


member.php?xxx*
  • action=profile&memberid=xxx - displays the profile for the specified member
  • action=gb&memberid=xxx - displays the guestbook for the specified member
  • action=mail - displays the formmailer
  • action=mail&memberid=xxx - displays the formmailer (the specified member will be selected automatically)
  • display=status&id=xxx - displays only the members with the specified status
  • display=teams - displays all teams
  • display=teams&id=xxx - displays only the specified team
  • display=games - displays all members divided by games
  • display=games&id=xxx- displays all members for the specified game
  • display=gallery - displays the members gallery for all members
  • display=gallery&id=xxx - displays the members gallery only for the members with the specified status
  • display=contact - displays the member contact list
  • display=contact&id=xxx - displays the member contact list only for the members with the specified status


calendar.php?xxx*
  • action=list - displays the calendar in list mode
  • action=day&month=xxx&year=xxx&day=1 - displays the calendar only for the specified day
  • action=details&eventid=xxx - displays the details for the specified event
  • action=comment&eventid=xxx - displays the comments page for the specified event


news.php?xxx*
  • action=archive - displays the news archive
  • action=search - displays the news search page
  • action=submit - displays the news submit page, which allows users to submit news
  • action=send&newsid=xxx - displays the send news page, which allows you to send the specified news by email
  • cat=xxx - displays all news of the specified category
  • action=comment&newsid=xxx - displays the comment page for the specified news

 

Is it or will it be possible to switch the language for the ACP?

At the moment it's only possible to switch the language for the front-end of Virtual War.
The ACP is only available in english.

Maybe we'll translate this part of the script in the future too.

 

How do users edit their profiles?

Since there's no control panel front-end, users have to login in the admin control panel in order to edit their profiles.

After a successful login the user has two options:
  • select 'Modify Member' from the left menu and pick the own username (which will be highlighted)
  • click on the own username on the top of the page, where it says 'Logged in as: xxx'

 

How do i adjust the recipient/s for the mail notification of the application and the challenge form?

The mail notification of the application form will go out to all who got the right "canaddmember".
The mail notification of the challenge form will go out to all who got the right "canaddwar".

 

If i try to add or modify a member i receive the error message "Not all fields were filled correctly!", although all required fields were filled. What am i doing wrong?

In this case the choosen email adress exists twice or the format of the mail adress is wrong.

5. Automatic Backup

I got a file like "backup_51_2_23122003.sql.gz" but i can't open it and what does the numbers mean?

First a little introduction for the file name
  • The first part is the week number of the backup
  • The next part is the number of the day: 0 for Sunday 'til 6 for Saturday
  • The last part is the date of the backup (DDMMYYYY)
Mostly you'll find a second extension at the end of the file name. "gz" means that the file is compressed with zlib from Jean-loup Gailly and Mark Adler.
Normally all common archive managers can decompress these files.

If there is no second extension you can open the file with any text editor.

 

I click on "Configure Access/Days" but nothing happens!

This two links open a popup window.

If you've running a popup blocker or other programs like this add an exclude for the VWar ACP.
A second solution is to access the two pages directly. Copy the url from the link into a new browser window.

 

I selected members that may access the backup folder, but no message has been dispatched!

There is more than one possible source of error for this problem.
  • The administrator disabled mailing
  • The mail address of the selected member is invalid
Once a member is added to the list a new field is available in the members profile.
The member can change his password for the backup folder in this field.

top ]