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

The problem some of you are reporting seems like the showmap(); function isn't being written to SHOWTHREAD. On the page with the blank square, view the source. Scroll to the bottom (or search for </body>), and above that should be a <script>..</script> tag. Within that should be a function. Is it there? If not, that's the problem and we'll go from there..

Until someone can provide me with either an account or source output, all I can do is speculate.
Reply With Quote
  #23  
Old 03-09-2007, 11:57 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works well but all I can get to work is the example in your product description and my UK members are not really interested where the white house is located ..

I've located UK areas on google map and added the information into the bbcode and nothing shows .. for example, I ask google map to find Imperial War Museum Duxford and up it pops, add the same info into the bbcode and blank space !?

Would also be useful to have an option to add a "Map" button to the standard bbcode toolbar.

Great addition with a few tweaks :up:
Reply With Quote
  #24  
Old 03-10-2007, 12:49 AM
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 TTG View Post
Works well but all I can get to work is the example in your product description and my UK members are not really interested where the white house is located ..

I've located UK areas on google map and added the information into the bbcode and nothing shows .. for example, I ask google map to find Imperial War Museum Duxford and up it pops, add the same info into the bbcode and blank space !?
Currently, the Google Maps API doesn't natively support locations by name. So, simply providing "Imperial War Museum Duxford" as a value wouldn't return proper coordinates.

Use this instead:
Quote:
[map=Imperial War Museum Duxford]Duxford, Cambridge, CB2 4QR, UK[/map]


Quote:
Originally Posted by TTG View Post
Would also be useful to have an option to add a "Map" button to the standard bbcode toolbar.
That's planned. As well as figuring out a way to verbosely handle errors properly. /sigh

Quote:
Originally Posted by TTG View Post
Great addition with a few tweaks :up:
Thanks!
Reply With Quote
  #25  
Old 03-10-2007, 01:23 AM
Doctor Death Doctor Death is offline
 
Join Date: Dec 2005
Posts: 449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be a great plugin if it worked. Caused "could not display post" errors and locked up.

Will wait for a few updates, but I am looking forward to them.
Reply With Quote
  #26  
Old 03-10-2007, 01:45 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't track down bugs unless I'm given the information to do so, sadly.
Reply With Quote
  #27  
Old 03-10-2007, 02:17 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
The problem some of you are reporting seems like the showmap(); function isn't being written to SHOWTHREAD. On the page with the blank square, view the source. Scroll to the bottom (or search for </body>), and above that should be a <script>..</script> tag. Within that should be a function. Is it there? If not, that's the problem and we'll go from there..

Until someone can provide me with either an account or source output, all I can do is speculate.
Yeah, this is what I see above </body>:

PHP Code:
<script type="text/javascript">
    function 
showmap136686()
    {
        
//<![CDATA[
            
if (GBrowserIsCompatible())
            {
                var 
map136686 = new GMap(document.getElementById("map136686"));
                
map136686.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(1220);
            
icon.shadowSize = new GSize(2220);
            
icon.iconAnchor = new GPoint(620);
            
icon.infoWindowAnchor = new GPoint(51);
            
map136686.addControl(new GSmallMapControl());
            
map136686.addControl(new GMapTypeControl());
        
//]]>
    
}
    
showmap136686();
</
script
...and yet all I see is the blank post... I have sent you a PM with the hopes of troubleshooting further.
Reply With Quote
  #28  
Old 03-10-2007, 02:52 AM
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
Yeah, this is what I see above </body>:

PHP Code:
<script type="text/javascript">
    function 
showmap136686()
    {
        
//<![CDATA[
            
if (GBrowserIsCompatible())
            {
                var 
map136686 = new GMap(document.getElementById("map136686"));
                
map136686.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(1220);
            
icon.shadowSize = new GSize(2220);
            
icon.iconAnchor = new GPoint(620);
            
icon.infoWindowAnchor = new GPoint(51);
            
map136686.addControl(new GSmallMapControl());
            
map136686.addControl(new GMapTypeControl());
        
//]]>
    
}
    
showmap136686();
</
script
...and yet all I see is the blank post... I have sent you a PM with the hopes of troubleshooting further.
Ok, from that I can tell that it's not retrieving the lat/long coordinates.

This line is incomplete:
Code:
map136686.centerAndZoom(new GPoint(, ), 4);
There should be coordinate locations called within the GPoint(); class. Usually, this is the result of an invalid address. However, you said you tested using the examples provided within the original post.. correct?

I need to try and narrow down if your problem is with the phoogle functions or if the addressData is being lost when sent from vBulletin.
Reply With Quote
  #29  
Old 03-10-2007, 10:58 AM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the help, magnus!

Quote:
Originally Posted by magnus View Post
Hopefully, this will either work or return an error.
Uploaded the new file, replacing the old... created a post... and got this error:

PHP Code:
Warningfile_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /includes/functions_phoogle.php on line 97

Warning
file_get_contents(http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=1600+Pennsylvania+Avenue+NW%2C+Washington%2C+DC+20500) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /includes/functions_phoogle.php on line 97 
Reply With Quote
  #30  
Old 03-10-2007, 11:04 AM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

I have tried your new functions_phoogle.php file and i still get a blank map, here is the source from the page!
I now have the original php file installed

The map location is your white house 1 copied and pasted!!

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

</script>
Reply With Quote
  #31  
Old 03-10-2007, 12:27 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Tralala:

Ok, your problem is obvious. Dreamhost disallows file_get_contents();. No problem, I'll rewrite using cURL.

@Bashy:

You seem to be having the same problem. Do you use Dreamhost as well?
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 06:28 PM.


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.09940 seconds
  • Memory Usage 2,354KB
  • 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
  • (2)bbcode_code
  • (3)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