Uploaded image for project: 'Website'
  1. Website
  2. WEBSITE-81

MOD validator makes MOD buggy

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Resolution: Invalid
    • MOD validator
    • None

    Description

      I'm trying to validate the following MOD [1] using the MOD validator. It gives me the error shown [2] although the code extract given together with the error does not appear in my MOD.

      [1] the MOD to be validated

      ##############################################################
      ## MOD Title&#58   Atlas MOD
      ## MOD Author&#58  jonemo < jn@jonemo.de > (Jonas Neubert) http&#58//jonemo.de
      ## MOD Description&#58
      ##   Atlas MOD extends phpBB to allow users to set his/her
      ##   geocoordinates. All user coordinates are, together with
      ##   several extra information, presented in a map. To achieve
      ##   this the API of maps.google.com is used. Contrary to
      ##   similar solutions Atlas MOD needs less server resources
      ##   and does not require the user to know his/her geocoordinates
      ##   nor a georeferencing database.
      ##
      ## MOD Version&#58 0.1.3
      ##
      ## Installation Level&#58 difficult
      ## Installation Time&#58  30 Minutes
      ## Files To Edit&#58
      ##   includes/constants.php
      ##   includes/page_header.php
      ##   includes/usercp_register.php
      ##   templates/subSilver/profile_add.tpl
      ##   admin/admin_board.php
      ##   templates/subSilver/admin/board_config_body.tpl
      ##   templates/subSilver/overall_footer.tpl
      ##   templates/subSilver/simple_footer.tpl
      ##
      ## Included Files&#58
      ##   gmap.php
      ##   includes/gmap_xml.php
      ##   includes/gmap_functions.php
      ##	 includes/atlaslib.js
      ##   templates/subSilver/gmap_view.tpl
      ##
      ## License&#58 http&#58//opensource.org/licenses/gpl-license.php GNU Public License v2
      ##############################################################
      ## For security purposes, please check&#58 http&#58//www.phpbb.com/mods/
      ## for the latest version of this MOD. Although MODs are checked
      ## before being allowed in the MODs Database there is no guarantee
      ## that there are no security problems within the MOD. No support
      ## will be given for MODs not found within the MODs Database which
      ## can be found at http&#58//www.phpbb.com/mods/
      ##############################################################
      ## Author Notes&#58
      ##
      ##  The JavaScript used within this MOD is not compatible
      ##  to the older versions of some browsers (especially IE5.0).
      ##
      ##  This MOD uses an API provided by Google. Please not that
      ##  therefore you need to register for a developer key that
      ##  only works within the URL scope of the specified directory.
      ##  To do this please visit
      ##  http&#58//www.google.com/apis/maps/signup.html. Registering
      ##  for an API key involves accepting the Terms of Use set by
      ##  Google.
      ##
      ##  As the Google API is in a beta state and will change frequently
      ##  this MOD may change behaviour or brake unpredictabily.
      ##
      ##  Please note furthermore that this MOD will not work in a
      ##  local testing environment unless this is connected to the
      ##  internet and that you will need seperate API keys for
      ##  your testing and productive environments.
      ##
      ##############################################################
      ## MOD History&#58
      ##
      ##   2005-07-30 - Version 0.0.1
      ##		- users are able to set their coordinates in their profile
      ##		- configurable map
      ##		- basic "find my coordinates" function
      ##   2005-08-02 - Version 0.0.2
      ##      - bugs related to the map types removed (map types are handled as integer values now)
      ##      - user coordinates provided as XML data by includes/gmap_xml.php
      ##		- user coordinates shown in map
      ##		- map configuration via "find my coordinates" function
      ##	 2005-08-05 - Version 0.0.3
      ##		- "users on the map" shown under the map
      ##		- function "calculate_distance"
      ##	 2005-08-13 - Version 0.1.0
      ##      - extending javascript for browser compatibility
      ##      - users are clustered based on a simple statistical method
      ##   2005-09-18 - Version 0.1.1
      ##      - mistakes in the install files fixed
      ##      - javascript error message when called in an offline environment
      ##	 2005-10-10 - Version 0.1.2
      ##		- link to map in overall_header.tpl
      ##		- minor fixes
      ##   2005-10-16 - Version 0.1.3
      ##      - fixed Internet Explorer issues
      ##      - override-settings for initial map view in admin panel
      ##      - javascript moved to seperate file and converted to OOP
      ##
      ##
      ##############################################################
      ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
      ##############################################################
       
      #
      #-----[ SQL ]------------------------------------------
      #
       
      ALTER TABLE `phpbb_users` ADD `user_long` FLOAT( 6 ) NOT NULL ,
       ADD `user_lat` FLOAT( 6 ) NOT NULL;
      INSERT INTO `phpbb_config` ( `config_name` , `config_value` )
       VALUES ('gmap_start_long', '0'),
       ('gmap_start_lat', '0'),
       ('gmap_start_zoom', '11'),
       ('gmap_width', '600'),
       ('gmap_height', '450'),
       ('gmap_start_map_type', '0'),
       ('gmap_google_api_key', ''),
       ('gmap_control_glmc', 1),
       ('gmap_control_gsmc', 0),
       ('gmap_control_gszc', 0),
       ('gmap_control_gmtc', 1),
       ('gmap_override_center_to_user', 0),
       ('gmap_override_automode', 1);
       
      #
      #-----[ COPY ]------------------------------------------
      #
       
      gmap.php to gmap.php
      includes/gmap_xml.php to includes/gmap_xml.php
      includes/gmap_functions.php to includes/gmap_functions.php
      includes/atlaslib.js to includes/atlaslib.js
      templates/subSilver/gmap.tpl to templates/subSilver/gmap.tpl
      templates/subSilver/images/icon_mini_atlas.gif to templates/subSilver/images/icon_mini_atlas.gif
       
      #
      #-----[ DIY INSTRUCTIONS ]------------------------------------------
      #
       
      Sign up for a API key at http&#58//www.google.com/apis/maps/signup.html and enter YOUR key in the Database. You may do this with the following MySQL-Query&#58
      UPDATE phpbb_config SET config_value = '***putYourKeyHere***' WHERE config_name = 'gmap_google_api_key'
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      includes/usercp_register.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      'interests' => 'interests'
       
      #
      #-----[ IN-LINE AFTER, ADD ]------------------------------------------
      #
       
      , 'user_long' => 'user_long', 'user_lat' => 'user_lat'
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $avatar_sql = '';
       
      #
      #-----[ BEFORE, ADD ]------------------------------------------
      #
       
      	// Begin Atlas Mod
       
      	if ( $user_long != '' )
      	{
      		if ( strpos($user_long, ',') === FALSE )
      			$user_long = str_replace(',', '.', $user_long);
       
      		if ( !is_numeric($user_long) )
      			$user_long = '';
      	}
       
      	if ( $user_lat != '' )
      	{
      		if ( strpos($user_lat, ',') === FALSE )
      			$user_lat = str_replace(',', '.', $user_lat);
       
      		if ( !is_numeric($user_lat) )
      			$user_lat = '';
      	}
       
      	// End Atlas Mod
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      " . $avatar_sql . "
       
      #
      #-----[ IN-LINE BEFORE, ADD ]------------------------------------------
      #
       
      , user_long = '" . str_replace("\'", "''", $user_long) . "', user_lat = '" . str_replace("\'", "''", $user_lat) . "'
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      user_style, user_level, user_allow_pm,
       
      #
      #-----[ IN-LINE AFTER, ADD ]------------------------------------------
      #
       
       user_long, user_lat,
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      ', $user_style, 0, 1,
       
      #
      #-----[ IN-LINE AFTER, ADD ]------------------------------------------
      #
       
       '" . str_replace("\'", "''", $user_long) . "', '" . str_replace("\'", "''", $user_lat) . "',
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $user_dateformat = $userdata['user_dateformat'];
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      	// Begin Atlas Mod
      	$user_long = $userdata['user_long'];
      	$user_lat = $userdata['user_lat'];
      	// End Atlas Mod
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $lang['Confirm_code_explain'],
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      		// Begin Atlas Mod
      		'L_GMAP' => $lang['GMap'],
      		'L_GMAP_FIND_COORDINATES' => $lang['GMap_find_coordinates'],
      		'L_GMAP_LATITUDE' => $lang['GMap_latitude'],
      		'L_GMAP_LONGITUDE' => $lang['GMap_longitude'],
      		'LONGITUDE' => $user_long,
      		'LATITUDE' => $user_lat,
      		'U_GMAP_FIND_COORDINATES' => append_sid($phpbb_root_path . 'gmap.' . $phpEx . '?mode=findcoords'),
      		// End Atlas Mod
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      templates/subSilver/profile_add_body.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      <th class="thSides" colspan="2" height="25" valign="middle">{L_PREFERENCES}</th>
       
      #
      #-----[ BEFORE, ADD ]------------------------------------------
      #
      	  <th class="thSides" colspan="2" height="25" valign="middle">{L_GMAP}</th>
      	</tr>
      	<tr>
      	  <td class="row1"><span class="gen">{L_GMAP_LONGITUDE}&#58</span></td>
      	  <td class="row2">
      		<input type="text" class="post" style="width&#58 200px" name="user_long" id="user_long" size="35" maxlength="10" value="{LONGITUDE}" />
      	  </td>
      	</tr>
      	<tr>
      	  <td class="row1"><span class="gen">{L_GMAP_LATITUDE}&#58</span></td>
      	  <td class="row2">
      		<input type="text" class="post" style="width&#58 200px" name="user_lat" id="user_lat" size="35" maxlength="10" value="{LATITUDE}" />&nbsp;<a href="{U_GMAP_FIND_COORDINATES}" onclick="window.open('{U_GMAP_FIND_COORDINATES}', '_phpbbsmilies', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=750');return false;" target="_phpbbsmilies" class="nav">{L_GMAP_FIND_COORDINATES}</a>
      	  </td>
      	</tr>
      	<tr>
      	  <td class="catSides" colspan="2" height="28">&nbsp;</td>
      	</tr>
      	<tr>
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      template/subsilver/admin/board_config_body.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      <th class="thHead" colspan="2">{L_COPPA_SETTINGS}</th>
       
      #
      #-----[ BEFORE, ADD ]------------------------------------------
      #
       
      		<th class="thHead" colspan="2">{L_GMAP_SETTINGS}</th>
      	</tr>
      	<tr>
      		<td class="row1">{L_GOOGLE_API_KEY}<br /><span class="gensmall">{L_GOOGLE_API_KEY_EXPLAIN}</span></td>
      		<td class="row2"><input type="text" name="gmap_google_api_key" size="20" value="{GOOGLE_API_KEY}" />&nbsp;&nbsp;<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /></td>
      	</tr>
      	<tr>
      		<td class="row1">{L_GMAP_SIZE} <br />
      			<span class="gensmall">{L_GMAP_SIZE_EXPLAIN}</span>
      		</td>
      		<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="gmap_height" value="{GMAP_HEIGHT}" /> x <input class="post" type="text" size="3" maxlength="4" name="gmap_width" value="{GMAP_WIDTH}"></td>
      	</tr>
      	<tr>
      		<td class="row2" colspan="2">
      			<span class="gensmall">{L_GMAP_FINDCOORDS_EXPLAIN}</span><br />
      			<a href="{U_GMAP_FIND_COORDINATES}" onclick="window.open('{U_GMAP_FIND_COORDINATES}', '_gmapfindcoords', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=750');return false;" target="_gmapfindcoords" class="nav">{L_GMAP_FIND_COORDINATES}</a>
      		</td>
      	</tr>
      	<tr>
      		<td class="row1">{L_GMAP_STARTPOINT} <br />
      			<span class="gensmall">{L_GMAP_STARTPOINT_EXPLAIN}</span>
      		</td>
      		<td class="row2"><input class="post" type="text" size="7" maxlength="10" name="gmap_start_long" id="user_long" value="{GMAP_START_LONG}" />, <input class="post" type="text" size="7" maxlength="10" name="gmap_start_lat" id="user_lat" value="{GMAP_START_LAT}"></td>
      	</tr>
      	<tr>
      		<td class="row1">{L_GMAP_ZOOM} <br />
      			<span class="gensmall">{L_GMAP_ZOOM_EXPLAIN}</span>
      		</td>
      		<td class="row2"><input class="post" type="text" size="3" maxlength="2" name="gmap_start_zoom" id="gmap_zoom" value="{GMAP_START_ZOOM}" /></td>
      	</tr>
      	<tr>
      		<td class="row1">{L_GMAP_START_MODE} <br />
      			<span class="gensmall">{L_GMAP_START_MODE_EXPLAIN}</span>
      		</td>
      		<td class="row2"><input class="post" type="text" size="3" maxlength="2" name="gmap_start_map_type" id="gmap_start_mode" value="{GMAP_START_MODE}" /></td>
      	</tr>
       
      	<tr>
      		<td class="row2" colspan="2">
      			<span class="gensmall">{L_OVERRIDE_INIT}</span>
      		</td>
      	</tr>
      	<tr>
      		<td class="row1" valign="top">{L_OVERRIDE_CENTER_TO_USER} <br />
      			<span class="gensmall">{L_OVERRIDE_CENTER_TO_USER_EXPLAIN}</span>
      		</td>
      		<td class="row2">
      			<input type="radio" name="gmap_override_center_to_user" value="1" {S_GMAP_OVVERRIDE_CTU_YES} /> {L_ENABLED} <input type="radio" name="gmap_override_center_to_user" value="0" {S_GMAP_OVVERRIDE_CTU_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr>
      		<td class="row1" valign="top">{L_OVERRIDE_AUTOMODE} <br />
      			<span class="gensmall">{L_OVERRIDE_AUTOMODE_EXPLAIN}</span>
      		</td>
      		<td class="row2">
      			<input type="radio" name="gmap_override_automode" value="1" {S_GMAP_OVERRIDE_AUTOMODE_YES} /> {L_ENABLED} <input type="radio" name="gmap_override_automode" value="0" {S_GMAP_OVERRIDE_AUTOMODE_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr><td class="row2" colspan="2"></td></tr>
      	<tr>
      		<td class="row1" rowspan="4" valign="top">{L_GMAP_CONTROLS} <br />
      			<span class="gensmall">{L_GMAP_CONTROLS_EXPLAIN}</span>
      		</td>
      		<td class="row2">
      			{L_GMAP_GLMC} <br />
      			<input type="radio" name="gmap_control_glmc" value="1" {S_GMAP_GLMC_YES} /> {L_ENABLED} <input type="radio" name="gmap_control_glmc" value="0" {S_GMAP_GLMC_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr>
      		<td class="row2">
      			{L_GMAP_GSMC}<br />
      			<input type="radio" name="gmap_control_gsmc" value="1" {S_GMAP_GSMC_YES} /> {L_ENABLED} <input type="radio" name="gmap_control_gsmc" value="0" {S_GMAP_GSMC_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr>
      		<td class="row2">
      			{L_GMAP_GSZC}<br />
      			<input type="radio" name="gmap_control_gszc" value="1" {S_GMAP_GSZC_YES} /> {L_ENABLED} <input type="radio" name="gmap_control_gszc" value="0" {S_GMAP_GSZC_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr>
      		<td class="row2">
      			{L_GMAP_GMTC}<br />
      			<input type="radio" name="gmap_control_gmtc" value="1" {S_GMAP_GMTC_YES} /> {L_ENABLED} <input type="radio" name="gmap_control_gmtc" value="0" {S_GMAP_GMTC_NO} /> {L_DISABLED}
      		</td>
      	</tr>
      	<tr>
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      admin/admin_board.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" &#58 "";
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      // Begin Atlas Mod
      $gmap_control_glmc_yes = ( $new['gmap_control_glmc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_glmc_no  = ( !$new['gmap_control_glmc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gsmc_yes = ( $new['gmap_control_gsmc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gsmc_no  = ( !$new['gmap_control_gsmc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gszc_yes = ( $new['gmap_control_gszc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gszc_no  = ( !$new['gmap_control_gszc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gmtc_yes = ( $new['gmap_control_gmtc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_control_gmtc_no  = ( !$new['gmap_control_gmtc'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_override_ctu_yes  = ( $new['gmap_override_center_to_user'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_override_ctu_no  = ( !$new['gmap_override_center_to_user'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_override_automode_yes  = ( $new['gmap_override_automode'] ) ? "checked=\"checked\"" &#58 "";
      $gmap_override_automode_no  = ( !$new['gmap_override_automode'] ) ? "checked=\"checked\"" &#58 "";
      // End Atlas Mod
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      "L_RESET" => $lang['Reset'],
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      	// Begin Atlas Mod
      	"L_GMAP_SETTINGS" => $lang['GMap_settings'],
      	"L_GOOGLE_API_KEY" => $lang['GMap_google_api_key'],
      	"L_GOOGLE_API_KEY_EXPLAIN" => $lang['GMap_google_api_key_explain'],
      	"L_GMAP_SIZE" => $lang['GMap_size'],
      	"L_GMAP_SIZE_EXPLAIN" => $lang['GMap_size_explain'],
      	"L_GMAP_FINDCOORDS_EXPLAIN" => $lang['GMap_find_coordinates_admin_explain'],
      	"L_GMAP_STARTPOINT" => $lang['GMap_starting_point'],
      	"L_GMAP_STARTPOINT_EXPLAIN" => $lang['GMap_starting_point_explain'],
      	"L_GMAP_FIND_COORDINATES" => $lang['GMap_find_coordinates'],
      	"U_GMAP_FIND_COORDINATES" => append_sid($phpbb_root_path . 'gmap.' . $phpEx . '?mode=findcoords'),
      	"L_GMAP_ZOOM" => $lang['GMap_zoom'],
      	"L_GMAP_ZOOM_EXPLAIN" => $lang['GMap_zoom_explain'],
      	"L_GMAP_START_MODE" => $lang['GMap_start_mode'],
      	"L_GMAP_START_MODE_EXPLAIN" => $lang['GMap_start_mode_explain'],
      	"L_GMAP_CONTROLS" => $lang['GMap_controls'],
      	"L_GMAP_CONTROLS_EXPLAIN" => $lang['GMap_controls_explain'],
      	"L_GMAP_GLMC" => $lang['GMap_control_glmc'],
      	"L_GMAP_GSMC" => $lang['GMap_control_gsmc'],
      	"L_GMAP_GSZC" => $lang['GMap_control_gszc'],
      	"L_GMAP_GMTC" => $lang['GMap_control_gmtc'],
      	"L_OVERRIDE_INIT" => $lang['GMap_Initial_Settings_Explain'],
      	"L_OVERRIDE_CENTER_TO_USER" => $lang['GMap_Override_init_zoom_to_user'],
      	"L_OVERRIDE_CENTER_TO_USER_EXPLAIN" => $lang['GMap_Override_init_zoom_to_user_explain'],
      	"L_OVERRIDE_AUTOMODE" => $lang['GMap_Override_init_to_auto'],
      	"L_OVERRIDE_AUTOMODE_EXPLAIN" => $lang['GMap_Override_init_to_auto_explain'],
       
      	"GOOGLE_API_KEY" => $new['gmap_google_api_key'],
      	"GMAP_WIDTH" => $new['gmap_width'],
      	"GMAP_HEIGHT" => $new['gmap_height'],
      	"GMAP_START_LONG" => $new['gmap_start_long'],
      	"GMAP_START_LAT" => $new['gmap_start_lat'],
      	"GMAP_START_ZOOM" => $new['gmap_start_zoom'],
      	"GMAP_START_MODE" => $new['gmap_start_map_type'],
      	"S_GMAP_GLMC_YES" => $gmap_control_glmc_yes,
      	"S_GMAP_GLMC_NO" => $gmap_control_glmc_no,
      	"S_GMAP_GSMC_YES" => $gmap_control_gsmc_yes,
      	"S_GMAP_GSMC_NO" => $gmap_control_gsmc_no,
      	"S_GMAP_GSZC_YES" => $gmap_control_gszc_yes,
      	"S_GMAP_GSZC_NO" => $gmap_control_gszc_no,
      	"S_GMAP_GMTC_YES" => $gmap_control_gmtc_yes,
      	"S_GMAP_GMTC_NO" => $gmap_control_gmtc_no,
      	"S_GMAP_OVVERRIDE_CTU_YES" => $gmap_override_ctu_yes,
      	"S_GMAP_OVVERRIDE_CTU_NO" => $gmap_override_ctu_no,
      	"S_GMAP_OVERRIDE_AUTOMODE_YES" => $gmap_override_automode_yes,
      	"S_GMAP_OVERRIDE_AUTOMODE_NO" => $gmap_override_automode_no,
      	// End Atlas Mod
       
      #
      #-----[ OPEN ]------------------------------------------
      #
      # You may have to make similar changes as the following in other language files as well
      #
       
      language/lang_english/lang_main.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      // Begin Atlas Mod
      $lang['GMap'] = 'Map';
      //errors
      $lang['GMap_not_compatible'] = 'Your browser is not compatible with the map. Please use a recent version of Firefox/Mozilla, IE 5.5+ or Safari 1.2+.';
      $lang['GMap_Please_log_in'] = '<strong>Please log in to see the users\' coordinates.</strong>';
      $lang['GMap_called_offline'] = 'The Google API could not be called. Make sure that you call this page only if a online connection exists.';
      $lang['GMap_settings'] = 'Map Settings';
      $lang['GMap_find_coordinates'] = 'Find your Coordinates';
      $lang['GMap_find_coordinates_explain'] = 'Please locate your location on the map as close as possible and select <em>choose this as my location</em> from the context menu.';
      $lang['GMap_set_this_location'] = 'set this as my location';
      $lang['GMap_latitude'] = 'Latitude';
      $lang['GMap_longitude'] = 'Longitude';
      $lang['GMap_distance'] = 'Distance';
      $lang['GMap_your_location'] = 'Your Location';
      $lang['GMap_Distance_to_xyz'] = 'Distance to &ldquo;%s&rdquo;';
      // admin
      $lang['GMap_Initial_Settings_Explain'] = 'Above you set the default values for the initial map view. You can override these settings for these two cases&#58';
      $lang['GMap_Override_init_zoom_to_user'] = 'Center on user';
      $lang['GMap_Override_init_zoom_to_user_explain'] = 'The map will be centered to the user viewing it but the default zoom value and the default map type are kept. If Anonymous views the map defaults apply.';
      $lang['GMap_Override_init_to_auto'] = 'Auto-Modus';
      $lang['GMap_Override_init_to_auto_explain'] = 'This will determine the map view that shows all users at once but the default map type will be kept. This only works if there is more than one &ldquo;bubble&rdquo; on the map.';
      $lang['GMap_find_coordinates_admin_explain'] = 'The following settings can be set using the  <em>' . $lang['GMap_find_coordinates'] . '</em> function. The following link will open a map in a new browser window. The zoom factor and the map type will be set as default values. If a coordinate is selected, this will be set as <em>Starting Point</em>.';
      $lang['GMap_starting_point'] = 'Starting Point';
      $lang['GMap_starting_point_explain'] = 'The place where the map will be centered to at the beginning. (Longitude, Latitude)<br />Use the <em>Find your Coordinates</em> function to find the coordinates of a place.';
      $lang['GMap_size'] = 'Map Size';
      $lang['GMap_size_explain'] = 'Height x Width in pixels';
      $lang['GMap_zoom'] = 'Map Zoom';
      $lang['GMap_zoom_explain'] = 'The zoom level of the map at the beginning. <br />Use the <em>Find your Coordinates</em> which will automatically set the zoom level.';
      $lang['GMap_start_mode'] = 'Start Mode<br />0 = Map, 1 = Satellite, 2 = Hybrid';
      $lang['GMap_start_mode_explain'] = 'The mapping mode in which the map will be initialized.';
      $lang['GMap_google_api_key'] = 'Google API Key';
      $lang['GMap_google_api_key_explain'] = 'The key that allows you to use the Google API. You can get your key <a href="http&#58//www.google.com/apis/maps/signup.html">here</a>. After setting this key you have to save these setting first before you can use the <em>Find your Coordinates</em> function below.';
      $lang['GMap_controls'] = 'Map Controls';
      $lang['GMap_controls_explain'] = 'You can set which controls (pan, zoom, etc.) are shown on the map.<br />
      <em>Large Map Control</em> is a relatively big set of controls as on Google Maps,<br />
      <em>Small Map Control</em> is a smaller set of controls as on Google Local,<br />
      <em>Small Zoom Control</em> only contains a control for zooming<br />
      <em>Map Type Control</em> allows to switch between different modes such as Map or Satellite.';
      $lang['GMap_control_glmc'] = 'Large Map Control';
      $lang['GMap_control_gsmc'] = 'Small Map Control';
      $lang['GMap_control_gszc'] = 'Small Zoom Control';
      $lang['GMap_control_gmtc'] = 'Map Type Control';
      // End Atlas Mod
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      templates/subSilver/profile_view_body.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      <td><b><span class="gen">{LOCATION}</span></b></td>
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      		<!-- BEGIN switch_show_distance -->
      		</tr>
      		<tr>
      			<td></td>
      			<td><a href="{U_MAP_DISTANCE}" class="genmed">{L_DISTANCE}&#58 {DISTANCE}</a></td>
      		<!-- END switch_show_distance -->
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      includes/usercp_viewprofile.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      // Begin AtlasMod
      if (is_numeric($profiledata['user_long']) && is_numeric($profiledata['user_lat']))
      {
      	include_once($phpbb_root_path . 'includes/gmap_functions.php');
      	$distance = calculate_distance($userdata['user_long'], $userdata['user_lat'], $profiledata['user_long'], $profiledata['user_lat']) . ' km';
      	$distance_link = append_sid($phpbb_root_path. 'gmap.php?mode=distance&u=' . $profiledata['user_id']);
       
      	$template->assign_block_vars('switch_show_distance', array());
      }
      // End AtlasMod
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . $u_search_author),
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      	// Begin Atlas Mod
      	'DISTANCE' => $distance,
      	'L_DISTANCE' => $lang['GMap_distance'],
      	'U_MAP_DISTANCE' => $distance_link,
      	// End Atlas Mod
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      includes/constants.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      define('PAGE_TOPIC_OFFSET', 5000);
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
      define('PAGE_GMAP', -2000);
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      includes/page_header.php
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      'T_SPAN_CLASS3' => $theme['span_class3'],
       
      #
      #-----[ AFTER, ADD ]------------------------------------------
      #
       
        // Begin Atlas Mod
        'U_ATLAS' => append_sid($phpbb_root_path . 'gmap.php?mode=viewmap'),
        'L_ATLAS' => $lang['GMap'],
        // End Atlas Mod
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      templates/subSilver/overall_header.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp;
       
      #
      #-----[ IN-LINE AFTER, ADD ]------------------------------------------
      #
      # Take care with the whitespaces here!
      #
       
       &nbsp;<a href="{U_ATLAS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_atlas.gif" width="12" height="13" border="0" alt="{L_ATLAS}" hspace="3" />{L_ATLAS}</a>&nbsp;
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      templates/subSilver/overall_footer.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      </body>
       
      #
      #-----[ BEFORE, ADD ]------------------------------------------
      #
       
      <!-- BEGIN atlasmod -->
      	<script src="{U_PATH_TO_ATLAS_LIB_JS}" type="text/javascript"></script>
       
      	<script type="text/javascript">
      	//<![CDATA[
       
      	// do some config-setting
      	var U_XML_ADRESS = '{U_XML_ADRESS}';
      	var U_PROFILE_G = '{U_PROFILE_G}';
      	var LONGITUDE = '{LONGITUDE}';
      	var LATITUDE =  '{LATITUDE}';
      	var L_USERNAME =  '{L_USERNAME}';
      	var L_DISTANCE =  '{L_DISTANCE}';
       
      	var map;
       
      	window.onload = function ()
      	{
      		// check if page is called in offline environment
      		try
      		{
      			GBrowserIsCompatible();
      		}
      		catch (Error)
      		{
      			alert('{L_CALLED_OFFLINE}');
      		}
       
      		// now the part begins, where actually something happens
      		if (GBrowserIsCompatible()) {
      			if ("{MODUS}" == '')
      				var modus = 1;
      			else
      				var modus = parseFloat("{MODUS}");
       
      		var a=document.getElementById("map");
       
      		// IE 5.5 HACK (GOOGLE STILL WORKING ON FIX AS OF 7/16/05
      		if (navigator.appVersion.indexOf("MSIE 5.5")!=-1)
      		        a.ownerDocument=document;
       
      		map = new GMap(a);
       
      			initMap ('{START_LONG}', '{START_LAT}', '{START_ZOOM_LEVEL}', '{START_MAP_TYPE}', '{CONTROL_GLMC}', '{CONTROL_GSMC}', '{CONTROL_GSZC}', '{CONTROL_GMTC}', new GPoint('{START_MIN_LONG}', '{START_MIN_LAT}'), new GPoint('{START_MAX_LONG}', '{START_MAX_LAT}'));
       
      			if (modus == 1) map.prepareForViewMap();
      			if (modus == 2) map.prepareForShowDistance("{PID}", "{P_LONGITUDE}", "{P_LATITUDE}", "{P_USERNAME}");
      			if (modus == 3) map.prepareForFindCoords('{L_LONGITUDE}', '{L_LATITUDE}', '{L_CHOOSE_THIS}');
       
       
      		}
      		else
      		{
      			alert('{L_GMAP_NOT_COMPATIBLE}');
      		}
      	}
      	//]]>
      	</script>
      <!-- END atlasmod -->
       
      #
      #-----[ OPEN ]------------------------------------------
      #
       
      templates/subSilver/simple_footer.tpl
       
      #
      #-----[ FIND ]------------------------------------------
      #
       
      </body>
       
      #
      #-----[ BEFORE, ADD ]------------------------------------------
      #
       
      <!-- BEGIN atlasmod -->
      	<script src="{U_PATH_TO_ATLAS_LIB_JS}" type="text/javascript"></script>
       
      	<script type="text/javascript">
      	//<![CDATA[
       
      	// do some config-setting
      	var U_XML_ADRESS = '{U_XML_ADRESS}';
      	var U_PROFILE_G = '{U_PROFILE_G}';
      	var LONGITUDE = '{LONGITUDE}';
      	var LATITUDE =  '{LATITUDE}';
      	var L_USERNAME =  '{L_USERNAME}';
      	var L_DISTANCE =  '{L_DISTANCE}';
       
      	var map;
       
      	window.onload = function ()
      	{
      		// check if page is called in offline environment
      		try
      		{
      			GBrowserIsCompatible();
      		}
      		catch (Error)
      		{
      			alert('{L_CALLED_OFFLINE}');
      		}
       
      		// now the part begins, where actually something happens
      		if (GBrowserIsCompatible()) {
      			if ("{MODUS}" == '')
      				var modus = 1;
      			else
      				var modus = parseFloat("{MODUS}");
       
      		var a=document.getElementById("map");
       
      		// IE 5.5 HACK (GOOGLE STILL WORKING ON FIX AS OF 7/16/05
      		if (navigator.appVersion.indexOf("MSIE 5.5")!=-1)
      		        a.ownerDocument=document;
       
      		map = new GMap(a);
       
      			initMap ('{START_LONG}', '{START_LAT}', '{START_ZOOM_LEVEL}', '{START_MAP_TYPE}', '{CONTROL_GLMC}', '{CONTROL_GSMC}', '{CONTROL_GSZC}', '{CONTROL_GMTC}', new GPoint('{START_MIN_LONG}', '{START_MIN_LAT}'), new GPoint('{START_MAX_LONG}', '{START_MAX_LAT}'));
       
      			if (modus == 1) map.prepareForViewMap();
      			if (modus == 2) map.prepareForShowDistance("{PID}", "{P_LONGITUDE}", "{P_LATITUDE}", "{P_USERNAME}");
      			if (modus == 3) map.prepareForFindCoords('{L_LONGITUDE}', '{L_LATITUDE}', '{L_CHOOSE_THIS}');
       
       
      		}
      		else
      		{
      			alert('{L_GMAP_NOT_COMPATIBLE}');
      		}
      	}
      	//]]>
      	</script>
      <!-- END atlasmod -->
       
      #
      #-----[ DIY INSTRUCTIONS ]------------------------------------------
      #
       
      Nothing will work before you have not checked the Adminpanel "General Configuration" page and
      at least one user (i.e. you yourself) has set his/her coordinates via the "Profile".
       
      #
      #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
      #
      # EoM

      [2] The error given

      Unauthorised usage of COPY tag syntax

      #
      #----[ COPY ]-----------------------------------------
      #

      ALTER TABLE `phpbb_users` ADD `user_long` FLOAT( 6 ) NOT NULL ,
      ADD `user_lat` FLOAT( 6 ) NOT NULL;
      INSERT INTO `phpbb_config` ( `config_name` , `config_value` )
      VALUES ('gmap_start_long', '0'),
      ('gmap_start_lat', '0'),
      ('gmap_start_zoom', '11'),
      ('gmap_width', '600'),
      ('gmap_height', '450'),
      ('gmap_start_map_type', '0'),
      ('gmap_google_api_key', ''),
      ('gmap_control_glmc', 1),
      ('gmap_control_gsmc', 0),
      ('gmap_control_gszc', 0),
      ('gmap_control_gmtc', 1),
      ('gmap_override_center_to_user', 0),
      ('gmap_override_automode', 1);

      gmap.php to gmap.php
      includes/gmap_xml.php to includes/gmap_xml.php
      includes/gmap_functions.php to includes/gmap_functions.php
      includes/atlaslib.js to includes/atlaslib.js
      templates/subSilver/gmap.tpl to templates/subSilver/gmap.tpl
      templates/subSilver/images/icon_mini_atlas.gif to templates/subSilver/images/icon_mini_atlas.gif

      Attachments

        Activity

          People

            Unassigned Unassigned
            jonemo jonemo [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: