[BETA] Phoogle (Google) Map

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

[BETA] Phoogle (Google) Map

Post by BassFace » Sun Jan 07, 2007 8:11 pm

MOD Title: Image Phoogle Map
MOD Description: Shows a fully interactive Google Map where your Users can input their location. Very customizable. Note: Requires a free Google Maps API Key from http://www.google.com/apis/maps/.
MOD Version: BETA v1.0.5

MOD Download(s):
Phoogle Map MOD v1.0.5
Phoogle Map MOD v1.0.3b
Phoogle Map MOD v1.0.2d


Released: March 21, 2007

Sample Site: Sample Site is now running v1.0.2d http://www.phooglemap102.bassface3d.com
Admin Username: testadmin
Admin Password: testadmin

Sample Site 2: Sample Site running v1.0.3 http://bassface3d.com/v103/
Admin Username: testadmin
Admin Password: testadmin

Features (for v1.0.2):
Users can input their location (from their Profile page) using a map.
Users can add a comment (also from their Profile page) to show in the info "word balloon" that shows on the map.
Username and Avatar (size constrained based on site settings) automatically show in map Comment "balloon".
'Profile' and 'PM' buttons in user's balloon - respects board theme.
'Smart' infowindows - change configuration based on each user's balloon contents
User can select to be shown on map or not.
Admin can turn users marker 'On' and 'Off' (overrides user's setting to be shown or not).
Admin can set up to 10 Map Marker images (to fit your board's theme) for users to choose from.
Button shows under mapped user's posts and in their Profile

Now uses the Google API's 'double-left-click' = zoom in, 'double-right-click' = zoom out and smooth Zoom features.

Customize:
Main Phoogle page Map Size
Profile page/ACP User Management page Map Size
Map Types to show (Normal/Satellite/Hybrid)
Initial Zoom Setting
Maximum Zoom-In Level
Initial Map Center Setting
Zoom/Pan Controller Size
Show/Hide Map Scale legend
Show/Hide Overview Map controller
Map Marker(s) image/shadow
Last edited by BassFace on Wed Dec 19, 2007 6:25 pm, edited 37 times in total.

PikachuMayhem
Registered User
Posts: 57
Joined: Sun Sep 10, 2006 3:09 pm

Post by PikachuMayhem » Sun Jan 07, 2007 9:19 pm

Nice. :D I'd also like to customise who can use the map. :) With the size/type, would that be by ACP, or by members?

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace » Sun Jan 07, 2007 10:06 pm

PikachuMayhem wrote: Nice. :D I'd also like to customise who can use the map. :) With the size/type, would that be by ACP, or by members?


I have no ACP at present for this. I wanted to release it first to see if there was any interest before I went crazy adding features. :)

Map size is currently set by the admin by editing 2 vars in the map file code.

At present there is no user access control - the map is publicly viewable. I'll add these features to the list of 'things to add if people show interest' :).

User avatar
bum63
Registered User
Posts: 262
Joined: Tue Oct 10, 2006 8:36 pm

Post by bum63 » Mon Jan 08, 2007 4:42 am

cool mod, works fine
Thanks...

PizzaHuge
Registered User
Posts: 360
Joined: Sun Apr 10, 2005 3:36 am

Post by PizzaHuge » Mon Jan 08, 2007 8:40 am

Hi there

the modd looks good, but some how the map doesnt show on my forum, i mean it hide on the upper left corner of my forum instead of staying in the middle, anything else working fine except that

here is the link you can take a look http://tinhthienthu.ath.cx/phoogle_map.php

any help will be very much apprecited

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Post by cavallino » Mon Jan 08, 2007 10:53 am

Hello,
what's more or less than the mod here?
http://www.phpbb.com/phpBB/viewtopic.php?t=355232

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace » Mon Jan 08, 2007 1:50 pm

PizzaHuge wrote: Hi there

the modd looks good, but some how the map doesnt show on my forum, i mean it hide on the upper left corner of my forum instead of staying in the middle, anything else working fine except that

here is the link you can take a look http://tinhthienthu.ath.cx/phoogle_map.php

any help will be very much apprecited


Looks like a map size/height issue, or a div issue cuz you've got the controllers showing, but not in the right places. Could you PM me the code for that whole page? I'll try to take a look and figure it out.
Last edited by BassFace on Mon Jan 08, 2007 2:34 pm, edited 1 time in total.

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace » Mon Jan 08, 2007 1:51 pm

cavallino wrote: Hello,
what's more or less than the mod here?
http://www.phpbb.com/phpBB/viewtopic.php?t=355232


I've not seen that one, so I couldn't tell you. His demo board is down, too. But if its a user Google Map it's probably similar. I'll try to do a more comparitive analysis later. 8O

User avatar
bum63
Registered User
Posts: 262
Joined: Tue Oct 10, 2006 8:36 pm

Post by bum63 » Mon Jan 08, 2007 4:25 pm

Hey BassFace

when I want to update user's info in ACP i get this error:
Warning: Missing argument 10 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 11 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 12 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 13 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169


and here is what I have in functions_validate.php

Code: Select all

function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$location, &$occupation, &$interests, &$sig, &$phooadd, &$phoolat, &$phoolong, &$phoocomm)
{
	$check_var_length = array('aim', 'msnm', 'yim', 'location', 'occupation', 'interests', 'sig', 'phooadd', 'phoolat', 'phoolong', 'phoocomm');
any idea why?
Thanks in advance

PizzaHuge
Registered User
Posts: 360
Joined: Sun Apr 10, 2005 3:36 am

Post by PizzaHuge » Mon Jan 08, 2007 6:05 pm

bum63 wrote: Hey BassFace

when I want to update user's info in ACP i get this error:
Warning: Missing argument 10 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 11 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 12 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 13 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169


and here is what I have in functions_validate.php

Code: Select all

function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$location, &$occupation, &$interests, &$sig, &$phooadd, &$phoolat, &$phoolong, &$phoocomm)
{
	$check_var_length = array('aim', 'msnm', 'yim', 'location', 'occupation', 'interests', 'sig', 'phooadd', 'phoolat', 'phoolong', 'phoocomm');
any idea why?
Thanks in advance


I have noticed i got that problem too

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace » Mon Jan 08, 2007 7:11 pm

Sorry about that. :( There's a file on the admin side that I apparently need to work on.
I appreciate your feedback with these errors. I'll post the solution here and update the download ASAP (which will be this evening after I get home from work.)

PizzaHuge
Registered User
Posts: 360
Joined: Sun Apr 10, 2005 3:36 am

Post by PizzaHuge » Mon Jan 08, 2007 7:15 pm

HI BassFace

i sent you PM about the map in my forum does not stay on the middle

User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace » Tue Jan 09, 2007 3:15 am

Here's the code that fixes this issue:
Warning: Missing argument 10 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 11 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 12 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169

Warning: Missing argument 13 for validate_optional_fields() in /homepages/12/d175856246/htdocs/includes/functions_validate.php on line 169


I'll update the zip file right now as well.

I didn't think to even check the ACP user stuff! Sorry about that! I guess that's why they make you do a BETA phase before release! :roll:
Thanks for your patience!

You'll need to edit 2 more files:
admin/admin_users.php
templates/subSilver/user_edit_body.tpl

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
#
#-----[ AFTER, ADD ]----------------------------------
#
		$phooadd = ( !empty($HTTP_POST_VARS['phooadd']) ) ? trim(str_replace('<br />', "\n", $HTTP_POST_VARS['phooadd'] ) ) : '';
		$phoolat = ( !empty($HTTP_POST_VARS['phoolat']) ) ? trim(strip_tags( $HTTP_POST_VARS['phoolat'] ) ) : '';
		$phoolong = ( !empty($HTTP_POST_VARS['phoolong']) ) ? trim(strip_tags( $HTTP_POST_VARS['phoolong'] ) ) : '';
		$phoocomm = ( !empty($HTTP_POST_VARS['phoocomm']) ) ? trim(strip_tags( $HTTP_POST_VARS['phoocomm'] ) ) : '';
#
#-----[ FIND ]------------------------------------------
#
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
#
#-----[ IN-LINE FIND ]----------------------------------
#
, $signature
#
#-----[ AFTER, ADD ]----------------------------------
#
, $phooadd, $phoolat, $phoolong, $phoocomm
#
#-----[ FIND ]------------------------------------------
#
$signature = htmlspecialchars(stripslashes($signature));
#
#-----[ AFTER, ADD ]----------------------------------
#
			$phooadd = htmlspecialchars(stripslashes($phooadd));
			$phoolat = htmlspecialchars(stripslashes($phoolat));
			$phoolong = htmlspecialchars(stripslashes($phoolong));
			$phoocomm = htmlspecialchars(stripslashes($phoocomm));
#
#-----[ FIND ]------------------------------------------
#
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
#
#-----[ IN-LINE FIND ]----------------------------------
#
. $avatar_sql . "
#
#-----[ AFTER, ADD ]----------------------------------
#
, user_phoogle_address='" . str_replace("\'", "''", $phooadd) . "', user_phoogle_latitude='" . $phoolat . "', user_phoogle_longitude ='" . $phoolong ."', user_phoogle_comment='" . str_replace("\'", "''", $phoocomm) . "'
#
#-----[ FIND ]------------------------------------------
#
$signature = htmlspecialchars(stripslashes($signature));
#
#-----[ AFTER, ADD ]----------------------------------
#
			$phooadd = htmlspecialchars(stripslashes($phooadd));
			$phoolat = htmlspecialchars(stripslashes($phoolat));
			$phoolong = htmlspecialchars(stripslashes($phoolong));
			$phoocomm = htmlspecialchars(stripslashes($phoocomm));
#
#-----[ FIND ]------------------------------------------
#
$signature = preg_replace($html_entities_match, $html_entities_replace, $signature);
#
#-----[ AFTER, ADD ]----------------------------------
#
		$phooadd = htmlspecialchars($this_userdata['user_phoogle_address']);
		$phoolat = htmlspecialchars($this_userdata['user_phoogle_latitude']);
		$phoolong = htmlspecialchars($this_userdata['user_phoogle_longitude']);
		$phoocomm = htmlspecialchars($this_userdata['user_phoogle_comment']);
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="signature" value="' . str_replace("\"", """, $signature) . '" />';
#
#-----[ AFTER, ADD ]----------------------------------
#
			$s_hidden_fields .= '<input type="hidden" name="phooadd" value="' . str_replace("\"", """, $phooadd) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="phoolat" value="' . str_replace("\"", """, $phoolat) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="phoolong" value="' . str_replace("\"", """, $phoolong) . '" />';
			$s_hidden_fields .= '<input type="hidden" name="phoocomm" value="' . str_replace("\"", """, $phoocomm) . '" />';
#
#-----[ FIND ]------------------------------------------
#
'SIGNATURE' => str_replace('<br />', "\n", $signature),
#
#-----[ AFTER, ADD ]----------------------------------
#
			'PHOOGLE_ADDRESS' => $phooadd,
			'PHOOGLE_LATITUDE' => $phoolat,
			'PHOOGLE_LONGITUDE' => $phoolong,
			'PHOOGLE_COMMENT' => str_replace('<br />', "\n", $phoocomm),
#
#-----[ FIND ]------------------------------------------
#
'L_SIGNATURE' => $lang['Signature'],
#
#-----[ AFTER, ADD ]----------------------------------
#
			'L_PHOOGLE_PROFILE' => $lang['Phoogle_Profile'],
			'L_PHOOGLE_ADDRESS' => $lang['Phoogle_Address'],
			'L_PHOOGLE_EXPLAIN' => $lang['Phoogle_Explain'],
			'L_PHOOGLE_LAT' => $lang['Phoogle_Lat'],
			'L_PHOOGLE_LONG' => $lang['Phoogle_Long'],
			'L_PHOOGLE_GET' => $lang['Phoogle_Get'],
			'L_PHOOGLE_COMMENT' => $lang['Phoogle_Comment'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr> 
	  <td class="row1"><span class="gen">{L_SIGNATURE}</span><br />
		<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
		<br />
		{HTML_STATUS}<br />
		{BBCODE_STATUS}<br />
		{SMILIES_STATUS}</span></td>
	  <td class="row2"> 
		<textarea class="post" name="signature" rows="6" cols="45">{SIGNATURE}</textarea>
	  </td>
	</tr>
	<tr> 
	  <td class="catsides" colspan="2"><span class="cattitle">&nbsp;</span></td>
	</tr>
#
#-----[ AFTER, ADD ]----------------------------------
#
	<tr>
	<th class="thSides" colspan="2" height="25" valign="middle">{L_PHOOGLE_PROFILE}</th>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_PHOOGLE_ADDRESS}</span>		</td>
	  <td class="row2"> 
		<input type="text" class="post" style="width: 200px" id="phooadd"  name="phooadd" size="60" maxlength="150" value="{PHOOGLE_ADDRESS}" />	  </td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen"><span class="gensmall">{L_PHOOGLE_EXPLAIN}</span></span></td>
	  <td class="row2">&nbsp;</td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_PHOOGLE_LAT} </span></td>
	  <td class="row2"> 
		<input type="text" class="post"style="width: 200px"  id="phoolat" name="phoolat" size="35" maxlength="150" value="{PHOOGLE_LATITUDE}" />	  </td>
	</tr>	
	<tr> 
	  <td class="row1"><span class="gen">{L_PHOOGLE_LONG} </span><br />
	  	<span class="gensmall"><a href="#" onclick="javascript: window.open('select_map.php?lat={LAT_MAP}&lng={LNG_MAP}','select_map',''); return false;">{L_PHOOGLE_GET}</a></span></td>
	  <td class="row2"><input type="text" class="post"style="width: 200px"  id="phoolong" name="phoolong" size="35" maxlength="150" value="{PHOOGLE_LONGITUDE}" /></td>
	</tr>	
	<tr> 
	  <td class="row1"><span class="gen">{L_PHOOGLE_COMMENT}:</span></td>
	  <td class="row2"> 
		<textarea name="phoocomm" cols="30"  rows="6" class="post" id="phoocomm" style="width: 300px">{PHOOGLE_COMMENT}</textarea>	  </td>
	</tr>
	<tr> 
	  <td class="catSides" colspan="2" height="28">&nbsp;</td>
	</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

Peter77sx
Registered User
Posts: 3246
Joined: Wed Nov 09, 2005 2:51 pm

Post by Peter77sx » Tue Jan 09, 2007 4:02 am

Intresting.. will watch this. :)

aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal » Tue Jan 09, 2007 5:03 am

Hi

I have been searching for a mod like this, totally what I am looking for weeeeeeee!

Moved from SMF to PHPBB and our members have constantly complained that we no longer have a member map like SMF offers, this will solve the problem, if I can get it to work.

Yeeeee Haaaaa!

Will

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 6 guests

cron