23 พฤษภาคม 2555, 12:47:01
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: GoogleMemberMap แสดงตำแหน่งที่อยู่ของสมาชิกใน SMF  (อ่าน 1962 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Google Member Map
  • ผู้เขียน: Spuds
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 30 ธันวาคม 2553
  • ต้นฉบับ: Google Member Map

รายละเอียด
      แสดงตำแหน่งที่อยู่ของสมาชิกภายในบอร์ดเรา หากสมาชิกนั้นได้ปักหมุดตำแหน่งของตัวเองไว้ในข้อมูลส่วนตัวของแต่ละคน เราก็สามารถดูได้จาก Google map ว่าใคร? อยู่ที่ใหน? แจ่มดีครับ

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'membergroups' => array('ManageMembergroups.php', 'ModifyMembergroups'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googlemap' => array('GoogleMap.php', 'Map'),
'membermap' => array('GoogleMap.php', 'Map'),

ค้นหา -->>
โค๊ด: [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'.kml' => array('GoogleMap.php', 'ShowKML'),

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
'post_group' => $profile['post_group'],
'post_group_color' => $profile['post_group_color'],
'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" border="0" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap' => array(
'latitude' => $profile['latitude'],
'longitude' => $profile['longitude'],
),

ค้นหา -->>
โค๊ด: [Select]
mem.buddy_list, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,

แก้เป็น -->>
โค๊ด: [Select]
mem.buddy_list, mem.latitude, mem.longitude, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,

ค้นหา -->>
โค๊ด: [Select]
mem.notifyTypes, lo.url, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,

แก้เป็น -->>
โค๊ด: [Select]
mem.notifyTypes, mem.latitude, mem.longitude, lo.url, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,

file $sourcedir/ManagePermissions.php

ค้นหา -->>
โค๊ด: [Select]
'view_mlist' => false,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap_view' => false,
'googleMap_place' => false,

ค้นหา -->>
โค๊ด: [Select]
'profile_server_avatar',
'profile_upload_avatar',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap_view',
'googleMap_place',

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
$context['sub_template'] = 'show_settings';

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googlemap' => 'ModifyGoogleMapSettings',

ค้นหา -->>
โค๊ด: [Select]
'karma' => array(
'title' => $txt['smf293'],
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
'is_last' => true,
),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'googlemap' => array(
'title' => $txt['googleMapFO'],
'href' => $scripturl . '?action=featuresettings;sa=googlemap;sesc=' . $context['session_id'],
),

ค้นหา -->>
โค๊ด: [Select]
// This function basically just redirects to the right save function.
function ModifyFeatureSettings2()
{
global $context, $txt, $scripturl, $modSettings, $sourcedir;

isAllowedTo('admin_forum');
loadLanguage('ModSettings');

// Quick session check...
checkSession();

require_once($sourcedir . '/ManageServer.php');

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'karma' => 'ModifyKarmaSettings',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googlemap' => 'ModifyGoogleMapSettings',

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function ModifyGoogleMapSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(
// Map - On or off?
array('check', 'googleMapsEnable'),
array('check', 'googleMapsEnableLegend'),
'',
// Key, pins static/gender/membergroup
array('text', 'googleMapsKey'),
array('check', 'googleMapsPinGender'),
array('check', 'KMLoutput_enable'),
array('int', 'googleMapsPinNumber'),
            array('select', 'googleMapsType', array('G_NORMAL_MAP' => 'Map', 'G_SATELLITE_MAP' => 'Satellite', 'G_HYBRID_MAP' => 'Hybrid')),
            array('select', 'googleSidebar', array('No Sidebar', 'Sidebar Right')),
        '',
            // Default Location/Zoom
            array('float', 'googleMapsDefaultLat', '25'),
            array('float', 'googleMapsDefaultLong', '25'),
            array('int', 'googleMapsDefaultZoom'),
        '',
            // Clustering Options
            array('check', 'googleMapsEnableClusterer'),
            array('int', 'googleMapsMinMarkerCluster'),
            array('int', 'googleMapsMaxVisMarker'),
            array('int', 'googleMapsMaxNumClusters'),
            array('int', 'googleMapsMaxLinesCluster'),
           
);

// Saving?
if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=featuresettings;sa=googlemap');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=googlemap';
$context['settings_title'] = $txt['googleMapFO'];

prepareDBSettingContext($config_vars);
}

file $sourcedir/Profile.php

ค้นหา -->>
โค๊ด: [Select]
'website' => array(
'title' => !isset($user_profile[$memID]['websiteTitle']) ? '' : $user_profile[$memID]['websiteTitle'],
'url' => !isset($user_profile[$memID]['websiteUrl']) ? '' : $user_profile[$memID]['websiteUrl'],
),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap' => array(
'latitude' => !isset($user_profile[$memID]['latitude']) ? '' : $user_profile[$memID]['latitude'],
'longitude' => !isset($user_profile[$memID]['longitude']) ? '' : $user_profile[$memID]['longitude'],
),

ค้นหา -->>
โค๊ด: [Select]
// Fix the spaces in messenger screennames...
$fix_spaces = array('MSN', 'AIM', 'YIM');
foreach ($fix_spaces as $var)
{
// !!! Why?
if (isset($_POST[$var]))
$_POST[$var] = strtr($_POST[$var], ' ', '+');
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (isset($_POST['latitude']))
$profile_vars['latitude'] = $_POST['latitude'] != '' ? $_POST['latitude'] : 'NULL';
if (isset($_POST['longitude']))
$profile_vars['longitude'] = $_POST['longitude'] != '' ? $_POST['longitude'] : 'NULL';

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

แก้เป็น -->>
โค๊ด: [Select]
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

ค้นหา -->>
โค๊ด: [Select]
if ($context['current_action'] == 'search2')
$current_action = 'search';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if ($context['current_action'] == 'googlemap')
$current_action = 'googlemap';

ค้นหา -->>
โค๊ด: [Select]
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Google Maps Mod
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view')))
echo ($current_action == 'googlemap' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'googlemap' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=googlemap">' , $txt['googleMap'] , '</a>
</td>' , $current_action == 'googlemap' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
// Now print the second column where the members avatar/text is shown.
echo '
<td class="windowbg" valign="middle" align="center" width="150">
', $context['member']['avatar']['image'], '<br /><br />
', $context['member']['blurb'], '
</td>
</tr>';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view'))) {
if(isset($context['member']['googleMap']['latitude']) && isset($context['member']['googleMap']['longitude'])) {
echo '
<tr>
<td class="windowbg" colspan="2">
<script src="http://maps.google.com/maps?file=api&v=2&key=' . $modSettings['googleMapsKey'] . '" type="text/javascript"></script>
<div id="map" style="width: 600px; height: 350px; color: #000000;"></div>
<input type="hidden" name="latitude" size="50" value="', $context['member']['googleMap']['latitude'], '" />
<input type="hidden" name="longitude" size="50" value="', $context['member']['googleMap']['longitude'], '" />
<script type="text/javascript">';

//Evil hack on this!!!
        echo '
//' . chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);

echo "
function LoadMap() {
var map = new GMap2(document.getElementById(\"map\"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(" . $context['member']['googleMap']['latitude'] . "," . $context['member']['googleMap']['longitude'] . "), 13, ". $modSettings['googleMapsType'] .");
var point = new GLatLng(" . $context['member']['googleMap']['latitude'] . "," . $context['member']['googleMap']['longitude'] . ");
var marker = new GMarker(point);
map.addOverlay(marker);
}

if (GBrowserIsCompatible()) {
window.onload=LoadMap;
}";
//Lets make another evil hack!
echo '
//' . chr(93) . chr(93) . chr(62);
echo "
            </script>
</td>
</tr>";
}
}

ค้นหา -->>
โค๊ด: [Select]
<td>
', $modSettings['karmaApplaudLabel'], ' <input type="text" name="karmaGood" size="4" value="', $context['member']['karma']['good'], '" onchange="setInnerHTML(document.getElementById(\'karmaTotal\'), this.value - this.form.karmaBad.value);" style="margin-right: 2ex;" /> ', $modSettings['karmaSmiteLabel'], ' <input type="text" name="karmaBad" size="4" value="', $context['member']['karma']['bad'], '" onchange="this.form.karmaGood.onchange();" /><br />
(', $txt[94], ': <span id="karmaTotal">', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</span>)
</td>
</tr>';
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]

//Google Map Member Map
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_place'))) {
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td class="windowbg2" colspan="2" align="center">
    <style type="text/css">
      @import url("http://www.google.com/uds/css/gsearch.css");
      @import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
     #map input, textarea {background-color: #ffffff;}
    </style>
<script src="http://maps.google.com/maps?file=api&v=2&key=' . $modSettings['googleMapsKey'] . '" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type="text/javascript"></script>
<a name="googlemap"><div id="map" style="width: 600px; height: 350px; color: #000000;" align="center"></div></a>
<div id="message" align="center">', $txt['googleMapPleaseClick'], '</div>
                <div id="disclaimer" align="center">', $txt['googleMapDisclaimer'] ,'</div>

<input type="hidden" name="latitude" id="latitude" size="50" value="', $context['member']['googleMap']['latitude'], '" />
<input type="hidden" name="longitude" id="longitude" size="50" value="', $context['member']['googleMap']['longitude'], '" />
<script type="text/javascript">';
//Evil hack on this!!!
        echo '
//' . chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);

echo "
function LoadMap() {
var map = new GMap2(document.getElementById(\"map\"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var options = {suppressInitialResultSelection : true, resultList : google.maps.LocalSearch.RESULT_LIST_SUPPRESS};
map.addControl(new google.maps.LocalSearch(options), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)));";

      if (isset($context['member']['googleMap']['longitude']) && isset($context['member']['googleMap']['latitude']) && !empty($context['member']['googleMap']['longitude']) && !empty($context['member']['googleMap']['latitude'])) {
echo "
map.setCenter(new GLatLng(" . $context['member']['googleMap']['latitude'] . "," . $context['member']['googleMap']['longitude'] . "), 13, " . $modSettings['googleMapsType'] . ");
var point = new GLatLng(" . $context['member']['googleMap']['latitude'] . "," . $context['member']['googleMap']['longitude'] . ");
var marker = new GMarker(point);
map.addOverlay(marker);";
} else {
        echo "
map.setCenter(new GLatLng(0,0), 1, G_NORMAL_MAP);";
}

echo "
GEvent.addListener(map, 'click', function(overlay, point) {
if (overlay) {
map.clearOverlays();
document.getElementById(\"latitude\").value = \"\";
document.getElementById(\"longitude\").value = \"\";
} else if (point) {
map.clearOverlays();
map.addOverlay(new GMarker(point));
map.panTo(point);
document.getElementById(\"latitude\").value = point.y;
document.getElementById(\"longitude\").value = point.x;
}
});
}

if (GBrowserIsCompatible()) {
window.onload=LoadMap;
}";

        //Lets make another evil hack!
        echo '
//' . chr(93) . chr(93) . chr(62);

echo "
</script>
</td>
</tr>";
}

file $themedir/languages/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
global $scripturl;
$txt['googleMap'] = 'Member Map';
$txt['googleMappinned'] = 'Pinned Member\'s';
$txt['googleMapc'] = 'Member Map Mod by <a href="http://www.gamerzgarage.com/">brianjw</a>';
$txt['googleMapGreenPinGD'] = 'Someones Pin';
$txt['googleMapGreenPinNG'] = 'No Gender';
$txt['googleMapBluePin'] = 'Male';
$txt['googleMapRedPin'] = 'Female';
$txt['googleMapPurplePin'] = 'Cluster of pins';
$txt['googleMapAddPinNote'] = '<a href="' . $scripturl . '?action=profile;sa=forumProfile#googlemap">Click here to go place your pin if you have not already.</a>';
$txt['googleMapPleaseClick'] = 'Click to place a point or click on your point to remove it.';
$txt['googleMapDisclaimer'] = 'Place your pin as close as you feel comfortable doing so.';
$txt['cannot_googleMap_view'] = 'Sorry, you\'re not allowed to view the Member Map.';
$txt['permissionname_googleMap_view'] = 'View Member Map';
$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map.  If not set, the people will not see the map.';
$txt['cannot_googleMap_place'] = 'Sorry, you\'re not allowed to place a pin for the Member Map.';
$txt['permissionname_googleMap_place'] = 'Place Pin on Member Map';
$txt['permissionhelp_googleMap_place'] = 'Allow the people place there pin the Member Map.  If not set, the people will not be able to place there pins.';

file $themedir/languages/ModSettings.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['googleMapsEnable'] = 'Enable the Google Member Map';
$txt['googleMapsEnableLegend'] = 'Show a Pin Legend';
$txt['googleSidebar'] = 'Where to show sidebar';
$txt['googleMapsKey'] = 'The key from the Google Maps API Page';
$txt['googleMapsPinGender'] = 'Should the pins reflect users gender?';
$txt['KMLoutput_enable'] = 'Should the compressed KML output be allowed? (KML is a file that is downloadable on the Google Map page that displays all the member pins inside Google Earth)';
$txt['googleMapsPinNumber'] = 'Number of max pins to show on map';
$txt['googleMapsType'] = 'The map type to show';
$txt['googleMapsDefaultLat'] = 'The default Latitude';
$txt['googleMapsDefaultLong'] = 'The default Longitude';
$txt['googleMapsDefaultZoom'] = 'The defualt Zoom';
$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering';
$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster';
$txt['googleMapsMaxVisMarker'] = 'Maximum Visable Pins On Map';
$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters';
$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box';
$txt['googleMapFO'] = 'Member Map';

file $themedir/languages/Who.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['whoall_googlemap'] = 'Viewing the <a href="' . $scripturl . '?action=googlemap">Member Map</a>.';
$txt['whoall_.kml'] = 'Viewing the Google Earth Feed.';

สร้างไฟล์: add_settings11.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/add_settings11.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/*******************************************************************************
This is a simplified script to add settings into SMF.

ATTENTION: If you are trying to INSTALL this package, please access
it directly, with a URL like the following:
http://www.yourdomain.tld/forum/add_settings.php (or similar.)

================================================================================

This script can be used to add new settings into the database for use
with SMF's $modSettings array.  It is meant to be run either from the
package manager or directly by URL.

*******************************************************************************/

// Set the below to true to overwrite already existing settings with the defaults. (not recommended.)
$overwrite_old_settings false;

// List settings here in the format: setting_key => default_value.  Escape any "s. (" => \")
$mod_settings = array(
'googleMapsEnable' => '0',
'googleMapsEnableLegend' => '1',
'googleMapsKey' => '',
'googleMapsPinGender' => '1',
'KMLoutput_enable' => '0',
'googleMapsPinNumber' => '250',
    
'googleMapsType' => 'G_HYBRID_TYPE',
    
'googleMapsDefaultLat' => '0.00000000000',
    
'googleMapsDefaultLong' => '0.00000000000',
    
'googleMapsDefaultZoom' => '1',
    
'googleMapsEnableClusterer' => '1',
    
'googleMapsMinMarkerCluster' => '5',
    
'googleMapsMaxVisMarker' => '150',
    
'googleMapsMaxNumClusters' => '5',
    
'googleMapsMaxLinesCluster' => '10',
);

/******************************************************************************/

// If SSI.php is in the same place as this file, and SMF isn't defined, this is being run standalone.
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
// Hmm... no SSI.php and no SMF?
elseif (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');

// Turn the array defined above into a string of MySQL data.
$string '';
foreach (
$mod_settings as $k => $v)
$string .= '
(\'' 
$k '\', \'' $v '\'),';

// Sorted out the array defined above - now insert the data!
if ($string != '')
$result db_query("
. ($overwrite_old_settings 'REPLACE' 'INSERT IGNORE') . " INTO {$db_prefix}settings
(variable, value)
VALUES" 
substr($string0, -1), __FILE____LINE__);

// Uh-oh spaghetti-oh!
if ($result === false)
echo '<b>Error:</b> Database modifications failed!';

//Ok now the above is done... lets see if we can alter the members table to contain latitude and longitude
//First though, lets check to see if we are in need of to do this
$latlongexist 0;
$result db_query("SHOW COLUMNS FROM {$db_prefix}members"__FILE____LINE__);
while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) {
if (($row['Field'] == "longitude") && ($row['Type'] == "decimal(18,15)") && ($row['Null'] == "YES"))
$latlongexist++;
if (($row['Field'] == "latitude") && ($row['Type'] == "decimal(18,15)") && ($row['Null'] == "YES"))
$latlongexist++;
}
//Ok we just checked the table the hard way and well if 2 we have things, if 0 we dont, if 1 wtf....
if ($latlongexist != 2)
$result db_query("ALTER TABLE {$db_prefix}members ADD longitude DECIMAL( 18, 15 ) NULL , ADD latitude DECIMAL( 18, 15 ) NULL"__FILE____LINE__);

// Initialize the groups array with 'ungrouped members' (ID: 0).
$groups = array(0);

// Get all the non-postcount based groups.
$request db_query("
SELECT ID_GROUP
FROM {$db_prefix}membergroups
WHERE minPosts = -1"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
$groups[] = $row['ID_GROUP'];

// Give them all their new permission.
$request db_query("
INSERT IGNORE INTO {$db_prefix}permissions
(permission, ID_GROUP, addDeny)
VALUES
('googleMap_view', " 
implode(", 1),
            ('googleMap_view', "
$groups) . ", 1)"__FILE____LINE__);

   
// Give them all their new permission.
$request db_query("
INSERT IGNORE INTO {$db_prefix}permissions
(permission, ID_GROUP, addDeny)
VALUES
('googleMap_place', " 
implode(", 1),
            ('googleMap_place', "
$groups) . ", 1)"__FILE____LINE__);

   
// Delete our package server if there is one.
   
$request db_query("
       DELETE FROM {$db_prefix}package_servers WHERE name = 'Gamerz Garage'"
__FILE____LINE__);
      
   
// Install our package server.
   
$request db_query("
      INSERT INTO {$db_prefix}package_servers (name,url)VALUES('Gamerz Garage','http://www.gamerzgarage.com/mods')"
__FILE____LINE__);

?>


ดาวน์โหลด: membermap.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file GoogleMap.php -->> $sourcedir
file Clusterer2.js -->> $themesdir/default
file GoogleMap.template.php -->> $themesdir/default
file google_earth_feed.gif -->> $imagesdir
file googlemap.gif -->> $imagesdir/thai-utf8

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> แผนที่สมาชิก

ลิงค์หัวข้อ: http://dexmore.com/topic/4313
Windows XP    Firefox 3.5.16   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 18 มกราคม 2554, 22:23:31
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'groups' => array('Groups.php', 'Groups'),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'googlemap' => array('GoogleMap.php', 'Map'),
'membermap' => array('GoogleMap.php', 'Map'),

ค้นหา -->>
โค๊ด: [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'.kml' => array('GoogleMap.php', 'ShowKML'),

file $sourcedir/Admin.php

ค้นหา -->>
โค๊ด: [Select]
'general' => array($txt['mods_cat_modifications_misc']),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'googlemap' => array($txt['googleMap']),

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
'website' => array(
'title' => $profile['website_title'],
'url' => $profile['website_url'],
),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap' => array(
'latitude' => !isset($profile['latitude']) ? '' : $profile['latitude'],
'longitude' => !isset($profile['longitude']) ? '' : $profile['longitude'],
'pindate' => !isset($profile['pindate']) ? '' : $profile['pindate'],
),

ค้นหา -->>
โค๊ด: [Select]
mem.buddy_list, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,

แก้เป็น -->>
โค๊ด: [Select]
mem.buddy_list, mem.latitude, mem.longitude, mem.pindate, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,

ค้นหา -->>
โค๊ด: [Select]
mem.notify_types, lo.url, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,

แก้เป็น -->>
โค๊ด: [Select]
mem.notify_types, mem.latitude, mem.longitude, mem.pindate, lo.url, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,

file $sourcedir/ManagePermissions.php

ค้นหา -->>
โค๊ด: [Select]
'view_mlist' => array(false, 'general', 'view_basic_info'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap_view' => array(false, 'general', 'view_basic_info'),
'googleMap_place' => array(false, 'general', 'view_basic_info'),

ค้นหา -->>
โค๊ด: [Select]
'profile_server_avatar',
'profile_upload_avatar',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googleMap_view',
'googleMap_place',

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'googlemap' => 'ModifyGoogleMapSettings',

ค้นหา -->>
โค๊ด: [Select]
'description' => $txt['modification_settings_desc'],
'tabs' => array(
'general' => array(
),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'googlemap' => array(
),

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้่ก่อน -->>
โค๊ด: [Select]
function ModifyGoogleMapSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(
// Map - On or off?
array('check', 'googleMapsEnable'),
array('check', 'googleMapsEnableLegend'),
array('select', 'googleSidebar', array('none' => $txt['nosidebar'], 'right' => $txt['rightsidebar'])),
'',
// Key, pins static/gender/membergroup
array('text', 'googleMapsKey'),
array('check', 'KMLoutput_enable'),
array('int', 'googleMapsPinNumber'),
array('select', 'googleMapsType', array('G_NORMAL_MAP' => $txt['map'], 'G_SATELLITE_MAP' => $txt['satellite'], 'G_HYBRID_MAP' => $txt['hybrid'])),
array('select', 'googleNavType', array('GLargeMapControl3D' => $txt['glargemapcontrol3d'], 'GLargeMapControl' => $txt['glargemapcontrol'], 'GSmallMapControl' => $txt['gsmallmapcontrol'], 'GSmallZoomControl3D' => $txt['gsmallzoomcontrol3d'], 'GSmallZoomControl' => $txt['gsmallzoomcontrol'])),
array('check', 'googleBoldMember'),
'',
// Default Location/Zoom
array('float', 'googleMapsDefaultLat', '25'),
array('float', 'googleMapsDefaultLong', '25'),
array('int', 'googleMapsDefaultZoom'),
'',
// Member Pin Style
array('check', 'googleMapsPinGender'),
array('text', 'googleMapsPinBackground', '6'),
array('text', 'googleMapsPinForeground', '6'),
array('select', 'googleMapsPinStyle', array('plainpin' => $txt['plainpin'], 'textpin' => $txt['textpin'], 'iconpin' => $txt['iconpin'])),
array('check', 'googleMapsPinShadow'),
array('int', 'googleMapsPinSize', '2'),
array('text', 'googleMapsPinText'),
array('select', 'googleMapsPinIcon',
array(
'academy' => $txt['academy'],
'activities' => $txt['activities'],
'airport' => $txt['airport'],
'amusement' => $txt['amusement'],
'aquarium' => $txt['aquarium'],
'art-gallery' => $txt['art-gallery'],
'atm' => $txt['atm'],
'baby' => $txt['baby'],
'bank-dollar' => $txt['bank-dollar'],
'bank-euro' => $txt['bank-euro'],
'bank-intl' => $txt['bank-intl'],
'bank-pound' => $txt['bank-pound'],
'bank-yen' => $txt['bank-yen'],
'bar' => $txt['bar'],
'barber' => $txt['barber'],
'beach' => $txt['beach'],
'beer' => $txt['beer'],
'bicycle' => $txt['bicycle'],
'books' => $txt['books'],
'bowling' => $txt['bowling'],
'bus' => $txt['bus'],
'cafe' => $txt['cafe'],
'camping' => $txt['camping'],
'car-dealer' => $txt['car-dealer'],
'car-rental' => $txt['car-rental'],
'car-repair' => $txt['car-repair'],
'casino' => $txt['casino'],
'caution' => $txt['caution'],
'cemetery-grave' => $txt['cemetery-grave'],
'cemetery-tomb' => $txt['cemetery-tomb'],
'cinema' => $txt['cinema'],
'civic-building' => $txt['civic-building'],
'computer' => $txt['computer'],
'corporate' => $txt['corporate'],
'fire' => $txt['fire'],
'flag' => $txt['flag'],
'floral' => $txt['floral'],
'helicopter' => $txt['helicopter'],
'home' => $txt['home'],
'info' => $txt['info'],
'landslide' => $txt['landslide'],
'legal' => $txt['legal'],
'location' => $txt['location'],
'locomotive' => $txt['locomotive'],
'medical' => $txt['medical'],
'mobile' => $txt['mobile'],
'motorcycle' => $txt['motorcycle'],
'music' => $txt['music'],
'parking' => $txt['parking'],
'pet' => $txt['pet'],
'petrol' => $txt['petrol'],
'phone' => $txt['phone'],
'picnic' => $txt['picnic'],
'postal' => $txt['postal'],
'repair' => $txt['repair'],
'restaurant' => $txt['restaurant'],
'sail' => $txt['sail'],
'school' => $txt['school'],
'scissors' => $txt['scissors'],
'ship' => $txt['ship'],
'shoppingbag' => $txt['shoppingbag'],
'shoppingcart' => $txt['shoppingcart'],
'ski' => $txt['ski'],
'snack' => $txt['snack'],
'snow' => $txt['snow'],
'sport' => $txt['sport'],
'star' => $txt['star'],
'swim' => $txt['swim'],
'taxi' => $txt['taxi'],
'train' => $txt['train'],
'truck' => $txt['truck'],
'wc-female' => $txt['wc-female'],
'wc-male' => $txt['wc-male'],
'wc' => $txt['wc'],
'wheelchair' => $txt['wheelchair'],
)
),
'',
// Clustering Options
array('check', 'googleMapsEnableClusterer'),
array('int', 'googleMapsMinMarkerCluster'),
array('int', 'googleMapsMaxVisMarker'),
array('int', 'googleMapsMaxNumClusters'),
array('int', 'googleMapsMaxLinesCluster'),
'',
// Clustering Style
array('text', 'googleMapsClusterBackground', '6'),
array('text', 'googleMapsClusterForeground', '6'),
array('select', 'googleMapsClusterStyle', array('plainpin' => $txt['plainpin'], 'textpin' => $txt['textpin'], 'iconpin' => $txt['iconpin'])),
array('check', 'googleMapsClusterShadow'),
array('int', 'googleMapsClusterSize', '2'),
array('text', 'googleMapsClusterText'),
array('select', 'googleMapsClusterIcon',
array(
'academy' => $txt['academy'],
'activities' => $txt['activities'],
'airport' => $txt['airport'],
'amusement' => $txt['amusement'],
'aquarium' => $txt['aquarium'],
'art-gallery' => $txt['art-gallery'],
'atm' => $txt['atm'],
'baby' => $txt['baby'],
'bank-dollar' => $txt['bank-dollar'],
'bank-euro' => $txt['bank-euro'],
'bank-intl' => $txt['bank-intl'],
'bank-pound' => $txt['bank-pound'],
'bank-yen' => $txt['bank-yen'],
'bar' => $txt['bar'],
'barber' => $txt['barber'],
'beach' => $txt['beach'],
'beer' => $txt['beer'],
'bicycle' => $txt['bicycle'],
'books' => $txt['books'],
'bowling' => $txt['bowling'],
'bus' => $txt['bus'],
'cafe' => $txt['cafe'],
'camping' => $txt['camping'],
'car-dealer' => $txt['car-dealer'],
'car-rental' => $txt['car-rental'],
'car-repair' => $txt['car-repair'],
'casino' => $txt['casino'],
'caution' => $txt['caution'],
'cemetery-grave' => $txt['cemetery-grave'],
'cemetery-tomb' => $txt['cemetery-tomb'],
'cinema' => $txt['cinema'],
'civic-building' => $txt['civic-building'],
'computer' => $txt['computer'],
'corporate' => $txt['corporate'],
'fire' => $txt['fire'],
'flag' => $txt['flag'],
'floral' => $txt['floral'],
'helicopter' => $txt['helicopter'],
'home' => $txt['home'],
'info' => $txt['info'],
'landslide' => $txt['landslide'],
'legal' => $txt['legal'],
'location' => $txt['location'],
'locomotive' => $txt['locomotive'],
'medical' => $txt['medical'],
'mobile' => $txt['mobile'],
'motorcycle' => $txt['motorcycle'],
'music' => $txt['music'],
'parking' => $txt['parking'],
'pet' => $txt['pet'],
'petrol' => $txt['petrol'],
'phone' => $txt['phone'],
'picnic' => $txt['picnic'],
'postal' => $txt['postal'],
'repair' => $txt['repair'],
'restaurant' => $txt['restaurant'],
'sail' => $txt['sail'],
'school' => $txt['school'],
'scissors' => $txt['scissors'],
'ship' => $txt['ship'],
'shoppingbag' => $txt['shoppingbag'],
'shoppingcart' => $txt['shoppingcart'],
'ski' => $txt['ski'],
'snack' => $txt['snack'],
'snow' => $txt['snow'],
'sport' => $txt['sport'],
'star' => $txt['star'],
'swim' => $txt['swim'],
'taxi' => $txt['taxi'],
'train' => $txt['train'],
'truck' => $txt['truck'],
'wc-female' => $txt['wc-female'],
'wc-male' => $txt['wc-male'],
'wc' => $txt['wc'],
'wheelchair' => $txt['wheelchair'],
)
),
);

// Saving?
if (isset($_GET['save']))
{
checkSession();

saveDBSettings($config_vars);
redirectexit('action=admin;area=modsettings;sa=googlemap');
}

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=googlemap';
$context['settings_title'] = $txt['googleMapFO'];

prepareDBSettingContext($config_vars);
}

file $sourcedir/Profile-Modify.php

ค้นหา -->>
โค๊ด: [Select]
$profile_strings = array(
'buddy_list',
'ignore_boards',
);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (isset($_POST['latitude']))
$profile_vars['latitude'] = $_POST['latitude'] != '' ? $_POST['latitude'] : 'NULL';
if (isset($_POST['longitude']))
$profile_vars['longitude'] = $_POST['longitude'] != '' ? $_POST['longitude'] : 'NULL';

ค้นหา -->>
โค๊ด: [Select]
'karma_good', 'hr',
'website_title', 'website_url',

แก้เป็น -->>
โค๊ด: [Select]
'karma_good', 'hr',
'latitude', 'hr',
'website_title', 'website_url',

ค้นหา -->>
โค๊ด: [Select]
'karma_good' => array(
'type' => 'callback',
'callback_func' => 'karma_modify',
'permission' => 'admin_forum',

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'latitude' => array(
'type' => 'callback',
'callback_func' => 'googlemap_modify',
'permission' => 'googleMap_place',
// Set longitude and pin date too!
'input_validate' => create_function('&$value', '
global $profile_vars, $cur_profile;

$value = (float) $value;
if (isset($_POST[\'longitude\']))
{
$profile_vars[\'longitude\'] = !empty($_POST[\'longitude\']) ? (float) $_POST[\'longitude\'] : 0;
$cur_profile[\'longitude\'] = !empty($_POST[\'longitude\']) ? (float) $_POST[\'longitude\'] : 0;
}
$pintime = time();
$profile_vars[\'pindate\'] = (int) $pintime;
$cur_profile[\'pindate\'] = (int) $pintime;

return true;
'),
'preload' => create_function('', '
global $context, $cur_profile;

$context[\'member\'][\'googleMap\'][\'latitude\'] = $cur_profile[\'latitude\'];
$context[\'member\'][\'googleMap\'][\'longitude\'] = $cur_profile[\'longitude\'];
$context[\'member\'][\'googleMap\'][\'pindate\'] = $cur_profile[\'pindate\'];

return true;
'),
),

file $sourcedir/Subs.php

ค้นหา -->>
โค๊ด: [Select]
elseif ($context['current_action'] == 'search2')
$current_action = 'search';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
elseif ($context['current_action'] == 'googlemap')
$current_action = 'googlemap';

ค้นหา -->>
โค๊ด: [Select]
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
'is_last' => true,
),
),
),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Google Maps Mod
'googlemap' => array(
'title' => $txt['googleMap'],
'href' => $scripturl . '?action=googlemap',
'show' => $modSettings['googleMapsEnable'] && allowedTo('googleMap_view'),
'sub_buttons' => array(
),
),

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
<dd>', $context['member']['last_login'], '</dd>
</dl>';

แก้เป็น -->>
โค๊ด: [Select]
<dd>', $context['member']['last_login'], '</dd>';

if ($modSettings['googleMapsEnable'] && allowedTo('googleMap_view'))
 {
 if (isset($context['member']['googleMap']['longitude']) && isset($context['member']['googleMap']['latitude']) && ($context['member']['googleMap']['longitude'] != 0.0) && ($context['member']['googleMap']['latitude'] != 0.0))
  {
   echo '
   </dl><hr><br /><dl>
   <dt>' . $txt['googleMapWhere'] . '' . $context['member']['name'] . '</dt>
   <dd>
   <script src="http://maps.google.com/maps?file=api&v=2&key=' . $modSettings['googleMapsKey'] . '" type="text/javascript"></script>
   <div id="map" style="width: 100%; height: 350px; color: #000000;"></div>
   <input type="hidden" name="latitude" size="50" value="', $context['member']['googleMap']['latitude'], '" />
   <input type="hidden" name="longitude" size="50" value="', $context['member']['googleMap']['longitude'], '" />
   <input type="hidden" name="pindate" size="50" value="', $context['member']['googleMap']['pindate'], '" />
   <script type="text/javascript">';
   // Evil hack on this!!!
   echo '
   //' . chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
   echo '
   function LoadMap()
   {
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new ' . $modSettings['googleNavType'] . '());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(' . $context['member']['googleMap']['latitude'] . ',' . $context['member']['googleMap']['longitude'] . '), 13, '. $modSettings['googleMapsType'] . ');
    var point = new GLatLng(' . $context['member']['googleMap']['latitude'] . ',' . $context['member']['googleMap']['longitude'] . ');
    var marker = new GMarker(point);
    map.addOverlay(marker);
   }
   if (GBrowserIsCompatible()) {
    window.onload=LoadMap;
   }';
   // Let's make another evil hack!
   echo '
   //' . chr(93) . chr(93) . chr(62);
   echo '
     </script>
 </dd>
</dl>';
  }
 }

ค้นหา -->>
โค๊ด: [Select]
(', $txt['total'], ': <span id="karmaTotal">', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</span>)
</dd>';
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]

// Google Map Member Map
function template_profile_googlemap_modify()
{
global $txt, $modSettings, $context;

if ($modSettings['googleMapsEnable'] && allowedTo('googleMap_view')) {
echo '
<dt><strong>', $txt['googleMap'], '</strong><br /><span class="smalltext">'. $txt['googleMapPleaseClick'].'<br />' . $txt['googleMapDisclaimer'] . '</span></dt>
<dd><style type="text/css">
      @import url("http://www.google.com/uds/css/gsearch.css");
      @import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
     #map input, textarea {background-color: #ffffff;}
    </style>
<br />
         <script src="http://maps.google.com/maps?file=api&v=2&key=' . $modSettings['googleMapsKey'] . '" type="text/javascript"></script>
         <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0" type="text/javascript"></script>
         <script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type="text/javascript"></script>
         <a name="googlemap"><div id="map" style="width: 100%; height: 350px; color: #000000;" align="center"></div></a>
         <input type="hidden" name="latitude" id="latitude" size="50" value="', $context['member']['googleMap']['latitude'], '" />
         <input type="hidden" name="longitude" id="longitude" size="50" value="', $context['member']['googleMap']['longitude'], '" />
         <input type="hidden" name="pindate" id="pindate" size="50" value="', $context['member']['googleMap']['pindate'], '" />
         <script type="text/javascript">';

// Evil hack on this!!!
echo '
  //' . chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
echo '
  function LoadMap()
  {
   var map = new GMap2(document.getElementById("map"));
   map.addControl(new ' . $modSettings['googleNavType'] . '());
   map.addControl(new GMapTypeControl());
   var options = {
      suppressInitialResultSelection : true,
  resultList : google.maps.LocalSearch.RESULT_LIST_SUPPRESS
   };
   map.addControl(new google.maps.LocalSearch(options), new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(4,4)));';
 
if (isset($context['member']['googleMap']['longitude']) && isset($context['member']['googleMap']['latitude']) && ($context['member']['googleMap']['longitude'] != 0.0) && ($context['member']['googleMap']['latitude'] != 0.0))
{
  echo '
   map.setCenter(new GLatLng(' . $context['member']['googleMap']['latitude'] . ',' . $context['member']['googleMap']['longitude'] . '), 13, ' . $modSettings['googleMapsType'] . ');
   var point = new GLatLng(' . $context['member']['googleMap']['latitude'] . ',' . $context['member']['googleMap']['longitude'] . ');
   var marker = new GMarker(point);
   map.addOverlay(marker);';
} else {
echo '
   map.setCenter(new GLatLng(0,0), 1, G_NORMAL_MAP);';
}

echo '
   GEvent.addListener(map, "click", function(overlay, point) {
    if (overlay)
    {
     map.clearOverlays();
     document.getElementById("latitude").value = "";
     document.getElementById("longitude").value = "";
    }
    else if (point)
    {
     map.clearOverlays();
     map.addOverlay(new GMarker(point));
     map.panTo(point);
     document.getElementById("latitude").value = point.y;
     document.getElementById("longitude").value = point.x;
    }
   });
  }
  if (GBrowserIsCompatible()) {
   window.onload=LoadMap;
  }';
 
// Let's make another evil hack!
echo '
  //' . chr(93) . chr(93) . chr(62);
echo '
         </script>

</dd>';
}
}

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['googleMap'] = 'Member Map';
$txt['googleMapWhere'] = 'Where is ';
$txt['googleMapThereare'] = 'There are';
$txt['googleMapPinsOnMap'] = 'member pins on the map';
$txt['googleMapsLegend'] = 'Legend';
$txt['googleMappinned'] = 'Member Pins';
$txt['googleMapGreenPinGD'] = 'Someones Pin';
$txt['googleMapGreenPinNG'] = 'No Gender';
$txt['googleMapBluePin'] = 'Male';
$txt['googleMapRedPin'] = 'Female';
$txt['googleMapPurplePin'] = 'Group of pins';
$txt['googleMapOnMove'] = 'Recently Added/Moved';
$txt['googleMapAddPinNote'] = '<b>Click here to add or edit your pin location on the map.</b>';
$txt['googleMapPleaseClick'] = 'Click to place your pin on the map or click on your pin to remove it.';
$txt['googleMapDisclaimer'] = '<br />Place your pin as close to your location as you feel comfortable.<br />Use the search function on the map to quickly move to a location (city, zip code, etc) then click on the map to set your pin.<br /><br />When you are done click on "Change Profile" to save your location.';
$txt['cannot_googleMap_view'] = 'Sorry, you are not allowed to view the Member Map.';
$txt['permissionname_googleMap_view'] = 'View Member Map';
$txt['permissionhelp_googleMap_view'] = 'Allow the people to view the Member Map.  If not set, the people will not see the map.';
$txt['cannot_googleMap_place'] = 'Sorry, you are not allowed to place a pin on the Member Map.';
$txt['permissionname_googleMap_place'] = 'Place Pin on the Member Map';
$txt['permissionhelp_googleMap_place'] = 'Allow the people place their pin the Member Map.  If not set, the people will not be able to place their pins.';

file $themedir/languages/ManageSettings.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['googleMapsEnable'] = 'Enable the Member Map Modification';
$txt['googleMapsEnableLegend'] = 'Display a Pin Legend';
$txt['googleSidebar'] = 'Where to show sidebar';
$txt['nosidebar'] = 'No Sidebar';
$txt['rightsidebar'] = 'Sidebar Right';
$txt['map'] = 'Map';
$txt['satellite'] = 'Satellite';
$txt['hybrid'] = 'Hybrid';
$txt['glargemapcontrol3d'] = 'Large 3D pan/zoom control';
$txt['glargemapcontrol'] = 'Simpler large pan/zoom control';
$txt['gsmallmapcontrol'] = 'Smaller pan/zoom control';
$txt['gsmallzoomcontrol3d'] = 'Small 3D zoom control';
$txt['gsmallzoomcontrol'] = 'Small zoom control';
$txt['plainpin'] = 'Plain Pin';
$txt['textpin'] = 'Pin with Text';
$txt['iconpin'] = 'Pin with Icon';
$txt['academy'] = 'academy';
$txt['activities'] = 'activities';
$txt['airport'] = 'airport';
$txt['amusement'] = 'amusement';
$txt['aquarium'] = 'aquarium';
$txt['art-gallery'] = 'art gallery';
$txt['atm'] = 'atm';
$txt['baby'] = 'baby';
$txt['bank-dollar'] = 'dollar';
$txt['bank-euro'] = 'euro';
$txt['bank-intl'] = 'intl';
$txt['bank-pound'] = 'pound';
$txt['bank-yen'] = 'yen';
$txt['bar'] = 'bar';
$txt['barber'] = 'barber';
$txt['beach'] = 'beach';
$txt['beer'] = 'beer';
$txt['bicycle'] = 'bicycle';
$txt['books'] = 'books';
$txt['bowling'] = 'bowling';
$txt['bus'] = 'bus';
$txt['cafe'] = 'cafe';
$txt['camping'] = 'camping';
$txt['car-dealer'] = 'car dealer';
$txt['car-rental'] = 'car rental';
$txt['car-repair'] = 'car repair';
$txt['casino'] = 'casino';
$txt['caution'] = 'caution';
$txt['cemetery-grave'] = 'grave';
$txt['cemetery-tomb'] = 'tomb';
$txt['cinema'] = 'cinema';
$txt['civic-building'] = 'building';
$txt['computer'] = 'computer';
$txt['corporate'] = 'corporate';
$txt['fire'] = 'fire';
$txt['flag'] = 'flag';
$txt['floral'] = 'floral';
$txt['helicopter'] = 'helicopter';
$txt['home'] = 'home';
$txt['info'] = 'info';
$txt['landslide'] = 'landslide';
$txt['legal'] = 'legal';
$txt['location'] = 'location';
$txt['locomotive'] = 'locomotive';
$txt['medical'] = 'medical';
$txt['mobile'] = 'mobile';
$txt['motorcycle'] = 'motorcycle';
$txt['music'] = 'music';
$txt['parking'] = 'parking';
$txt['pet'] = 'pet';
$txt['petrol'] = 'petrol';
$txt['phone'] = 'phone';
$txt['picnic'] = 'picnic';
$txt['postal'] = 'postal';
$txt['repair'] = 'repair';
$txt['restaurant'] = 'restaurant';
$txt['sail'] = 'sail';
$txt['school'] = 'school';
$txt['scissors'] = 'scissors';
$txt['ship'] = 'ship';
$txt['shoppingbag'] = 'shopping bag';
$txt['shoppingcart'] = 'shopping cart';
$txt['ski'] = 'ski';
$txt['snack'] = 'snack';
$txt['snow'] = 'snow';
$txt['sport'] = 'sport';
$txt['star'] = 'star';
$txt['swim'] = 'swim';
$txt['taxi'] = 'taxi';
$txt['train'] = 'train';
$txt['truck'] = 'truck';
$txt['wc-female'] = 'female';
$txt['wc-male'] = 'male';
$txt['wc'] = 'unisex';
$txt['wheelchair'] = 'wheelchair';
$txt['googleBoldMember'] = 'Show recently added / moved pins as <b>bold</b> in the sidebar';
$txt['googleMapsKey'] = 'The API key from the <a href="http://www.google.com/apis/maps/signup.html">Google Maps API Page</a>';
$txt['googleMapsPinGender'] = 'Should the pins reflect members gender?<br /><p class="smalltext">Enabling this will supersede other pin settings, excluding size and drop shadow, for those members who\'s gender is known</p>';
$txt['KMLoutput_enable'] = 'Should compressed KML output be allowed?<br /><p class="smalltext">KML is a file that is download-able on the Google Map page that displays all the member pins inside Google Earth</p>';
$txt['googleMapsPinNumber'] = 'Number of max pins to show on map<br /><p class="smalltext">Enter 0 for no limit</p>';
$txt['googleMapsType'] = 'The type of map to display by default';
$txt['googleNavType'] = 'Select the type of navigation control (Pan/Zoom)';
$txt['googleMapsDefaultLat'] = 'The default Latitude';
$txt['googleMapsDefaultLong'] = 'The default Longitude';
$txt['googleMapsDefaultZoom'] = 'The default Zoom Level<br><p class="smalltext">Defines the default map location by defining the map center and zoom level.<br />Examples: Europe:48,15,4 USA:39,-95,4</p>';
$txt['googleMapsEnableClusterer'] = 'Enable Pin Clustering<br /><p class="smalltext">Allows for handling of large numbers of markers, without the slow performance you\'d get if you tried displaying them via the maps API directly.  Zooming in on a cluster will expand it in to the individual pins</p>';
$txt['googleMapsMinMarkerCluster'] = 'Minimum Pins Per Cluster';
$txt['googleMapsMaxVisMarker'] = 'Maximum Visible Pins On Map before clustering starts';
$txt['googleMapsMaxNumClusters'] = 'Max Number of Clusters';
$txt['googleMapsMaxLinesCluster'] = 'Max Number of lines in Cluster Info Box';
$txt['googleMapFO'] = 'Member Map';
$txt['googleMapsPinBackground'] = 'Background color of the member pin as a six-digit HTML hexadecimal color';
$txt['googleMapsPinForeground'] = 'Text color of the member pin as a six-digit HTML hexadecimal color';
$txt['googleMapsPinStyle'] = 'What style of member pin to use';
$txt['googleMapsPinShadow'] = 'Add a drop shadow to the member pin';
$txt['googleMapsPinText'] = 'Enter text for use with a member text pin';
$txt['googleMapsPinIcon'] = 'Select the icon to use for an member pin';
$txt['googleMapsPinSize'] = 'Enter the size of the member icon pin';
$txt['googleMapsClusterBackground'] = 'Background color of the cluster pin as a six-digit HTML hexadecimal color';
$txt['googleMapsClusterForeground'] = 'Text color of the cluster pin as a six-digit HTML hexadecimal color';
$txt['googleMapsClusterStyle'] = 'What style of clustering pin to use';
$txt['googleMapsClusterShadow'] = 'Add a drop shadow to the cluster pin';
$txt['googleMapsClusterText'] = 'Enter text for use with a cluster text pin';
$txt['googleMapsClusterIcon'] = 'Select the icon to use for an cluster icon pin';
$txt['googleMapsClusterSize'] = 'Enter the size of the cluster pin';

file $themedir/languages/Who.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['whoall_googlemap'] = 'Viewing the <a href="' . $scripturl . '?action=googlemap">Member Map</a>.';
$txt['whoall_.kml'] = 'Viewing the Google Earth Feed.';

สร้างไฟล์: add_settings20.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/add_settings20.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/**********************************************************************************
* add_settings.php                                                                *
***********************************************************************************
***********************************************************************************
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* This file is a simplified database installer. It does what it is suppoed to.    *
**********************************************************************************/

// If we have found SSI.php and we are outside of SMF, then we are running standalone.
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
elseif (!
defined('SMF')) // If we are outside SMF and can't find SSI.php, then throw an error
die('<b>Error:</b> Cannot install - please verify you put this file in the same place as SMF\'s SSI.php.');

global 
$smcFunc$db_prefix;

// List settings here in the format: setting_key => default_value.  Escape any "s. (" => \")
$mod_settings = array(
'googleMapsEnable' => '0',
'googleMapsEnableLegend' => '1',
'googleMapsKey' => '',
'googleMapsPinGender' => '0',
'KMLoutput_enable' => '0',
'googleMapsPinNumber' => '250',
'googleMapsType' => 'G_HYBRID_MAP',
'googleNavType' => 'GLargeMapControl3D',
'googleSidebar' => 'right',
'googleMapsPinBackground' => '66FF66',
'googleMapsPinForeground' => '202020',
'googleMapsPinStyle' => 'plainpin',
'googleMapsPinShadow' => '1',
'googleMapsPinText' => '',
'googleMapsPinIcon' => '',
'googleMapsPinSize' => '25',
'googleMapsDefaultLat' => '0.00000000000',
'googleMapsDefaultLong' => '0.00000000000',
'googleMapsDefaultZoom' => '1',
'googleMapsEnableClusterer' => '1',
'googleMapsMinMarkerCluster' => '5',
'googleMapsMaxVisMarker' => '90',
'googleMapsMaxNumClusters' => '10',
'googleMapsMaxLinesCluster' => '10',
'googleMapsClusterBackground' => 'FF66FF',
'googleMapsClusterForeground' => '202020',
'googleMapsClusterSize' => '25',
'googleMapsClusterStyle' => 'iconpin',
'googleMapsClusterShadow' => '1',
'googleMapsClusterText' => '',
'googleMapsClusterIcon' => 'info',
'googleBoldMember' => '1',
);

/******************************************************************************/

// Update mod settings if applicable
foreach ($mod_settings as $new_setting => $new_value)
{
if (!isset($modSettings[$new_setting]))
updateSettings(array($new_setting => $new_value));
}

// Settings to create the new tables...
$tables = array();

// Add a row to an existing table
$rows = array();

// Add a column to an existing table
$columns = array();
$columns[] = array(
'table_name' => '{db_prefix}members',
'if_exists' => 'ignore',
'error' => 'fatal',
'parameters' => array(),
'column_info' => array(
 'name' => 'longitude',
 'auto' => false,
 'default' => 0,
 'type' => 'decimal(18,15)',
 'null' => true,
)
);
$columns[] = array(
'table_name' => '{db_prefix}members',
'if_exists' => 'ignore',
'error' => 'fatal',
'parameters' => array(),
'column_info' => array(
 'name' => 'latitude',
 'auto' => false,
 'default' => 0,
 'type' => 'decimal(18,15)',
 'null' => true,
)
);
$columns[] = array(
'table_name' => '{db_prefix}members',
'if_exists' => 'ignore',
'error' => 'fatal',
'parameters' => array(),
'column_info' => array(
 'name' => 'pindate',
 'auto' => false,
 'default' => 0,
 'type' => 'int',
 'size' => 10,
 'null' => false,
)
);

if (
SMF == 'SSI' || (count($columns) > 0))
db_extend('packages');

foreach (
$tables as $table)
$smcFunc['db_create_table']($table['table_name'], $table['columns'], $table['indexes'], $table['parameters'], $table['if_exists'], $table['error']);

foreach (
$rows as $row)
$smcFunc['db_insert']($row['method'], $row['table_name'], $row['columns'], $row['data'], $row['keys']);
 
foreach (
$columns as $column)
$smcFunc['db_add_column']($column['table_name'], $column['column_info'], $column['parameters'], $column['if_exists'], $column['error']);

// Initialize the groups array with 'ungrouped members' (ID: 0).
$groups = array(0);

// Get all the non-postcount based groups.
$request $smcFunc['db_query']('''
SELECT id_group
FROM {db_prefix}membergroups
WHERE min_posts = -1'
);

while (
$row $smcFunc['db_fetch_assoc']($request))
$groups[] = $row['id_group'];

// Give them all their new permission.
$request $smcFunc['db_query']('''
INSERT IGNORE INTO {db_prefix}permissions
(permission, id_group, add_deny)
VALUES
(\'googleMap_view\', ' 
implode(', 1),(\'googleMap_view\', '$groups) . ', 1)');

$request $smcFunc['db_query']('' '
INSERT IGNORE INTO {db_prefix}permissions
(permission, id_group, add_deny)
VALUES
(\'googleMap_place\', ' 
implode(', 1),(\'googleMap_place\', '$groups) . ', 1)');

if (
SMF == 'SSI')
   echo 
'Congratulations! You have successfully installed this mod!';

?>


ดาวน์โหลด: membermap2.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file GoogleMap.php -->> $sourcedir
file Clusterer2.js -->> $themedir/scripts
file GoogleMap.css -->> $themedir/css
file GoogleMap.template.php -->> $themedir
file google_earth_feed.gif -->> $imagesdir
file googlemap.gif -->> $imagesdir

ลิงค์หัวข้อ: http://dexmore.com/topic/4313
Thx by selo
Windows XP    Firefox 3.5.16   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
***



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 15 กันยายน 2554, 11:54:54
สอบถามครับผม ติดตั้งเรียบร้อยครับ แต่แจ้งข้อความว่า


The requested URL /intl/th-TH/apis/maps/signup.htm was not found on this server. That’s all we know.



ลิงค์หัวข้อ: http://dexmore.com/topic/4313
Thx by Mteam
« แก้ไขครั้งสุดท้าย: 15 กันยายน 2554, 12:36:21 โดย kkk » Windows XP    Firefox 6.0.2   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
***



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 15 กันยายน 2554, 12:20:30
ทำได้แล้วครับผม  Grin Grin

ลิงค์หัวข้อ: http://dexmore.com/topic/4313
Thx by Mteam
« แก้ไขครั้งสุดท้าย: 15 กันยายน 2554, 12:30:48 โดย kkk » Windows XP    Firefox 6.0.2   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 16 พฤษภาคม 2555, 20:51:48

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla