vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - Interactive Google Maps In Post (https://vborg.vbsupport.ru/showthread.php?t=235625)

BirdOPrey5 07-08-2010 04:37 PM

Quote:

Originally Posted by benstillman (Post 2066398)
Seems to be working fine for me. I just typed "Redmond City Hall 98052" within the map tags.

That's weird too- when I put in "Redmond City Hall 98052" like you it works fine but when I tried the full address like the guy posted, it doesn't show the place marker.

mimocherry 07-08-2010 05:01 PM

1 Attachment(s)
I think that I didnt give a good example. I apologize because even you enter the direct address in the maps.google.com, it will not display the picture, so it has nothing to do with your code. (although, I want to know why the name will display picture, but the address would not on the google map..odd)

take this example. that is an address of the sushi restaurant. I tried that in the maps.google first so I will not waste your time. do you see the nice picture?
11818 Northeast 8th Street, Bellevue, WA‎

but, when I enter the same address in your map bbcode, I will not see it!

benstillman 07-08-2010 06:20 PM

Quote:

Originally Posted by mimocherry (Post 2066415)
I think that I didnt give a good example. I apologize because even you enter the direct address in the maps.google.com, it will not display the picture, so it has nothing to do with your code. (although, I want to know why the name will display picture, but the address would not on the google map..odd)

take this example. that is an address of the sushi restaurant. I tried that in the maps.google first so I will not waste your time. do you see the nice picture?
11818 Northeast 8th Street, Bellevue, WA‎

but, when I enter the same address in your map bbcode, I will not see it!

Another bad example I think. The image shown on maps.google.com is simply a thumbnail link directing to the street view. Street view, as far as I know, isn't supported in embedded maps. So no, that picture wouldn't show up within this bbcode.

mimocherry 07-08-2010 06:33 PM

A bad example brought a good explanation!

I got it now! thanks!

what a pity. I really like that street view image :-(

benstillman 07-09-2010 04:57 PM

Quote:

Originally Posted by mimocherry (Post 2066455)
A bad example brought a good explanation!

I got it now! thanks!

what a pity. I really like that street view image :-(

Sweet. Glad that got worked out.

rares.stanescu 09-24-2010 05:40 PM

This code is awesome :) Thanks a lot!

I just need one more thing. how can i set the zoom and the default mode ( map satelite... )

Thanks :)

ravencr 09-24-2010 06:26 PM

How can I modify this to insert any page url into an iframe within any post?

Chris

BirdOPrey5 09-24-2010 07:53 PM

Quote:

Originally Posted by rares.stanescu (Post 2102790)
This code is awesome :) Thanks a lot!

I just need one more thing. how can i set the zoom and the default mode ( map satelite... )

Thanks :)

Try adding "&z=10" after "&output=embed" in the code... set the number 10 to whatever zoom level you want, I think it goes 1 to 14... Not sure what would happen if the link already specifies a different zoom.

Quote:

Originally Posted by ravencr (Post 2102809)
How can I modify this to insert any page url into an iframe within any post?

Chris

It is a bad idea to allow users to embed iframes because they can link to pages with security issues and your users could get viruses or exploited by malicious users... but if you don't care change the line:
Code:

src="http://maps.google.com/maps?q={param}&output=embed"
to

Code:

src="{param}"
Or alternatively you could search the mods for a dedicated "IFRAME" BB Code, I know there is one.

ravencr 09-24-2010 08:04 PM

I figured it out and posted it up for folks. Thanks for the help,

Chris

Bergler 11-05-2010 07:06 AM

Quote:

Originally Posted by ravencr (Post 2102848)
I figured it out and posted it up for folks. Thanks for the help,

Chris

What did you do and does it still work in 4.0.8?

BirdOPrey5 11-05-2010 02:47 PM

I'm using this on my 4.0.8 test board just fine using the original instructions and "Disable Automatic Link Parsing" to YES.

BadgerDog 11-05-2010 03:43 PM

Tried to set up and save this BBCode for 4.04 but get this error when attempting to save ... :confused:

Can someone fix this code?

Quote:

The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes.

* <div align="center" style="margin: 5px 5px 5px 5px;"> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%"> <tr> <td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q={param}&output=embed"></iframe></td> </tr> </table> </div>
Thanks ... :)

Regards,
Badger

BirdOPrey5 11-05-2010 04:40 PM

You can safely hit "Continue" and ignore that error... it's a bug- the code it correct and safe.

BadgerDog 11-05-2010 06:45 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2118342)
You can safely hit "Continue" and ignore that error... it's a bug- the code it correct and safe.

Thank you .. :)

Appreciate the feedback ... :up:

Regards,
Badger

dall100 11-25-2010 10:54 PM

I love this mod and my members do, however it won't work on my frontpage (vbadvanced 4.1) I get a blank square and my left-hand column doesn't show.

(VBulletin 4.8.0)

smirkley 12-04-2010 09:37 PM

How would I use this to embed the satellite view version instead of road maps.

tia

BirdOPrey5 12-04-2010 09:46 PM

Try adding &t=h to the embed URL, so the replacement would be:

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q={param}&t=h&output=embed"></iframe></td>
</tr>
</table>
</div>


smirkley 12-04-2010 10:29 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2129377)
Try adding &t=h to the embed URL, so the replacement would be:

Code:

<div align="center" style="margin: 5px 5px 5px 5px;">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" style="text-align:center"><iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q={param}&t=h&output=embed"></iframe></td>
</tr>
</table>
</div>


THANK YOU !!


Out of curiosity, how many other url configurations are there?

Like if for example, I wanted the satellite view without the streets and labeles.

BirdOPrey5 12-04-2010 11:58 PM

Go to google maps, make the map how you want it, click on the "link" option to generate the link and look at the long URL it generates. Look at whatever is after "&t=" h=hybrid probably... maybe 's' is satellite only? Make the link and check.

smirkley 12-05-2010 08:08 PM

Thanks again...

note, found out that "k" is for sat only.

bulldog51981 12-23-2010 04:24 PM

Ok, so everything looks good with one small exception...only about half of the map shows in about half of the frame. Any ideas?

Here's a link to one of the pages where you can see an example:

http://stlryderz.com/showthread.php?...y-Thur-Dec-9th

Thanks

BirdOPrey5 12-23-2010 04:37 PM

That's a weird one... best guess right now is something in your style is throwing it off... Try it in the default style and see if you have the same problem.

To use the default style make a new style with no parent style:
ACP==>style manager==>add new style==>just choose a name==>save

bulldog51981 12-23-2010 04:45 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2138160)
That's a weird one... best guess right now is something in your style is throwing it off... Try it in the default style and see if you have the same problem.

To use the default style make a new style with no parent style:
ACP==>style manager==>add new style==>just choose a name==>save

Ok, did that and still that same thing. Go to the same link and look at the bottom of the screen on the left and you can change to "test" style there for demo. Could it possibly be that we upgraded to 4.1? Or something completely different? Thanks for such a quick response. BTW, We have had this code running perfectly since Oct when it first went in, just recently I noticed this, but I'm not sure exactly when it started. We upgraded to 4.1PL2 about 2 days ago, but again, not sure if it was ok immediately before and after that.

Thanks again!
:)

BirdOPrey5 12-23-2010 07:51 PM

I see you have since removed the google map from that post... before it was gone I was able to see that whatever is causing it seems to be part of your css.php file... when I removed the css link to this file the map was normal sized, though of course everything else was bad without the css.

I'm not really sure what this means, possibly a mis configured stylevar... I can't really troubleshoot anymore from here.

One more thing to try, in the replacement code for the BB Code get rid of the table tag, the only code you really need is:

Code:

<iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q={param}&output=embed"></iframe>
See if that gives better results.

OldSchoolDSL 12-23-2010 09:36 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2138273)
I see you have since removed the google map from that post... before it was gone I was able to see that whatever is causing it seems to be part of your css.php file... when I removed the css link to this file the map was normal sized, though of course everything else was bad without the css.

I'm not really sure what this means, possibly a mis configured stylevar... I can't really troubleshoot anymore from here.

One more thing to try, in the replacement code for the BB Code get rid of the table tag, the only code you really need is:

Code:

<iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q={param}&output=embed"></iframe>
See if that gives better results.


Installed and used this as the final code.

Working on 4.1 PL2

printedgear 12-24-2010 12:26 AM

My apologies for this noob question. This is only the 2nd thing I've added and it works great. I just don't know how to add the map icon. It says to input the URL. NOOB question...how do I do that? Sorry again...

BirdOPrey5 12-24-2010 01:38 AM

You need to upload the icon to your site, usually in your /images/editor/ folder...
Then in the box that asks for path to the image put in the file path, usually something like:
/images/editor/map.gif
(or whatever the file name is)

printedgear 12-24-2010 02:59 AM

Thanks BOP. I had put public_html in the path. I called hostgator just after posting and they told me what to do. Thanks for the Hack and I will love it! Is there a way to change "Wrap [map] tags around selected text" to something like "place street address between [map] and [/map]"?

BirdOPrey5 12-24-2010 04:12 AM

Glad you're up and running... this isn't my mod, it is by benstillman, I just answer questions since he marked it "unsupported."

As for changing the text of the box- unfortunately no, if you changed it, it would change for all BB Codes and it wouldn't make any sense.

Quads 01-21-2011 03:29 AM

Great hack.

When user click the google map (location marker example), they are taken to google maps in the same window are leave my forum. How can I make this so that a new tab is opened if they click the map?

Videx 01-23-2011 12:07 PM

FWIW, I finally got around to using Bing maps by changing the src line (the Google road names are still incorrect in my area). But I can't figure out how to automatically close the task area on the left. Oh well, this should hold me until Google gets around to correcting their map.
Quote:

"http://www.bing.com/maps/default.aspx?encType=1&where1={param}&output=embed "

BirdOPrey5 01-23-2011 12:47 PM

Just an fyi the "&output=embed" is just being ignored by Bing Maps, they don't have that option best I can tell. You are embedding the real Bing Maps page, the same one if you just went to the link.

The way to make Bing maps embedded is here: http://www.microsoft.com/maps/isdk/ajax/
But its complicated Javascript and only works based on latitude/longitude... there is no way to put a street address ans get and embedded map.

myke2008 01-30-2011 06:49 PM

Is there a way to stop the map from showing in the resent forums post widget?

Videx 01-30-2011 10:41 PM

Odd, my Recent Posts widget doesn't show the contents of the post, only the thread name and some other info. I think I'm using the built in one. Is this some modified widget? Do you have a link?

myke2008 02-01-2011 09:18 PM

I just avoid using this mod in the forum, I wanted to use it in the articles mostly anyway. I will just have to remove it if I can't find a way to block it out of the widget or a way to set permissions on it.

Videx 02-01-2011 11:41 PM

If you completely ignore questions then nobody can be of any help.

myke2008 02-03-2011 12:18 PM

Quote:

Originally Posted by Videx (Post 2157599)
If you completely ignore questions then nobody can be of any help.

was not ignoring you, as I said I am no longer using it on the forums, so if I gave you a link (the site is not live yet) it would not do any good anyway. I don't want to leave a huge google map skewed off the side of the page and bulging out the side of the resent posts widget, because it looks like sh*t.

This is a brand new install of vb 4.1.1 and this mod is basically the only mod that is installed.

The real question is, is there a way to set permissions on this or some how prevent the maps from showing in the resent posts widget? Maybe there is some way to stop it from being used in the forums? or prevent registered users from using it?

BirdOPrey5 02-03-2011 12:37 PM

Quote:

Originally Posted by myke2008 (Post 2158194)
was not ignoring you, as I said I am no longer using it on the forums, so if I gave you a link (the site is not live yet) it would not do any good anyway. I don't want to leave a huge google map skewed off the side of the page and bulging out the side of the resent posts widget, because it looks like sh*t.

This is a brand new install of vb 4.1.1 and this mod is basically the only mod that is installed.

The real question is, is there a way to set permissions on this or some how prevent the maps from showing in the resent posts widget? Maybe there is some way to stop it from being used in the forums? or prevent registered users from using it?

There is a mod "Advanced BBCode Permissions" for 3.x that still works fine on 4.x and allows you to enable or disable each BB Code per usergroup.

https://vborg.vbsupport.ru/showthread.php?t=122942

Videx 02-03-2011 02:23 PM

But if you disable everyone's permission to see the map bbcode, then what would be the point of using it?

I'm still not understanding why your Recent Posts widget shows entire posts and not just summaries like mine does. It seems to me that with the limited space in a sidebar you'll quickly fill the widget with a single post, making it useless.

Also, articles shouldn't be showing up in Recent Posts anyway, but that's a different subject entirely.

morrow 02-04-2011 02:19 AM

Is there a way I can create a widget for this for the CMS? See... I'd like to be able to add pinpoints and stuff to a google map. For example... I have a New York page. Within the NY page, I have say 6 restaurants and 2 pizza places. I'd like to have all of these displayed within a widget.

Thanks


All times are GMT. The time now is 01:04 PM.

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.01517 seconds
  • Memory Usage 1,841KB
  • 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
  • (6)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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