Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Phoogle! An interactive Google Maps mapping system. Details »»
Phoogle! An interactive Google Maps mapping system.
Version: 2.0 Beta 2, by magnus magnus is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.5 Rating:
Released: 03-08-2007 Last Update: 04-08-2007 Installs: 140
DB Changes Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

Keywords: Phoogle, Google, Maps, BBCode

Description:
Allows for the insertion of interactive Google Maps within posts via a new BBCode. Supports point labeling as well as multiple points per map.

Details:
I became increasingly annoyed after seeing more and more links to maps being butchered when posted on forums. I had remembered seeing the nifty Phoogle Maps and figured, "why not?"

A few headaches later.. here we are.

[hr]-[/hr]
Usage:
[map]value[/map]
[map=Option]value[/map]

Example:
[map]1600 Pennsylvania Avenue NW, Washington, DC 20500[/map]
[map=The White House]1600 Pennsylvania Avenue NW, Washington, DC 20500[/map]

Multiple Locations Example:
[map]1600 Pennsylvania Avenue NW, Washington, DC 20500;E Capitol St NE & 1st St NE, Washington, DC 20001[/map]
[map=The White House;Capitol Building]1600 Pennsylvania Avenue NW, Washington, DC 20500;E Capitol St NE & 1st St NE, Washington, DC 20001[/map]

[hr]-[/hr]
Installation:
  1. Download and import product-phoogle2.0Beta1.xml via the Product Manager.
  2. If you do not already have one, obtain a free Google Maps API key.
  3. Configure Phoogle! via the AdminCP (vBulletin Options > Phoogle Settings).
  4. ???
  5. Profit!

Notes:
When adding/editing a map via AJAX Quick Reply or Quick Edit, you must refresh the page to see changes.

[hr]-[/hr]
Comments:
As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really.

Version History:
  • 1.0.0 - Initial release, here's to hoping..
  • 1.0.1 - Added check for post preview, [map] code will NOT be parsed when previewing (because it can't).
  • 1.1.0
    • Eliminated need for functions_phoogle.php
    • Modified way [map] tags are parsed
    • Moved previously static html to templates
    • Changed way multiple locations per posts is defined (separated by ;)
    • Added check for cURL() if not, uses file_get_contents()
  • 2.0 Beta 1
    • Proper error handling. Will now verify address (and make reccomended changes) before submitting.
    • Javascript will not be loaded on pages that do not have maps (woops!)
    • Few internal tweaks to (hopefully) speed things up.
  • 2.0 Beta 2 - Plays nice with the [noparse][/noparse] tags. (thanks Tralala)

* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 03-17-2007, 06:55 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...if not as a user selectable option per map... how about an AdminCP setting for forum-wide default (like we can with Zoom level.) I'd like the maps to show up as Satellite (or Hybrid) by default, rather than the standard "street map" view.
Reply With Quote
  #93  
Old 03-18-2007, 04:03 PM
Doctor Death Doctor Death is offline
 
Join Date: Dec 2005
Posts: 449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really want this to work on my board... I have installed (and deinstalled) every version of it since it showed up here hoping it would work...

Here is what happens:

It installs perfectly every time.

After I make a post with [map] [/map] codes in it, you will no longer be able to access that post.

Internet Explorer 7 (which is what I use) gives (not vbulletin) the error that says it cannot display the page.

The error message shown shows the proper path etc to the posting. I have to uninstall the plugin and then go back and delete the post. You cannot edit the post while this error is occuring because it will not let you view the post.

Here are my versions:
Reply With Quote
  #94  
Old 03-18-2007, 04:47 PM
Dr.NoTime Dr.NoTime is offline
 
Join Date: Nov 2006
Location: Johnson City,TN
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"Installed" Works great. Thanks!

I am using Firefox 2.0.0.2
Reply With Quote
  #95  
Old 03-18-2007, 08:51 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Doctor Death View Post
I really want this to work on my board... I have installed (and deinstalled) every version of it since it showed up here hoping it would work...

Here is what happens:

It installs perfectly every time.

After I make a post with [map] [/map] codes in it, you will no longer be able to access that post.

Internet Explorer 7 (which is what I use) gives (not vbulletin) the error that says it cannot display the page.

The error message shown shows the proper path etc to the posting. I have to uninstall the plugin and then go back and delete the post. You cannot edit the post while this error is occuring because it will not let you view the post.

Here are my versions:
Well, first things first. Let's see if this is an issue with the modification or Phoogle itself. Download the attached zip file and extract the files to the same directory. Edit the test.php file and add your Google API key. Then try and access the test.php file and see if your browser will display the map.

We'll go from there.
Reply With Quote
  #96  
Old 03-19-2007, 10:54 AM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have the same problem as Doctor Death. I posted a map and immediately Internet Explorer says it can't open the page now.

I tried viewing the same post in Default Style, and it displays the [map]address[/map] but no actual map.

Code:
<script type="text/javascript">
	function showmap127803()
	{
		//<![CDATA[
			if (GBrowserIsCompatible())
			{
				var map127803 = new GMap(document.getElementById("map127803"));
				map127803.centerAndZoom(new GPoint(-83.204936, 42.537769), 6);
			}
			var icon = new GIcon();
			icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
			icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
			icon.iconSize = new GSize(12, 20);
			icon.shadowSize = new GSize(22, 20);
			icon.iconAnchor = new GPoint(6, 20);
			icon.infoWindowAnchor = new GPoint(5, 1);
			
			map127803.addControl(new GSmallMapControl());
			
			
			map127803.addControl(new GMapTypeControl());
			
			var point0127803 = new GPoint(-83.204936, 42.537769);
			var marker0127803 = new GMarker(point0127803);
			map127803.addOverlay(marker0127803)
			GEvent.addListener(marker0127803, "click", 	function()
				{
					
					marker0127803.openInfoWindowHtml("<font face="Arial"><font size="2">33828 Woodward Avenue Birmingham MI 48009</font></font>");
					
				}
			);

		//]]>
	}
	showmap127803();
</script>
Reply With Quote
  #97  
Old 03-19-2007, 12:12 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hinting off the previous posts I saw, I removed the map code from the first post and posted into the 2nd post. The mapcode disappeared and I get a blank space with no box or anything... atleast it's getting somewhere.

I noticed IE shows a "Done but with errors" message. Opening it up, it says the error is on line 1902. Opened the view source and 1902 is infact part of the showmap function.
Code:
<script type="text/javascript">
	function showmap127819()
	{
		//<![CDATA[
			if (GBrowserIsCompatible())
			{
				var map127819 = new GMap(document.getElementById("map127819"));
				map127819.centerAndZoom(new GPoint(-83.204936, 42.537769), 6);
			}
			var icon = new GIcon();
			icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
			icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
			icon.iconSize = new GSize(12, 20);
			icon.shadowSize = new GSize(22, 20);
			icon.iconAnchor = new GPoint(6, 20);
			icon.infoWindowAnchor = new GPoint(5, 1);
			
			map127819.addControl(new GSmallMapControl());
			
			
			map127819.addControl(new GMapTypeControl());
			
			var point0127819 = new GPoint(-83.204936, 42.537769);
			var marker0127819 = new GMarker(point0127819);
			map127819.addOverlay(marker0127819)
			GEvent.addListener(marker0127819, "click", 	function()
(THIS IS LINE 1902)				{
					
					marker0127819.openInfoWindowHtml("<font face="Arial"><font size="2">33828 Woodward Avenue Birmingham MI 48009</font></font>");
					
				}
			);

		//]]>
	}
	showmap127819();
</script>
IE says line 1902, char 52, expected ')', code:0. Line 1902 is indicated in the code... hope this helps.
Reply With Quote
  #98  
Old 03-19-2007, 12:27 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, getting further... I don't know what changed, but I can view the thread in my normal customized template without any IE crashes. It loads the thread fully for me now, but still has the blank area.

I'm testing it on my live forum, with a nice "warning title" for the thread haha. Anyway here's the thread so you can see the page source:
http://www.mifbody.com/vbulletin/sho...819#post127819

Trying to use in IE7. Server's config: apache v1.3.33, PHP 4.4.4, MySQL 4.1.21-standard.
Reply With Quote
  #99  
Old 03-19-2007, 12:32 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for the huge rounds of posting, just trying to help everyone out with the "troubleshooting" because this addon will be gold when it's finished.

Thinking it wouldn't cause the browser Operation Aborted error, I went to a different post and tried the map. It did the error like it did before and didn't want to load. I switched to my default style, and (DO NOT ASK ME HOW...) the map loads perfectly fine!!! Why it loads in one thread and not in the other (both in default style), no clue... will continue trouble shooting that.

Update: Went into the thread that I linked to in above post, I had a member say the browser did not crash, so I tested another map... the 2nd map displays perfectly fine (in default style) in post #4, but the map in post #2 does not load (blank space). I went to maps.google.com and put the same address as post #2's map has and it loads fine, so it's not an error with google map's not recognizing the address...

The address for both have commas ( , ) between the street address and the city, and then between the city and state. not sure if this makes a difference or not.

2nd Update: Figured "OK, there must be a difference somewhere that one would work and one wouldn't..." So I looked at the HTML source code. The 1st map that does not load, in the marker text, it puts

Code:
marker0127819.openInfoWindowHtml("<font face="Arial"><font size="2">33828 Woodward Avenue, Birmingham, MI 48009</font></font>");
For the second map, which does work:
Code:
marker0127832.openInfoWindowHtml("33828 Woodward Avenue, Birmingham, MI 48009");
That was the problem. I went into the 1st map's edit post, switched to code view, and sure enough there was the font BB code. So, it would be beneficial to have it strip BB code from the address, or else you'll have the blank area. Once I removed the font BB code between the [map][/map] it worked like a charm (in the Default style)


Update 3: Unfortunately, switching back to our customized style ... IE tries to load the page and then I get the message "Operation Aborted." I can't view the source code, can't do anything but hit "OK" and then it switches over to "The Page Can Not Be Displayed" so I can't troubleshoot it all that much. Maybe someone from here going to that thread within IE will see the same message?
Reply With Quote
  #100  
Old 03-19-2007, 01:33 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using FireFox, I checked the link (http://www.mifbody.com/vbulletin/showthread.php?t=7876) and everything appeared fine. Using IE7, I received the same error you did -- which is strange, because using IE7 I can view my development forum just fine.

I'll see what I can track down.

Would you have a problem if I created an account on your forum and created a test thread?
Reply With Quote
  #101  
Old 03-19-2007, 02:00 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I continued troubleshooting the issue. The weird part is I get the error with the customized style, but not the default style. My first thought was that the biggest difference between my customized style and the default style was the header. So, I copied my header from the custom style and pasted it into my default style and TADA -- Operation Aborted error message!

I systematically went through and removed code by code to figure out what it was that caused the Operation Aborted error. It turns out, the conflict is an open-ended table in the header used for making a left column.

Code:
<!-- content table -->
$spacer_open

$_phpinclude_output

$welcomeheaders

<table border=0 cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width=100% valign="top">
<tr>
<td width="145">
&nbsp;
</td>
<td>
This caused the error message. I simply ended the table with a </td></table> and TADA no error message. So, there's the culprit for ME atleast... if Doctor Death can chime in, maybe he has the same type of header with a left column code.


@ magnus -- Any ideas on what would cause that with an open ended table that encompasses everything between the header and footer?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04823 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete