Sie sind nicht angemeldet.

joekki

Schüler

  • »joekki« ist der Autor dieses Themas

Beiträge: 78

Wohnort: Turku, Finland

Beruf: Panoramic photographer and web site builder

  • Nachricht senden

1

Mittwoch, 10. Juni 2009, 18:31

Opening current URL from the XML (for Facebook etc.)

Is it possible to make something like this:


Quellcode

1
2
3
4
5
6
7
8
<plugin name="facebook"
url="facebook_logo.png"
align="rightbottom"
onhover="showtext(Add this to Facebook);"
onclick="openurl('http://www.facebook.com/sharer.php?u='+location.href+'&amp;t='+document.title);"
x="10"
y="10"
/>


That's not obviously working, but that's the idea: Opening the current URL so you could add that to Facebook etc. Can I call my own Javascript commands or use some variables that I pass via the SFW call etc?

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Donnerstag, 11. Juni 2009, 03:12

I'm not sure what your question is... I have some ideas... but if you could try to clarify what you want to do and from where you are trying to do it we can help you better. *g*

Do you want to make some type of "share this" link that works with facebook?
- there's a commercial swf app that someone found on flashden that seems to work.

Do you want to embed your pano in facebook?
- I've used clearspring as well as the fb developer tools to do this

Let us know.

Graydon

joekki

Schüler

  • »joekki« ist der Autor dieses Themas

Beiträge: 78

Wohnort: Turku, Finland

Beruf: Panoramic photographer and web site builder

  • Nachricht senden

3

Donnerstag, 11. Juni 2009, 08:53

I'm not sure what your question is...
:D Heh, sorry about the unclear question. I want the "Share this" button, and I was thinking that can I use the current URL in the "onclick"-event.

- Juha

4

Donnerstag, 11. Juni 2009, 10:36

Hi,

Do you want to make some type of "share this" link that works with facebook?
- there's a commercial swf app that someone found on flashden that seems to work.


Someone here in this forum ?

Thanks
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

joekki

Schüler

  • »joekki« ist der Autor dieses Themas

Beiträge: 78

Wohnort: Turku, Finland

Beruf: Panoramic photographer and web site builder

  • Nachricht senden

5

Donnerstag, 11. Juni 2009, 11:40

Of course, there's one way to do it without altering the XML etc. by modifying your template and using for example 5% of the bottom space for links etc.

But then you lose that 5% from the viewing space of the panorama and I don't want that. :)

Second way would be making a redirect site: like www.example.com/facebook-redirector.php and there we can do like:

Quellcode

1
2
3
<?php
header('Location: http://www.facebook.com/sharer.php?u='.urlencode($_SERVER['HTTP_REFERER']));
?>

etc? (note: that's just an example, haven't tested it. :D

Then you just make your button to the XML and open redirector url from the link? right?

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

6

Freitag, 12. Juni 2009, 03:04

pixelcase did it here

I was thinking that someone else did it also... but I can't find it right now.

7

Montag, 15. Juni 2009, 16:14

That's not obviously working, but that's the idea: Opening the current URL so you could add that to Facebook etc. Can I call my own Javascript commands or use some variables that I pass via the SFW call etc?
Hi,

yes, both is possible,
you could either make a javascript function and call it from krpano,

e.g.
XML:

Quellcode

1
.. onclick="js( add_to_facebook() );"


HTML/JS:

Quellcode

1
2
3
4
function add_to_facebook()
{
  window.location='http://www.facebook.com/sharer.php?u='+location.href+'&amp;t='+document.title;
}



or pass the full facebook url to krpano and open it from there,

HTML/JS:

Quellcode

1
so.addVariable("add_to_facebook_url", ....);


XML: (krpano 1.0.8 beta 8 needed for this!)

Quellcode

1
... onclick="openurl( get(add_to_facebook_url) );" 



best regards,
Klaus