Sie sind nicht angemeldet.

81

Dienstag, 7. Juli 2020, 16:16

Hi,
thank for the reply.
I was able to achieve the desired result but still have a little problem.

I add these lines:

Quellcode

1
2
3
     <!--	 <action name="mysnapshot">	 if(%1 == true,set(layer[show_snapshot_UI].visible,false),set(layer[show_snapshot_UI].visible,true))	 </action> -->
    <events name="enable_snapshot_ui_check_parameters" keep="true" onnewpano="snapshot_ui_parameters_handler();"/>    <action name="snapshot_ui_parameters_handler">    ifnot(enable_snapshot_ui===null,action(get(enable_snapshot_ui)););    </action>
    <action name="show">    if(%1 == true,set(layer[show_snapshot_UI].visible,false),set(layer[show_snapshot_UI].visible,true))    </action>


Now the "get snapshot" icon appears only if I add to my url this param : enable_snapshot_ui=show.
Unlike standard behaviour the icon isn't hide when I click to enable snapshot_ui so you'll see both icons : the one used to enable snapshot_ui
and the one used to grab the screen area.
How can I prevent this?

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

82

Mittwoch, 8. Juli 2020, 10:30

you must use myspanshot action to do something when snapshot UI is displayed or hidden : https://krpano.com/plugins/userplugins/s…pshot%28true%29

83

Mittwoch, 8. Juli 2020, 11:00

Hi Jerome,
I know but my trick was to bypass that action to have the full control.
Maybe exist a better solution than the one I found but I really can't imagine which is..

I need to activate panoshot only when specific url parameter is present.
I simply declare an event to parse url parameter and then, if param exist, I use his value as name of action to call (in my sample "show" action which is the same of mysnapshot).
I cannot do that using mysnapshot because the script call it automaticly (which is not my desired behaviour).
How can I do that alternatively?


P.s. Testing this feature on real server (php-fpm 7.2, apache 2.4.49) your savescreenshot.php raise a lot of warnings if you disable watermark. Those warnings lock the vtour.
I made this changes:


Quellcode

1
2
3
4
if ($stamp) {
	$sx = imagesx($stamp);
	$sy = imagesy($stamp);
	imagealphablending($stamp,false);	imagesavealpha($stamp,true);	imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));}

84

Freitag, 10. Juli 2020, 16:15

solved!

Quellcode

1
2
3
4
5
<action name="mysnapshot">
ifnot(enable_snapshot_ui===null, 
 if(%1 == true,set(layer[show_snapshot_UI].visible,false),set(layer[show_snapshot_UI].visible,true)) 
 ) 
 </action>



where enable_snapshot_ui is the url parameter, simpler then expected!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »sbraaa« (10. Juli 2020, 16:40)


85

Freitag, 12. Februar 2021, 11:12

Hi Jérôme,
Is the plugin able to capture hotspots (distorted or not) and layers of the current view?
Thank you!

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

86

Freitag, 12. Februar 2021, 16:20

Hi Jérôme,
Is the plugin able to capture hotspots (distorted or not) and layers of the current view?
Thank you!

Nop, sorry ;)

87

Montag, 21. Juni 2021, 21:18

Only for Desktop preserveDrawingBuffer:true

Hi,

There is some way to use the plugin only for desktop from the index.html, and not to use the preserveDrawingBuffer:true, because having it active in the mobile version, the tour moves very slowly and it is not smooth to play.



Thanks!

88

Montag, 16. August 2021, 17:30

savescreenshot.php alternatives

Hello, Jérôme. :)

Is there any option to avoid the usage of a PHP file? (savescreenshot.php)
The application we use KrPano with, is a .NET one and I know that there is an option to host the PHP file on an external PHP server, but is there any way if I rewrite the functionality for saving the screenshot to C# code, to use my code, instead of the PHP one.

Thanks in advance.
SD

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

89

Dienstag, 17. August 2021, 11:07

is there any way if I rewrite the functionality for saving the screenshot to C# code, to use my code, instead of the PHP one.

Hi, sorry but this plugin is not open source ;)
You could code your own based one MakeScreenshot API : https://krpano.com/releases/1.20.9/examp…escreenshot-api

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

90

Mittwoch, 20. September 2023, 02:11

custom variable of krpano doesn't work

Hi, I used your plugin, but i'm facing a little bit trouble.


external_php_server="true"
external_php_server_path="%$mypath%/core/plugins/snapshot/panoshot/"

mypath is works with plugin_path & sound_path but external_php_server_path doesn't. Can you tell me the solution?

Thank you so much.

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

91

Mittwoch, 20. September 2023, 08:15

external_php_server_path="%$mypath%/core/plugins/snapshot/panoshot/"

path must be absolute : https://krpano.com/plugins/userplugins/s…php_server_path

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

92

Mittwoch, 20. September 2023, 09:45

external_php_server_path="%$mypath%/core/plugins/snapshot/panoshot/"

path must be absolute : https://krpano.com/plugins/userplugins/s…php_server_path



Thank you. Is there a way to change watermark variable dynamically? I want to call the expression like this: krpano.set('panoshot.watermark', true | false)
Is it possible?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »cuongdevjs« (20. September 2023, 14:55)


93

Donnerstag, 21. September 2023, 06:27

external_php_server_path="%$mypath%/core/plugins/snapshot/panoshot/"

path must be absolute : https://krpano.com/plugins/userplugins/s…php_server_path
Is it working in krpano 1.21. Can i have a demo file to test in my tour?

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

94

Donnerstag, 21. September 2023, 11:32

Hi. I have uploaded 2 files php in a another server running php environment (for example server1.com/savescreenshot.php, server1.com/setmeta.php), and my tour hosted on other (for example server2.com/tour).

I found a bug when i click to social button, for example when i click to facebook, the shared link is server2.com/tour/server1.com/setmeta.php?panourl=server2.com/tour&snapshoturl=server1.com/screenshots/1.png

I think when i use external_php_server = true and external_php_server_path="server1.com/", the shared link should be like this: server1.com/setmeta.php?panourl=server2.com/tour&snapshoturl=server1.com/screenshots/1.png, without "server2.com/tour/"


Thank you. I looking forward your response.

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

95

Freitag, 22. September 2023, 09:48

Thank you. I looking forward your response.

Send me you email so I can send you a fixed version

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

96

Freitag, 22. September 2023, 10:12

Thank you. I looking forward your response.

Send me you email so I can send you a fixed version



Thank you. I have sent you my email *squint*

Ähnliche Themen