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
  #32  
Old 03-10-2007, 12:35 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attached is a functions_phoogle.php utilizing cURL() instead. Let me know if this fixes it for you.
Reply With Quote
  #33  
Old 03-10-2007, 01:02 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus View Post
Attached is a functions_phoogle.php utilizing cURL() instead. Let me know if this fixes it for you.
Thanks! Okay, now we are getting somewhere... a map appears in my post. However, if I have multiple posts in a thread with maps, all with different addresses, the resulting images all appear to match the same as the first. IE: Post #1 had [map=The White House]1600 Pennsylvania Avenue NW, Washington, DC 20500[/map], and post #2 had my address... but when I refreshed the thread, both posts showed maps of The White House. I imagine/hope this is an easy fix.

Minor suggestion:
I would like it if when the map is clicked, it opens the full Google Map in a new window rather than taking over the existing window. Perhaps consider making that an Admin (and/or User) preference?

This is a GREAT add-on, thanks so much for sharing your work on it!
Reply With Quote
  #34  
Old 03-10-2007, 01:05 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus View Post
@Bashy:

You seem to be having the same problem. Do you use Dreamhost as well?
FWIW, I'm aware of quite a few hosts who have disabled the PHP option allow_url_fopen, and thus have disallowed file_get_contents()... for security reasons. (Not just Dreamhost.) Apparently cURL is more secure, and is a feature-rich alternative. Thanks for providing the alternate file... it appears to be a step in the right direction for me.
Reply With Quote
  #35  
Old 03-10-2007, 01:18 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No m8, I am using a dedicated server from bobhosting

EDIT: and the curl file did nothing for me

Just in case heres the source again

BTW enjoy the wedding

Code:
<script type="text/javascript">
function showmap51602()
{
//<![CDATA[
if (GBrowserIsCompatible())
{
var map51602 = new GMap(document.getElementById("map51602"));
map51602.centerAndZoom(new GPoint(, ), 4);
}
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);
map51602.addControl(new GLargeMapControl());
map51602.addControl(new GMapTypeControl());
//]]>
}
showmap51602();

</script>
Reply With Quote
  #36  
Old 03-10-2007, 03:44 PM
bela-meaad bela-meaad is offline
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can i install this with
VBGooglemap Hotspot Edition

or that will cause problem?

How to get the value?

How to not give permissions to the members?

Thanks
Reply With Quote
  #37  
Old 03-10-2007, 11:08 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 Tralala View Post
Thanks! Okay, now we are getting somewhere... a map appears in my post. However, if I have multiple posts in a thread with maps, all with different addresses, the resulting images all appear to match the same as the first. IE: Post #1 had [map=The White House]1600 Pennsylvania Avenue NW, Washington, DC 20500[/map], and post #2 had my address... but when I refreshed the thread, both posts showed maps of The White House. I imagine/hope this is an easy fix.

Minor suggestion:
I would like it if when the map is clicked, it opens the full Google Map in a new window rather than taking over the existing window. Perhaps consider making that an Admin (and/or User) preference?

This is a GREAT add-on, thanks so much for sharing your work on it!
After some testing, I've only been able to replicate that result when inline editing a thread and changing multiple maps. Are you using the inline editor, or are you creating a new reply? If not, give that a try. Otherwise, can you post the resulting <script></script> information once again?

Thanks.
Reply With Quote
  #38  
Old 03-10-2007, 11:10 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 bela-meaad View Post
can i install this with
VBGooglemap Hotspot Edition

or that will cause problem?
I'm not sure if this will work with VBGooglemap, I haven't tried. It's my understanding VBGooglemap isn't displayed via SHOWTHREAD, so I wouldn't anticipate a problem.

Quote:
Originally Posted by bela-meaad
How to get the value?
Get what value? The address? You just type it in.

Quote:
Originally Posted by bela-meaad
How to not give permissions to the members?
I haven't added permissions yet.
Reply With Quote
  #39  
Old 03-11-2007, 02:51 AM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus View Post
After some testing, I've only been able to replicate that result when inline editing a thread and changing multiple maps. Are you using the inline editor, or are you creating a new reply? If not, give that a try. Otherwise, can you post the resulting <script></script> information once again?

Thanks.

I posted via QuickReply as well as "Advanced" Reply, and always got the same result... the address of the first map in the thread is used for all maps.

Here is the <script> info from the page's source, I changed the address to a nearby location for illustrative purposes:

PHP Code:
<script type="text/javascript">
    function 
showmap136825()
    {
        
//<![CDATA[
            
if (GBrowserIsCompatible())
            {
                var 
map136825 = new GMap(document.getElementById("map136825"));
                
map136825.centerAndZoom(new GPoint(-77.03722338.898563), 4);
            }
            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(1220);
            
icon.shadowSize = new GSize(2220);
            
icon.iconAnchor = new GPoint(620);
            
icon.infoWindowAnchor = new GPoint(51);
            
map136825.addControl(new GSmallMapControl());
            
map136825.addControl(new GMapTypeControl());
            var 
point0136825 = new GPoint(-77.03722338.898563);
            var 
marker0136825 = new GMarker(point0136825);
            
map136825.addOverlay(marker0136825)
            
GEvent.addListener(marker0136825"click", function()
                {
                    
marker0136825.openInfoWindowHtml("1600 Pennsylvania Avenue NW, Washington, DC 20500");
                }
            );
            var 
point1136825 = new GPoint(-118.34096534.066642);
            var 
marker1136825 = new GMarker(point1136825);
            
map136825.addOverlay(marker1136825)
            
GEvent.addListener(marker1136825"click", function()
                {
                    
marker1136825.openInfoWindowHtml("200 South Orange Avenue, Los Angeles, CA 90036");
                }
            );
        
//]]>
    
}
    
showmap136825();
</
script

Another interesting data point. If the map in post #1 is for "200 South Orange Avenue, Los Angeles, CA 90036" and the map in post #2 is for a nearby address, say, "300 South Orange Avenue, Los Angeles, CA 90036"... the map in post #2 has two red pointers in it, for both addresses.
Reply With Quote
  #40  
Old 03-11-2007, 04:06 AM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great. Maybe a stupid question but what is the standard method to put addresses between [ map ] tags?
Reply With Quote
  #41  
Old 03-11-2007, 07:38 AM
bela-meaad bela-meaad is offline
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why can`t we use
latitude & longitude
as Value?

isn`t good idea?

Thanks
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:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14241 seconds
  • Memory Usage 2,347KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (7)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