[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.
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Wingzfan wrote: Having a issue. When I select my location in my profile or anyone else puts they'res in the map fails to load. If noone has selected a location then the map loads fine.


I think/guess the issue might be with your 'sd' template. I see that you offer multiple templates to your users.
a) Copy phoogle_map.tpl into each of your templates' main folder.
b) Next, can you change the template you use (in your Profile) and see if this error occurs in each template?

The reason I say this is that I see some code in your map page's source code that doesn't look like it's 'normal' phoogle_map.php created stuff: namely

Code: Select all

new GInfoWindowTab("Comment","<div class='gen'></div><a href=privmsg.php?mode=post&u=4><img src=templates/sd/images/lang_english/icon_pm.gif" width="59" height="18" class="imgtopic alt=Send private message title=Send private message border=0 /></a>&nbsp;&nbsp;<a href=profile.php?mode=viewprofile&u=4><img src=templates/sd/images/lang_english/icon_profile.gif" width="59" height="18" class="imgtopic alt=View user's profile title=View user's profile border=0 /></a>"

There are some missing double-quote marks there in the tag to create the profile button. And this may cause the javascript to screw up that draws the map.

Let me know what happens - we'll figure it out. 8)
Maschi
Registered User
Posts: 4
Joined: Thu Apr 12, 2007 3:58 pm
Location: Germany- Duisburg
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Maschi »

i cant see the map display too, can you check it bass?
Image

on http://escserver.es.funpic.de/forum/phoogle_map.php

Thx

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

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

raqman wrote: Hi Bass,

Added your code, which nearly works, wondered if it was able to refine to go to phoogle after login.

I.e, when you get an email saying you have a private message, you click on the link, it takes you to the login page, you login in then automatically it takes you to the inbox.

Here with your code, it takes you to the login page which works great, then you login, but then it takes you to the main page of the forum, so one has to do a double operation, or even worse, think that the link does not work.

Hope it makes sense and is an easy fix~

-----------------------------------------------------------------------

HEHE, I love PHP, I fixed it myself :-)

Original code:
// Registered users only can see map
if ( !$userdata['session_logged_in'] || $userdata['user_id'] == ANONYMOUS )
{
redirect(append_sid("login.".$phpEx."?redirect=index.".$phpEx, true));
exit;
}

Change to:

// Registered users only can see map
if ( !$userdata['session_logged_in'] || $userdata['user_id'] == ANONYMOUS )
{
redirect(append_sid("login.".$phpEx."?redirect=phoogle_map.".$phpEx, true));
exit;
}

So last part had redirect hitting login then index, I changed index to hit phoogle_map

:-)


BRILLIANT! :D :D
I'll change that previous post to do this instead! 8)
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Wingzfan and Maschi,
I've looked into it a bit and it is definitely a template issue - that is a phoogle map conflict with your templates. Maschi, I was able to find your fiblack theme and install it on my test server, and my map disappears, too.

Give me a little time to solve this one. I'm fairly certain it revolves around the images for the PM and Profile buttons which should appear in each user's comment bubble inside the map.

To wit:
subSilver builds it's Icon/Button variables like this:

Code: Select all

$images['icon_profile'] = "$current_template_images/{LANG}/icon_profile.gif";
$images['icon_pm'] = "$current_template_images/{LANG}/icon_pm.gif";

and fiblack builds them like this:

Code: Select all

$images['icon_profile'] = "$current_template_images/{LANG}/icon_profile.gif\" width=\"$topic_iw\" height=\"$topic_ih\" class=\"imgtopic";
$images['icon_pm'] = "$current_template_images/{LANG}/icon_pm.gif\" width=\"$topic_iw\" height=\"$topic_ih\" class=\"imgtopic";
Looks like I may need to change phoogle_map.php a bit to handle this. Stay tunded.... :D
Wingzfan
Registered User
Posts: 441
Joined: Wed Jan 25, 2006 4:55 pm

Re: [BETA] Phoogle (Google) Map

Post by Wingzfan »

Thanks bass. All my templates are actually the exact same templates with different color schemes so changing it wouldnt help. Hopefully theres a solution cuz Im really liking the way youve done this made comparred to other map mods.
Wingzfan
Registered User
Posts: 441
Joined: Wed Jan 25, 2006 4:55 pm

Re: [BETA] Phoogle (Google) Map

Post by Wingzfan »

Thats exactly what the problem is bass. I replaces my images code in my cgf file with the standard code from subsilver and the map works perfectly.
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Wingzfan wrote: Thats exactly what the problem is bass. I replaces my images code in my cgf file with the standard code from subsilver and the map works perfectly.


That's good news that we've located the issue, thanks for testing that out. Now what to do about it so you all don't have to change your template's cfg file to make it work. :?

When you replace the image codes in your .cfg does it mess the images up (size changes, stuff like that) on other pages?

I'll take a deeper look tomorrow for a more permanent solution, but if you find one in the meantime, please post it here.
Wingzfan
Registered User
Posts: 441
Joined: Wed Jan 25, 2006 4:55 pm

Re: [BETA] Phoogle (Google) Map

Post by Wingzfan »

No it doesnt mess up my profile and pm buttons at all. Everything works fine using the subsilver code. It only took a second to edite the cfg so maybe just include that in the instructions?
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Wingzfan wrote: No it doesnt mess up my profile and pm buttons at all. Everything works fine using the subsilver code. It only took a second to edite the cfg so maybe just include that in the instructions?


Well, really a MOD should work with any Style DB approved template, so I think I should make the MOD work with the template, and not the template work with the MOD :lol: .

I may have found the solution - I've tested this in IE 6 and Firefox 2 using both fiblack and subSilver.


Wingzfan, I'd appreciate it if you could try this for sure, and put your .cfg file back to its original state. Maschi, this should work for you, too.

OPEN phoogle_map.php
FIND - In 2 different places

Code: Select all

// Build Profile image/link - to be put in 2nd tab of user's Comment bubble		
		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
		$profile_img = "<a href=" . $temp_url . "><img src=" . $images['icon_profile'] . " alt=" . $lang['Read_profile'] . " title=" . $lang['Read_profile'] . " border=0 /></a>";
		
// Build PM image/link - to be put in 2nd tab of user's Comment bubble
		$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id");
		$pm_img = "<a href=" . $temp_url . "><img src=" . $images['icon_pm'] . " alt=" . $lang['Send_private_message'] . " title=" . $lang['Send_private_message'] . " border=0 /></a>";
REPLACE WITH

Code: Select all

// Build Profile image/link - to be put in 2nd tab of user's Comment bubble		
		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
		$profile_img = "<a href=\"" . $temp_url . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . "\" title=\"" . $lang['Read_profile'] . "\" border=\"0\" /></a>";
		$profile_img = addslashes($profile_img);
		
// Build PM image/link - to be put in 2nd tab of user's Comment bubble
		$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id");
		$pm_img = "<a href=\"" . $temp_url . "\"><img src=\"" . $images['icon_pm'] . "\" alt=\"" . $lang['Send_private_message'] . "\" title=\"" . $lang['Send_private_message'] . "\" border=\"0\" /></a>";
		$pm_img = addslashes($pm_img);
Maschi
Registered User
Posts: 4
Joined: Thu Apr 12, 2007 3:58 pm
Location: Germany- Duisburg
Contact:

Re: [BETA] Phoogle (Google) Map

Post by Maschi »

Yeah Bass, it works fine and correct now! :D

Thank you for fixed and your nice Mod :)


ps:
little question;
is it possible to dispaly the map at complete side? (eg 100% side width )
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Maschi wrote: ps:
little question;
is it possible to dispaly the map at complete side? (eg 100% side width )

Yes, you can set the map width/height in the Phoogle Map section of the Admin Control Panel. There is a width/height setting for the main map and for the map that displays on the users' Profile page.
Attachments
View of the Phoogle Map ACP page.
View of the Phoogle Map ACP page.
ScreenShot006.jpg (27.51 KiB) Viewed 77 times
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Just finished updating my personal site's Map markers

Post by BassFace »

If you're at all curious - I just finished updating my own site's Phoogle Map, and made custom markers for it. You can see it at http://bassface3d.com/phpbb2/phoogle_map.php
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Also, at my site, you can see I finally figured out a way to get the sidebar links to open the users' comment bubbles without having to refresh/reload the page for each one! The map just pans or jumps, depending on distance, to new comment bubble. :D :D

I'll be releasing a zip soon with replacement files for phoogle_map.php and phpbb_phoogle_class.php (no editing needed for this one) for those interested in this function. 8)
gansert
Registered User
Posts: 581
Joined: Wed Mar 08, 2006 8:48 pm
Location: KÖLN, GERMANY
Contact:

Re: [BETA] Phoogle (Google) Map

Post by gansert »

BassFace wrote: ...

I'll be releasing a zip soon with replacement files for phoogle_map.php and phpbb_phoogle_class.php (no editing needed for this one) for those interested in this function. 8)



Very cool. Try that also if it is ready to download. :D
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

BassFace wrote: Also, at my site, you can see I finally figured out a way to get the sidebar links to open the users' comment bubbles without having to refresh/reload the page for each one! The map just pans or jumps, depending on distance, to new comment bubble. :D :D

I'll be releasing a zip soon with replacement files for phoogle_map.php and phpbb_phoogle_class.php (no editing needed for this one) for those interested in this function. 8)


Well, this isn't as quick and easy as I thought. This feature doesn't take into account what to do when the Phoogle Map' button is clicked from 'View Profile' and under users' posts. I'll have to figure a way to make this work as well before I can release it. :(
Post Reply

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

cron