How to use gallery lightbox for other plugin

Jimako, Wed May 23 2018, 13:38

You need to have Gallery plugin installed. 

1.  Go to Gallery settings.

- Set first parameter:  Load prettyPhoto globally  -  ON

- Set second parameter:  prettyPhoto attribute (hook) - flash 

-  you need set Keyboard shortcuts OFF, otherwise it will stop play after using keyboard

2018 05 23 13 43 27

everything else is not important (these things are set in KroozeArcade plugin)

2. open play.php

find line with code: onClick='javascript:window.open

this one:

$text .= "<a href='".e_PLUGIN."kroozearcade_menu/play.php?catid=".$_GET['catid']."&playing_game=true&gameid=".$_POST['gameid']."' onClick='javascript:window.open("".e_PLUGIN."kroozearcade_menu/games/".$result['game_filename'].".swf", "playgame", "toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=0,resizable=1,width=".$result['display_width'].",
height=".$result['display_height']."");'>".KROOZEARCADE_83."</a>";

and replace all url link by something like this:

$width = $result['display_width'];

$height = $result['display_height'];

$text .="<a href='".e_PLUGIN."kroozearcade_menu/games/".$result['game_filename'].".swf?width=".$width."&amp;height=".$height."' flash='prettyPhoto[flash]' title='".$result['game_filename']."'>".KROOZEARCADE_83."</a>";

Source of solution 

Example on github

Warning for KroozeArcade plugin - it's not good idea, because then you need to change path to play.php (or I don't know how to change path after finishing game). And because original solution suppose new window, there is buttom close window, so it needs to be changed to go back button.  So there is more work than just use lightbox library.

Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 17:46

i found use the light box gallery (prettyPhoto) its installed on the plugin manager, where is the codes for it to work with the light box i am using on this page? you will notice the light box is white. but the one in plugin manager is black. http://www.outlawsgameroom.com/page/videos
Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 18:07

and also where does the javascript go? what page does it get pated in. without causing error
Re: How to use gallery lightbox for other plugin
Jimako, Thu Jun 07 2018, 18:25

Do you mean gallery plugin? From source code it uses "default" background, try look at prettyPhoto setting to select theme or template if it's possible.

And I don't understand half of your writting - maybe you could use images. 

Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 18:27

yes from gallery plugin, just like you did with the flash. and i did all that, it dont associate with the gallery plugin
Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 18:29

in my settings? i have dark square selected, the square is white on the page, so its not associating
Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 18:36

i can not add images on your page here i done tried, you have them shut off
Re: How to use gallery lightbox for other plugin
Jimako, Thu Jun 07 2018, 20:11

You should be able to add attachment? Just don't use quick answer and use that with editor.
If it's core setting - that dark square, then create issue on core github
here: https://github.com/e107inc/e107/issues
In Chrome you can insert image directly by ctrl-v there.
Re: How to use gallery lightbox for other plugin
outlaw16151, Thu Jun 07 2018, 21:09

ok, but i remeber you were able to control the gallery when you did from the arcade. im not quite sure you know what im trying to say