vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Phoogle! An interactive Google Maps mapping system. (https://vborg.vbsupport.ru/showthread.php?t=141584)

magnus 03-08-2007 10:00 PM

Phoogle! An interactive Google Maps mapping system.
 
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!

magnus 03-09-2007 05:39 PM

Problems:
If you have a problem, please reply to this thread with the following information:
  • vBulletin, PHP and MySQL version numbers.
  • If applicable, the error text. Otherwise, a detailed description.
  • Whether or not you're using (or tested using) the default style.
  • The exact string you used which resulted in the error (ie. [map]123 Main Street[/map])
  • If possible, a link to the thread in question. Otherwise, provide the output of a "View Source" (preferably in a .txt file).

The majority of problems can be attributed to custom skins. I cannot take into account the thousands of skin variations out there -- so I can only truly troubleshoot using the default vB skin. If you're having trouble using the DEFAULT skin, we can work from there. However, if you're unable (or unwilling) to verify the functionality, there's nothing I can do.

icemanic 03-09-2007 05:45 PM

this looks sweet, i could definately use this - will give it a shot later today

Darat 03-09-2007 05:54 PM

I'll definitely try this on my devforum - if it works fine it will be nice add-on - thanks.

KevNJ 03-09-2007 06:15 PM

looks really good will install later tonight.... this is will be good for the geeks GARS system as i use it for a directory of bars and clubs. now ill be able to show a google map with that.. SWEEEEET!!!!

icemanic 03-09-2007 06:28 PM

i tried it but i just see big empty space where the map should be...... any ideas

magnus 03-09-2007 06:36 PM

Quote:

Originally Posted by icemanic (Post 1199677)
i tried it but i just see big empty space where the map should be...... any ideas

Refresh the page. View the source of the page, search for "showmap". Let me know what you find.

Optimally, if you could provide a link to the page I can look myself.

Also, are you trying this with the default style? If not, try it. If it works with the default style, then we'll know it's something with your custom style.

*Edit: One thing I forgot to mention is there is no proper error handling. So, if the address is invalid it will return an empty square.

Try the address listed above in the product post to be sure.

FleaBag 03-09-2007 06:45 PM

Brilliant! Will be awesome for people advertising events.

projectego 03-09-2007 06:53 PM

This looks very interesting... ;)

[high]* projectego clicks install[/high]

bashy 03-09-2007 07:01 PM

Hi

I believe this is broken, well it is on my forum :(
This happened as soon as i previewed the post

If i just post the post then it gives a big blank space
where the map should be and i have refreshed and nothing

Any ideas please, this is the biggest error i have come across lol


Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE post SET phoogle_html = '\n<script type=\"text/javascript\">\n        function showmap()\n        {\n                //<![CDATA[\n                        if (GBrowserIsCompatible())\n                        {\n                                var map = new GMap(document.getElementById(\"map\"));\n                                map.centerAndZoom(new GPoint(, ), 4);\n                        }\n                        var icon = new GIcon();\n                        icon.image = \"http://labs.google.com/ridefinder/images/mm_20_red.png\";\n                        icon.shadow = \"http://labs.google.com/ridefinder/images/mm_20_shadow.png\";\n                        icon.iconSize = new GSize(12, 20);\n                        icon.shadowSize = new GSize(22, 20);\n                        icon.iconAnchor = new GPoint(6, 20);\n                        icon.infoWindowAnchor = new GPoint(5, 1);\n                        map.addControl(new GLargeMapControl());\n                        map.addControl(new GMapTypeControl());\n                //]]>\n        }\n        showmap();\n</script>\n' WHERE postid =  LIMIT 1;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1
Error Number : 1064
Date        : Friday, March 9th 2007 @ 09:00:14 PM
Script      : http://www.bashys-place.com/forums/newthread.php



All times are GMT. The time now is 10:11 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.01261 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete