PDA

View Full Version : Mini Mods - Google Streetview BB Code


nitra1000
03-10-2010, 10:00 PM
Hi all, this little bit of code, will allow your members to use google street view on your site...

As seen At my Leicester Talk Forum (http://leicestertalk.net/comments-suggestions/9951-google-streetview-test.html)

Theres no products to upload, or templates to edit.. Just follow these steps.

Creating the basic Widget
Go To "Admin CP --> Custom BB Codes --> Add New BB Code"

Enter the following...

Title: Street View
BB Code Tag Name: sview
Replacement:

<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="{param}&amp;source=embed&output=svembed"></iframe></td>
</tr>
</table>
</div>

Example: Example
Description: Add Google Street View to the forum. Locate the place of interest you want, using maps.google.com street view then click LINK icon right hand side, and copy the link info in the very first box, and paste between the [sview] tags
Use {option}: No
Button Image (Optional): whatever 20x20 image you want, I've put one at the bottom. Please upload the file and then refer to it...
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes




Thats It Folks..

lot's off map icons: http://commons.wikimedia.org/wiki/Category:Map_icons

If you wish to thank me, consider my advertisers for your next purchases :)

Pvtiste
03-11-2010, 04:34 PM
Thanks for sharing!
Is there any way to just put the address between the BB Code Tag?

nitra1000
03-11-2010, 04:58 PM
Not to my knowledge... All this does is take the URL you provide and add some extras around it in order to embed it onto your forum.

Looking at the address and the link url they are significantly different.

al_rhar
03-11-2010, 09:16 PM
confirmed this is working on 3.8.4 PL2 and installed :)

sulasno
03-12-2010, 01:59 AM
how do I increase the number of characters in the [Example] column?
can't get the last few characters in

War.Frog
03-12-2010, 03:19 AM
Strange - I'm only ever getting the overview image, not the Street View. My links from Google look a lot different though - much more complicated. Such as:

http://maps.google.com/maps?f=l&hl=en&q=museum&ie=UTF8&view=map&om=1&sll=37.784554,-122.500091&sspn=0.001174,0.002411&split=1&rq=1&ev=zi&radius=0.07&hq=museum&hnear=&ll=37.76978,-122.469527&spn=0,359.997589&z=19&layer=c&cbll=37.769486,-122.469669&panoid=XxuzC23-jSXuWqeplwyrzQ&cbp=12,317.83,,0,3.58

Yikes. Any thoughts?

nitra1000
03-12-2010, 07:42 AM
how do I increase the number of characters in the [Example] column?
can't get the last few characters in

No Idea..... Unfortunatly. You could always chop the URL down slightly... as it's only an example of the code to use...

nitra1000
03-12-2010, 07:44 AM
Strange - I'm only ever getting the overview image, not the Street View. My links from Google look a lot different though - much more complicated. Such as:

http://maps.google.com/maps?f=l&hl=en&q=museum&ie=UTF8&view=map&om=1&sll=37.784554,-122.500091&sspn=0.001174,0.002411&split=1&rq=1&ev=zi&radius=0.07&hq=museum&hnear=&ll=37.76978,-122.469527&spn=0,359.997589&z=19&layer=c&cbll=37.769486,-122.469669&panoid=XxuzC23-jSXuWqeplwyrzQ&cbp=12,317.83,,0,3.58

Yikes. Any thoughts?

Are you using the address from the top, or the address from the link dropdown?

smstoolbox
03-12-2010, 10:05 AM
Absolutely superb! Cheers mate!

Dr.osamA
03-12-2010, 02:23 PM
thanxx mate

installed
________
Roll blunts (http://howtorollablunt.net/)

War.Frog
03-12-2010, 02:42 PM
Are you using the address from the top, or the address from the link dropdown?

I was using the link dropdown address.

nitra1000
03-12-2010, 04:23 PM
I was using the link dropdown address.

Very odd... I will take a look and let you know.

War.Frog
03-12-2010, 04:42 PM
Very odd... I will take a look and let you know.

Strange - it seems to be sporadic actually. That same link WORKED for other maps! Hmm....maybe it's just a Google thing?

is_it_me
03-12-2010, 06:40 PM
Timing couldn't have been better for me, I am just building an eating-out section and this will be a nice extra feature, especially as our part of the UK was only put on street-view yesterday! :cool:

Example listing with street-view (http://doctorwatson.info/content/72-The-Tudor-Close-Ferringham-Lane-Ferring-Worthing)

nitra1000
03-13-2010, 03:22 AM
Strange - it seems to be sporadic actually. That same link WORKED for other maps! Hmm....maybe it's just a Google thing?

It has something to do with the way google formats the URL for that specific spot... not sure why it's different for elsewhere yet...

nitra1000
03-13-2010, 03:23 AM
Timing couldn't have been better for me, I am just building an eating-out section and this will be a nice extra feature, especially as our part of the UK was only put on street-view yesterday! :cool:

Example listing with street-view (http://doctorwatson.info/content/72-The-Tudor-Close-Ferringham-Lane-Ferring-Worthing)

Very nice, glad you happy :)

Brandon Sheley
03-13-2010, 03:53 AM
thanks for the how to, I've added it to my forum, the members will have fun with it :)

pauldack
03-13-2010, 05:19 AM
Superb BB, working perfectly on my sites, members are loving it, cheers!!!!
:up:

denman75
03-13-2010, 06:26 AM
thank you ,working great

AzzidReign
03-13-2010, 04:12 PM
Interesting, I'm going to have to check this out later.

nitra1000
03-13-2010, 07:24 PM
thank you ,working great

thanks for the how to, I've added it to my forum, the members will have fun with it :)

Superb BB, working perfectly on my sites, members are loving it, cheers!!!!
:up:

Glad your all, happy with it :D

SuperGLS
03-17-2010, 02:04 AM
Wonderful!

How would I get a regular Google Map one? Do I just do the same thing, except for create different tags like [GMAP] and then use the regular link?

EDIT- Yeah, I did just that and it seems to work. We'll see.

TimberFloorAu
03-17-2010, 04:01 AM
Our code , and have given us no credit.

Even have used my exact Maps code, with my bloody house on it !

nitra1000
03-17-2010, 04:01 PM
Our code , and have given us no credit.

Even have used my exact Maps code, with my bloody house on it !

Err... no I haven't.. and no it doesn't..

The code is different to allow for the StreetView view, although the wrapping in a table/div came from the google maps code.

The example location is somewhere out in a desert, unless your house is under a small rock..

The image has come from the wiki commons.

Get your facts stright... If you look at my first widget, you'll find I did name your mod, as something which taught me how to make BB code, but I've since passed that as it's not exactly the hardest thing in the world...

TimberFloorAu
03-18-2010, 02:09 AM
YOUR CODE from 1st POST !

Example: http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=birkdale,+qld&sll=37.0625,-95.677068&sspn=33.901528,71.894531&ie=UTF8&ll=-27.487563,153.21928&spn=0.074162,0.140419&z=13&iwloc=A

THE LINK USED IN YOUR CODE IS POINTING AT A HOUSE I OWN ( infact the centre of Wellington Point )

REASON BEING I USED IT AS AN EXAMPLE IN OUR BBCODE MAPS RELEASE !!!

So LEAST YOU CAN DO IS CHANGE THE BLOODY THING ! AND POINT TO SOMEONE ELSES HOUSE BUT NOT IN WELLINGTON POINT BIRKDALE QUEENSLAND !

If you dont believe me VB can happily check by looking at My Google MAP code released way back !
The point is pal, I use an address I own so that I am not inadvertantly pointing at someones house, so do us a favour change the bloody MAP address in your example.

Kapishe

nitra1000
03-18-2010, 12:03 PM
alot of swearing...

ahh missed that appologies. A PM would of been a quicker way of resolving that though.

P.S Does swearing make you feel like a real man? Because to me it makes you seem childish and immature. Same with the caps lock, ONLY LITTLE IMMATURE KIDS USE THIS BECAUSE THEY CAN'T CONVAY A TONE PROPERLY.

BirdOPrey5
09-18-2010, 09:56 PM
This BB Code has the same security flaw as the Google Maps one... You're taking the entire "src" parameter from the BB Code- there's no reason someone has to point to google- they could point to any website/domain anywhere and then run any code they wanted on your site including Flash, Java, or any other insecure code and give your users viruses or such.

You can not allow arbitrary URL's in IFRAME BB Codes...

I strongly suggest editing the code or removing this altogether.

(edited per Paul M's post)

Alfa1
09-18-2010, 10:24 PM
Looks awesome, but I will only use it when it can not be exploited this way.
Please edit this addon. Maybe already put http://maps.google.com/maps?f=q in there?

Paul M
09-19-2010, 10:04 AM
You can not allow arbitrary URL's in BB Code...
Really ? Isnt that exactly what [url ] and [img ] tags allow ?

@nitra1000 - please add the instructions to a text file and upload them, otherwise this is likely to get removed for having no files. Thanks.

BirdOPrey5
09-19-2010, 11:09 AM
Really ? Isnt that exactly what [url ] and [img ] tags allow ?

@nitra1000 - please add the instructions to a text file and upload them, otherwise this is likely to get removed for having no files. Thanks.

OK, I should have said "you can not allow arbitrary URL's to be passed to IFRAME based BB Codes..." but surely you can see the security risk inherent in this code... If anyone is interested put the URL: http://www.juot.net/nofile.html into this code... You will get my 'red' 404 file not found custom error page... I promise you it is safe for this test but if I was someone with malicious intentions I could put dangerous code on that page and then embed it into anyone's site who allows this code.

datoneer
09-18-2011, 02:20 PM
I'm getting an error:

/Example&source=embed&output=svembed was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8r DAV/2 mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.fun-forums.com Port 80

nitra1000
09-18-2011, 02:49 PM
Mods please move to graveyard due to security floor, pointed out in post #30