Code: Select all
#
#--[ FIND ]------------------
#
$rep = array('\n','\r','<br /><br />');
#
#--[ REPLACE WITH ]------------------
#
$rep = array("\n","\r","<br /><br />");
BassFace wrote: I started the v0.0.4 to v1.0.2 update file last night. I'll continue with it tonight. 8) Update files are a lot harder to create than install files.
cherryworld4u wrote:BassFace wrote: I started the v0.0.4 to v1.0.2 update file last night. I'll continue with it tonight. 8) Update files are a lot harder to create than install files.
Hye BassFace,
Thnx for ur appreciation. Is that upgrading files ready plz upload them :neutral:
And plz upload the 0.0.4 installation instruction with it if the prob remains then i will try uninstall and then install ur latest ver.
Thnx 4 this gr8 mod
Code: Select all
include($phpbb_root_path . 'common.'.$phpEx);
Code: Select all
// Bring in phoogle class from includes/phoogle.php
include($phpbb_root_path . 'includes/phpbb_phoogle_class.'.$phpEx);
Code: Select all
//
// Generate the page
//
$template->pparse('body');
Code: Select all
// Begin Phoogle
// Create a new map
$myMap = new PhoogleMap();
// sql for map config params
$sql_map_config = "SELECT *
FROM ". PHOOGLE_CONFIG_TABLE;
if( !($result_map_config = $db->sql_query($sql_map_config)) )
{
message_die(GENERAL_ERROR, 'Could not query Map Config', '', __LINE__, __FILE__, $sql_map_config);
}
// iterate through the config results to set map params
while ( $mapConfig = $db->sql_fetchrow($result_map_config) )
{
$width = $mapConfig['map_width'];
$width_measure = $mapConfig['width_measure'];
$height = $mapConfig['map_height'];
$height_measure = $mapConfig['height_measure'];
$api_key = $mapConfig['api_key'];
$show_control = $mapConfig['show_control'];
$show_type = $mapConfig['show_type'];
$control_type = $mapConfig['control_type'];
$show_scale = $mapConfig['show_scale'];
$show_overview = $mapConfig['show_overview'];
$init_zoom = $mapConfig['init_zoom'];
$user_zoom = $mapConfig['user_zoom'];
$zoom_limit = $mapConfig['zoom_limit'];
$map_center = $mapConfig['map_center'];
$marker_folder = $mapConfig['marker_folder'];
}
$db->sql_freeresult($result_map_config);
// Now let's put values into the class vars
$myMap->setAPIKey("$api_key");
$myMap->setWidth("$width");
$myMap->setHeight("$height");
$myMap->zoomLimit = $zoom_limit;
$myMap->showControl = $show_control;
$myMap->controlType = $control_type;
$myMap->showType = $show_type;
$myMap->showScale = $show_scale;
$myMap->showOverview = $show_overview;
// sql for map markers
$sql_map_markers = "SELECT *
FROM " . PHOOGLE_MARKERS_TABLE;
if( !($result_map_markers = $db->sql_query($sql_map_markers)) )
{
message_die(GENERAL_ERROR, 'Could not query Map Markers', '', __LINE__, __FILE__, $sql_map_markers);
}
// iterate through the marker results and create array
while ( $mapMarker = $db->sql_fetchrow($result_markers) )
{
$mid = $mapMarker['marker_id'];
$marker[$mid]['id'] = $mapMarker['marker_id'];
$marker[$mid]['image'] = $marker_folder.$mapMarker['marker_image'];
$marker[$mid]['image_width'] = $mapMarker['marker_width'];
$marker[$mid]['image_height'] = $mapMarker['marker_height'];
$marker[$mid]['anchor_x'] = $mapMarker['marker_x'];
$marker[$mid]['anchor_y'] = $mapMarker['marker_y'];
$marker[$mid]['shadow'] = $marker_folder.$mapMarker['shadow_image'];
$marker[$mid]['shadow_width'] = $mapMarker['shadow_width'];
$marker[$mid]['shadow_height'] = $mapMarker['shadow_height'];
}
$db->sql_freeresult($result_markers);
// Send array of markers into the class
$myMap->customMarker = $marker;
// sql for members with map points set - used for 'Show All Users' map and for sidebar list
$sql_all_members = "SELECT username, user_phoogle_map_center, user_phoogle_icon
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS ." AND
user_phoogle_allow = 1 AND
user_phoogle_show_me = 1
ORDER BY username";
if( !($result_all_members = $db->sql_query($sql_all_members)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql_all_members);
}
// This point is always the first point (used to center the map but does not display a map marker).
$myMap->centerMap = "map.setCenter(new GLatLng($map_center), $init_zoom);";
// iterate through the results to display members with map points set
$member_count = 0;
while ( $members = $db->sql_fetchrow($result_all_members) )
{
$username = $members['username'];
$parens = array('(',')');
$user_phoogle_map_center = str_replace($parens, '', $members['user_phoogle_map_center']);
$user_phoogle_icon = $members['user_phoogle_icon'];
// this sends each user's map point (lat,long), comment and icon choice to the map, then clears the $tab var for use by the next loop
$tab[] = '';
$myMap->addGeoPointTabbed($user_phoogle_map_center, $user_phoogle_icon, $tab, $username);
unset($tab);
$member_count++;
}
$template->assign_vars(array(
'L_PHOOGLE_MAP_TITLE' => $lang['Phoogle_Map_Title'],
'L_PHOOGLE_SUB_HEAD' => $lang['Phoogle_Map_Subheading'],
'L_PHOOGLE_LOC_LABEL' => $lang['Phoogle_Loc_Label'],
'MAP_WIDTH' =>$myMap->mapWidth,
'WIDTH_MEASURE' => $width_measure,
'MAP_HEIGHT' =>$myMap->mapHeight,
'HEIGHT_MEASURE' => $height_measure,
'PHOOGLE_SCRIPT' => $myMap->printGoogleJS(),
'PHOOGLE_MAP' => $myMap->showMap(),
'PHOOGLE_COUNT' => $member_count,
'L_PHOOGLE_ALL' => $lang['Phoogle_All_Members'],
'PHOOGLE_VERSION' => $lang['Phoogle_Version'] )
);
// End Phoogle
Code: Select all
<style>
#phoogleMap
{
position: relative;
height: {MAP_HEIGHT}{HEIGHT_MEASURE};
width: {MAP_WIDTH}{WIDTH_MEASURE};
border: 4px inset #03699C;
vertical-align: middle;
}
</style>
Code: Select all
<br clear="all" />
<table cellpadding="2" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th class="thHead" height="25" nowrap="nowrap">{L_PHOOGLE_MAP_TITLE} {L_PHOOGLE_USERNAME}</th>
</tr>
<tr>
<td align="center" class="row1">
<!-- Phoogle Google Map -->
<div id="phoogleMap" class="postbody"></div> <div class="cattitle">{L_PHOOGLE_SUB_HEAD} ({PHOOGLE_COUNT})<span class="row3">
<input name="map_center" type="hidden" id="map_center" size="60" />
<input name="init_zoom" type="hidden" id="message" size="60" />
</span></div></td>
</tr>
</table>
<div class="copyright" align="center">Phoogle Map phpbb MOD {PHOOGLE_VERSION} by <a href="http://www.bassface3d.com">BassFace</a> | Original Phoogle Map Class by <a href="http://www.systemsevendesigns.com">Justin Johnson of systemsevendesigns</a></div>
[/quote]BassFace wrote: mr. wood asked how to put a map on the index page, so I put this together. Thanks for the idea, and for testing, mr. wood!
This will put a stripped down Phoogle map on your index page, right above the footer (You can put it anywhere on the page - just put the <table> code block below at a different spot in index_body.tpl). This map has no userlist to the right, and nothing but usernames in the map comment bubbles.
1. Backup your index.php and templates/subSilver/index_body.tpl.
That should do it (worked on my test server copy at least! ) I'd love to see it in action when you get the edits done, would you PM me a link to your site?
Let me know how it goes.
Bass
BassFace wrote:cherryworld4u wrote:BassFace wrote: I started the v0.0.4 to v1.0.2 update file last night. I'll continue with it tonight. 8) Update files are a lot harder to create than install files.
Hye BassFace,
Thnx for ur appreciation. Is that upgrading files ready plz upload them :neutral:
And plz upload the 0.0.4 installation instruction with it if the prob remains then i will try uninstall and then install ur latest ver.
Thnx 4 this gr8 mod
Almost done, tonight for certain. You can be the Update tester! 8)
Aahz wrote: I just installed this on my board (v1.0.2) and everything seems to be working fine except that the link to the map does not appear in my menu.
I am using the AcidTechBlood style. I realize you can't support all the styles, but I've managed to get other mods to appear in the menu, so if you could just point me to the right spot I could probably find the problem.
http://forum.itswickedfun.net
Aahz wrote: I just installed this on my board (v1.0.2) and everything seems to be working fine except that the link to the map does not appear in my menu.
I am using the AcidTechBlood style. I realize you can't support all the styles, but I've managed to get other mods to appear in the menu, so if you could just point me to the right spot I could probably find the problem.
http://forum.itswickedfun.net
Code: Select all
templates/subSilver/overall_header.tpl
Code: Select all
<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>
Code: Select all
<a href="{U_PHOOGLE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_phoogle.gif" width="12" height="13" border="0" alt="{L_PHOOGLE}" hspace="3" />{L_PHOOGLE}</a>
BassFace wrote: cherryworld,
Here's a link to the v0.0.4b package http://bassface3d.com/phoogle/phpbb_pho ... 0.0.4b.zip
Good luck!
Bass
BassFace wrote: cherryworld,
Here's a link to the .....................
Good luck!
Bass