puzzle module

j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2005-11-17 04:13

I have written a module which integrates a puzzle applet with Gallery2. This module will present the viewer with a puzzle link in the sidebar. Clicking this link will turn the photo into a puzzle.

Visit the codex page http://codex.gallery2.org/index.php/Gallery2:Modules:puzzle for more information.

Example: CamoExtreme Hunting Truck

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-11-17 05:32

cools stuff!

thanks for contributing! :)

 
schmoid
schmoid's picture

Joined: 2005-11-18
Posts: 3
Posted: Fri, 2005-11-18 02:43

I followed your installation instructions but only see "Redownload Failed. Contact site admin. Please be patient..."

What did I do wrong?

---
Gallery Site - http://www.schmoid.pointclark.net/gallery

Blog - http://blog.myspace.com/schmoid

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Fri, 2005-11-18 04:08

I think I see what is happening. With this link
http://www.schmoid.pointclark.net/gallery/main.php?g2_view=core.ShowItem&g2_itemId=2222
You can see the itemId is 2222.

If you view the image by itself,
http://www.schmoid.pointclark.net/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=2224&g2_serialNumber=2
you can see it is itemId=2224 with serialNumber of 2

But my module is looking for itemId=2222 and serialNumber=2
http://www.schmoid.pointclark.net/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=2222&g2_serialNumber=2
If I try to view this image directly, I see a permission denied error.
This is probably the "original" (a much larger) image.

I wonder if you have the group permissions set which allows Everybody to "View All Versions" of the image? I suspect that Everybody does not have the permissions to view the original image, and therefore, the applet experiences a download error.

I will do some research to see if I can have it make the puzzle from the smaller image which you see on the main page.
This will have the benefit of a quicker download too. Thanks for the feedback. I hope to have a solution soon.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-18 13:41

you may have noticed that there is a slideshow applet (the fullscreen slideshow thing). it's part of the gallery remote framework. it has to deal with similar issues as your applet there and yes, if the user doesn't have viewSource permission, you have to use the largest resize, if possible. if the source isn't viewable (tiff, ..), you've got to use the prefered source, etc.

 
schmoid
schmoid's picture

Joined: 2005-11-18
Posts: 3
Posted: Fri, 2005-11-18 13:55

Thank you both for your help. Unfortunately, I won't have time to play with this until later today/tonight (that pesky work thing). I'll let you know what happens then.

Thanks again.

----
Gallery Site - http://www.schmoid.pointclark.net/gallery

Blog - http://blog.myspace.com/schmoid

 
tomcat76
tomcat76's picture

Joined: 2003-04-22
Posts: 133
Posted: Fri, 2005-11-18 18:50

Excellent module, had the grandaughter doing the puzzle's
Well done.

Regards Steve

 
schmoid
schmoid's picture

Joined: 2005-11-18
Posts: 3
Posted: Fri, 2005-11-18 23:27

Changing the permissions fixed the issue. I'm only concerned with security on a few albums (especially now that I can watermark) so I'll just have to live with not using puzzle on those.

Thanks for the help, the module works great now. Keep me informed of any updates.

----
Gallery Site - http://www.schmoid.pointclark.net/gallery

Blog - http://blog.myspace.com/schmoid

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Sat, 2005-11-19 07:46

I appreciate the compliments.

I have spent most of the night learning about permissions and image resizes. I have a working copy now that will find all the versions which the users has permission to view. It will then find the one from that list which is big enough for the puzzle. The applet will then be told the width and height to use so the image will scale with the correct aspect ratio.

I will review the code again in the morning and put the code out for download Saturday evening.

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Sat, 2005-11-19 22:06

The new version is ready. This version will show up as version 0.9.1 on the modules page.

http://codex.gallery2.org/index.php/Gallery2:Modules:puzzle for Download, Un-Install and Upgrade information.

 
mohpa

Joined: 2005-09-16
Posts: 6
Posted: Wed, 2005-12-07 16:37

A quick noob question:
How do you enable/dissable the puzzle feature on a per album/image basis? Right now, all the images show up with the puzzle link and I can't for the life of mine determine how to assign the link on a per image basis.

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2005-12-08 03:21

There is no way to disable puzzles for particular albums or images. I will ponder this as a future option.
Sorry,
Mike.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-12-08 03:34

the way such per album settings are stored right now are
GalleryCoreApi::setPluginparameter('module', 'puzzle', 'enabled', true, $albumId'); to set it for a specific id and
GalleryCoreApi::getPluginparameter('module', 'puzzle', 'enabled', $albumId');

so you'd add a ItemEditOption (see modules/thumbnail/module.inc -> how to register an ItemEditOption

then, users can enable/disable it in
edit album ->

and you'd have to check GalleryCoreApi::getPluginparameter('module', 'puzzle', 'enabled', $albumId');
in module.inc -> getItemLinks etc etc

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2005-12-08 14:01

With the pointers specified by Valiant, I think I can do it on a per album basis.
Would this be sufficient for most users' needs?
I might be able to get this done by the end of the day today.

 
mohpa

Joined: 2005-09-16
Posts: 6
Posted: Thu, 2005-12-08 16:48

Per album would be perfect, since it would be close to impossible to do a per image check in larger installations. Thanks guys.

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2005-12-08 23:17

Ok, version 0.9.2 is ready for download. This is not really a simple little module anymore. So, I am interested in knowing how it works for you. You can now Edit the album and check or uncheck the "Enable puzzles for this album."

I am not sure what the upgrade process will be for future revisions. If you uninstall the module version 0.9.2, you would loose the puzzle enable/disable parameters. Any ideas?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-12-08 23:24

that was quick :)
each module can have a upgrade function ... see other modules as examples.

 
mohpa

Joined: 2005-09-16
Posts: 6
Posted: Thu, 2005-12-08 23:53

Works great! Thank you very much for this great module.

 
azn_oohwee

Joined: 2006-03-06
Posts: 24
Posted: Mon, 2006-03-06 04:53

hey, i'm trying to get this puzzle plugin to work with g2 rc-1a, and i ran the update scripts on the plugin, all is fine but the puzzle doesn't work? Any ideas?

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Tue, 2006-03-07 02:00

I think I wrote it using Gallery 2.0.1. I have since upgraded to 2.0.2 and 2.0.3 and it has worked. I don't know about the rc-1a version. Can you give me a little more information, such as, do you see the link on the left when viewing an image or the resizes of the image? If you do see the link, what happens when you click the link?

Is the web site available on the web? If it is, then I might be able to learn something by seeing it over the web.

 
azn_oohwee

Joined: 2006-03-06
Posts: 24
Posted: Tue, 2006-03-07 06:03

Well I can't show you the gallery because its a private one, but I do have plenty of additional info to look at:

Quote:
JAVA DUMP

Dump classloader list ...
codebase=http://colinj.co.uk/Super%2016/, key=http://colinj.co.uk/Super%2016/,ccjava.jar, zombie=true, cache=true, refcount=0, info=sun.plugin.ClassLoaderInfo@1386918
codebase=http://colinj.co.uk/Extreme%2025/, key=http://colinj.co.uk/Extreme%2025/,ccjava.jar, zombie=true, cache=true, refcount=0, info=sun.plugin.ClassLoaderInfo@11756a4
codebase=http://colinj.co.uk/Interactive%20Puzzle/, key=http://colinj.co.uk/Interactive%20Puzzle/,ccjava.jar, zombie=true, cache=true, refcount=0, info=sun.plugin.ClassLoaderInfo@51127a
codebase=http://www.???.com/gallery/modules/puzzle/applets/, key=http://www.???.com/gallery/modules/puzzle/applets/, zombie=true, cache=true, refcount=0, info=sun.plugin.ClassLoaderInfo@1797795
Done.

basic: Registered modality listener
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1797795, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@124614c
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
Puzzle - v 4.4 by Tyler Akins.
Email:

Web: http://rumkin.com/projects/puzzle/
Applet is free to be used by anyone, as long as it stays free.
Cannot obtain image from malformed src url!
For information on this error, go to the above URL.
Exception in thread "Thread-6642" java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkExit(Unknown Source)
at java.lang.Runtime.exit(Unknown Source)
at java.lang.System.exit(Unknown Source)
at puzzle.Error(puzzle.java:93)
at puzzle.run(puzzle.java:989)
at java.lang.Thread.run(Unknown Source)

DEBUG TREE

7: (GalleryAlbumItem) [browse]

* 438: (GalleryAlbumItem) [browse]
o 440: (GalleryPhotoItem) [browse]
width 2560
height 1920
mimeType image/jpeg
size 620216
canContainChildren 0
description
keywords
ownerId 197
summary
title 3-5 004
viewedSinceTimestamp 1141610437
originationTimestamp 1073397715
pathComponent 3-5 004.jpg
id 440
creationTimestamp 1141610437
isLinkable 1
linkId
linkedEntity
modificationTimestamp 1141610436
serialNumber 1
entityType GalleryPhotoItem
onLoadHandlers
_persistentStatus Array
parentId 438

HTML GENERATED

<OBJECT
classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase = "http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"
WIDTH = "533" HEIGHT = "400" >
<PARAM NAME = CODE VALUE = "puzzle.class" >
<PARAM NAME = CODEBASE VALUE = "modules/puzzle/applets" >
<PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.4">
<PARAM NAME = "scriptable" VALUE = "false">
<PARAM NAME = "PUZ_WEBSITE" VALUE="J. Mike Rollins <rollins@CamoTruck.Net>">
<PARAM NAME = "PUZ_XSTYLE" VALUE="0">
<PARAM NAME = "PUZ_NUMX" VALUE="2">
<PARAM NAME = "PUZ_NUMY" VALUE="2">
<PARAM NAME = "PUZ_TYPE" VALUE="1">
<PARAM NAME = "PUZ_SRC" VALUE="main.php?g2_view=core.DownloadItem&amp;g2_itemId=442&amp;g2_serialNumber=2">
<PARAM NAME = "PUZ_RESIZE" VALUE="2">
<COMMENT>
<EMBED
type = "application/x-java-applet;version=1.4" \
CODE = "puzzle.class" \
JAVA_CODEBASE = "modules/puzzle/applets" \
WIDTH = "533" \
HEIGHT = "400" \
PUZ_WEBSITE ="J. Mike Rollins <rollins@CamoTruck.Net>" \
PUZ_XSTYLE ="0" \
PUZ_NUMX ="2" \
PUZ_NUMY ="2" \
PUZ_TYPE ="1" \
PUZ_SRC ="main.php?g2_view=core.DownloadItem&amp;g2_itemId=442&amp;g2_serialNumber=2" \
PUZ_RESIZE ="2" \
scriptable = false \
pluginspage = "http://java.sun.com/products/plugin/index.html#download">
<NOEMBED alt="Your browser doesn't support applets; you should use one of the other upload methods.">
Your browser doesn't support applets; you should use one of the other upload methods.
</NOEMBED>
</EMBED>
</COMMENT>
</OBJECT>

Now the java applet loads fine and all, but now I'm looking over this again, and i'm thinking. Could it possibly be url rewrites screwing things up. I'm going to disable that and get back to you asap. Meanwhile if you have time maybe you can help me put two and two together and get the puzzle plugin working.

Thanks!

Update
Permalinks wasn't it, I think its because of how gallery2 rc1a handles links. I tried to browse to the image linked to the java .class file directly (the image that was going to get puzzled) and I received this interesting error message.

Quote:
Security Violation
The action you attempted is not permitted.

Back to the Gallery

Error Detail -
Error (ERROR_BAD_PARAMETER) :
in modules/core/DownloadItem.inc at line 67 (gallerycoreapi::error)
in main.php at line 378 (downloaditemview::renderimmediate)
in main.php at line 87
in main.php at line 80

http://codex.gallery2.org/index.php/Gallery2:API_Changes_Since_The_Last_Release

So what needs to be done is update the linking system for rc1a, how would I go about that. Where in the puzzle files is this located? And how is it implemented? Perhaps a little more documentation please.

I'm looking at the findAppletItem() function and I see that this probably has something to do with it? Anyone out there with any ideas how to properly fetch image url's in rc1a?

Thanks again!!

curious what is &amp; doing in the url and how did it get there?

bingo &amp; bug was it. Now how do we fix this? What is needed is to reformat the link to remove the &amp; from the url before it is passed back to the browser.

Orignally a bug in g1, but I don't know how it showed up here....

http://gallery.menalto.com/node/19397

Now how do we fix it?

 
azn_oohwee

Joined: 2006-03-06
Posts: 24
Posted: Tue, 2006-03-07 14:14

Updated for 2.1

I finally figured out what was going wrong in this module and fixed it.

Changes
Updated for G2.1
all files updated by conversion script provided from api documentation
http://www.menalto.com/.outgoing/gallery/convert.pl
galleryCoreApi
Replaced all references of GalleryCoreApi::relativeRequireOnce with GalleryCoreApi::requireOnce

updated makepuzzle.tpl for g2.1
forJavascript=true was replaced with htmlEntities=false
and forceFullUrl=true was added.

Thats it folks, here it is, and enjoy!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2006-03-07 22:16

azn_oohwee,
Great.
Feel free to add that to the codex:
http://codex.gallery2.org/index.php/Gallery2:Modules:puzzle#Install

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Wed, 2006-03-08 02:19

Thanks for all the research. I will dedicate Wednesday evening to testing, updating the code and the Wiki information. My brain has already shut down for the day. Thanks again for help.

By the way, I noticed that all the references to $ret->isError() and GalleryStatus::success() have been replaced. Was this from the convert.pl? Should I continue to use statements like "if ($ret->isError())" or should I use "if ($ret)"?

 
azn_oohwee

Joined: 2006-03-06
Posts: 24
Posted: Wed, 2006-03-08 03:30
j.mike.rollins wrote:
Thanks for all the research. I will dedicate Wednesday evening to testing, updating the code and the Wiki information. My brain has already shut down for the day. Thanks again for help.

By the way, I noticed that all the references to $ret->isError() and GalleryStatus::success() have been replaced. Was this from the convert.pl? Should I continue to use statements like "if ($ret->isError())" or should I use "if ($ret)"?

I think that is the new conding standard for g2.1 I looked in the script and sure thing, thats what it did. If you are programming for g2.03 or so I think its fine how you wrote the statements before, but for anything later then you will have to use these new standards.

 
BobcatASL

Joined: 2005-01-09
Posts: 46
Posted: Sun, 2006-06-18 05:50

What is the newest version of the puzzle module?

When I look in the files .. it appears that it should be .93 but when its installed its showing .92.

I am getting the same errors that are mentioned above ... (uninstall puzzle module and the errors go
away) ... help anyone ??

Security Violation
The action you attempted is not permitted.

Back to the Gallery

Error Detail -
Error (ERROR_BAD_PARAMETER) : Controller results are missing status, error, (redirect, delegate, return)

in main.php at line 211 (GalleryCoreApi::error)
in main.php at line 87
in main.php at line 80

System Information

Gallery version 2.1.1
PHP version 5.1.4 cgi
Webserver Apache
Database mysql 4.1.18-standard-log
Toolkits NetPBM
Operating system Linux cgi1002.int.bizland.net 2.4.32-grsec #1 Fri Mar 17 12:22:27 EST 2006 i686
Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Sat, 2006-07-01 00:31

I have not worked with Gallery 2.1 yet. I developed the module with Gallery 2.0. Over the next few weeks, I will work on porting my web site to g2.1. I will then get the module working with 2.1. I will let you know when I get the new version ready.

 
milfodd
milfodd's picture

Joined: 2002-11-11
Posts: 15
Posted: Sat, 2007-01-13 23:24

FYI. Running fine on 2.1.2

 
kingofnerds
kingofnerds's picture

Joined: 2007-11-09
Posts: 1
Posted: Fri, 2007-11-09 23:53

I am having the same problem as above. I am unable to save my gallery settings when the Puzzle module is installed. it is showing version 0.9.2 in the plugins list.

I am not sure if another module that I have installed is conflicting with the Puzzle module, but it is not working.

are there any other modules that are required in order to run the puzzle module?

My system specs are below.

Gallery version = 2.2.3 core 1.2.0.5
PHP version = 5.2.3-1+lenny1 apache2handler
Webserver = Apache/2.2.6 (Debian) mod_mono/1.2.4 PHP/5.2.3-1+lenny1 mod_ssl/2.2.6 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8
Database = mysqli 5.0.45-Debian_1-log, lock.system=flock
Toolkits = Dcraw, Exif, Ffmpeg, Getid3, LinkItemToolkit, NetPBM, Thumbnail, Gd, ArchiveUpload, ImageMagick
Acceleration = full/21600, none/0
Operating system = Linux king 2.6.22-2-k7 #1 SMP Fri Aug 31 01:02:37 UTC 2007 i686
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Rows in GalleryAccessMap table = 53
Rows in GalleryAccessSubscriberMap table = 1023
Rows in GalleryUser table = 5
Rows in GalleryItem table = 1021
Rows in GalleryAlbumItem table = 12
Rows in GalleryCacheMap table = 0

In the end, Nerds with Linux will rule the world

 
bigtom999

Joined: 2007-11-28
Posts: 5
Posted: Mon, 2008-02-25 01:33

Thank you.
What a great plug-in. I uploaded and installed it and off I went.
It works great.
Keep up the good work it's appreciated.

[img]http://www.rfunspot.com/bigtbanners/banrfun22.gif[/img]

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2008-07-10 14:57

Update for Gallery 2.2.

I verified the module works with Gallery 2.2.5.

The module can be installed from the "Get More Plugins" tab. Select the "Show Repository List" option and enable the "Community Repository". The official code repository is now at SourceForge.Net.

You can do the following to manually obtain the code:
Browse the code: https://gallery-contrib.svn.sourceforge.net/svnroot/gallery-contrib/trunk/gallery2/modules/puzzle/
Export the code: svn export https://gallery-contrib.svn.sourceforge.net/svnroot/gallery-contrib/trunk/gallery2/modules/puzzle/
Checkout the code: svn co https://gallery-contrib.svn.sourceforge.net/svnroot/gallery-contrib/trunk/gallery2/modules/puzzle/

Have fun!

 
fessup
fessup's picture

Joined: 2008-07-11
Posts: 1
Posted: Fri, 2008-07-11 12:11

I had a little bit of trouble on my server with browser compatibility for the puzzle object, comment and embed tags. I was able to get past those issues by using a much simpler applet tag in MakePuzzle.tpl as shown below. The applet tag has worked fine on all browsers I tested (MSIE, FireFox, Netscape).

I also wanted a preview of the original image adjacent to the puzzle, and by editing the layout of MakePuzzle.tpl (and changing puzzle dimensions in MakePuzzle.inc), it all fits nicely and accommodates very large images easily.

Edited Makepuzzle.tpl

Quote:
<br>
<div style="text-align: center">
<table width="100%" border="0" cellpadding="0">
<tr>
<td align="center" valign="middle">
<img src="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"}" width="250" class="ImageFrame_image" style="border: 2px solid black; padding:1px;" />
<br />
(original image)
</td>
<td align="left" valign="middle">
<div style="text-align:left">
<!-- Compatible with all browsers -->
<applet code="puzzle" height="{$MakePuzzle.puzzleHeight}" width="{$MakePuzzle.puzzleWidth}" >
<PARAM NAME = CODE VALUE = "puzzle.class" >
<PARAM NAME = CODEBASE VALUE = "{g->url href="modules/puzzle/applets}" >
<PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.4">
<PARAM NAME = "scriptable" VALUE = "false">
<PARAM NAME = "PUZ_WEBSITE" VALUE="J. Mike Rollins <rollins@CamoTruck.Net>">
<PARAM NAME = "PUZ_XSTYLE" VALUE="0">
<PARAM NAME = "PUZ_NUMX" VALUE="{$MakePuzzle.puzzleNum}">
<PARAM NAME = "PUZ_NUMY" VALUE="{$MakePuzzle.puzzleNum}">
<PARAM NAME = "PUZ_TYPE" VALUE="{$MakePuzzle.puzzleType}">
<PARAM NAME = "PUZ_SRC" VALUE="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`" arg3="serialNumber=`$MakePuzzle.puzzleSerialNumber`" htmlEntities=false forceFullUrl=true}">
<PARAM NAME = "PUZ_RESIZE" VALUE="2">
</applet>
</div>
</td>
</tr>
</table>
<br />
<br />
<table width="100%" border="0">
<tr>
<td align="center" valign="middle">
<table border="0">
<tr>
<td>
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=swap"
arg3="form[puzzleLevel]=moderate"
arg4="itemId=`$MakePuzzle.itemId`"}" >Swap Puzzle:</a>
</td>
<td>
[
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=swap"
arg3="form[puzzleLevel]=easy"
arg4="itemId=`$MakePuzzle.itemId`"}" >easy</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=swap"
arg3="form[puzzleLevel]=moderate"
arg4="itemId=`$MakePuzzle.itemId`"}" >moderate</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=swap"
arg3="form[puzzleLevel]=hard"
arg4="itemId=`$MakePuzzle.itemId`"}" >harder</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=swap"
arg3="form[puzzleLevel]=veryhard"
arg4="itemId=`$MakePuzzle.itemId`"}" >hardest</a>
]
</td>
</tr>
<tr>
<td>
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=slide"
arg3="form[puzzleLevel]=moderate"
arg4="itemId=`$MakePuzzle.itemId`"}" >&nbsp;Slide Puzzle:</a>
</td>
<td>
[
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=slide"
arg3="form[puzzleLevel]=easy"
arg4="itemId=`$MakePuzzle.itemId`"}" >easy</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=slide"
arg3="form[puzzleLevel]=moderate"
arg4="itemId=`$MakePuzzle.itemId`"}" >moderate</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=slide"
arg3="form[puzzleLevel]=hard"
arg4="itemId=`$MakePuzzle.itemId`"}" >harder</a>,
<a href="{g->url arg1="view=puzzle.MakePuzzle"
arg2="form[puzzleType]=slide"
arg3="form[puzzleLevel]=veryhard"
arg4="itemId=`$MakePuzzle.itemId`"}" >hardest</a>
]
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
{if $MakePuzzle.puzzleType eq 1}
{g->text text="Click on a square to move it into the empty box. Click the yellow Reveal button to show you which blocks are in their correct location."}
{/if}
{if $MakePuzzle.puzzleType eq 0}
{g->text text="To swap two squares, click on the first square you want to move (a red box will show around the square).<br />Now click on the square you wish to swap with the first square (these two squares will then swap places).<br />Click the yellow Reveal button on top of the puzzle to show you which blocks are in their correct locations."}
{/if}
<br />
<br />
</div>

Edited section of MakePuzzle.inc

Quote:
// use the first image that is greater than $LIMIT in size
var $LIMIT = 480;

// the max width and height for the applet to display
// var $WIDTH = 500;
// var $HEIGHT = 400;
var $WIDTH = 700;
var $HEIGHT = 500;

The end result: puzzle screen shot

[img]http://img.photobucket.com/albums/v737/fessup/screen_tn.jpg[/img]

Thanks for this great plugin, it's fun for all ages and adds a nice feature to Gallery2.

Well boys... it looks like we have them right where they want us!

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Mon, 2008-10-20 17:37

I just installed the puzzle module but I have an issue. It is not creating the puzzle. When I click on the puzzle link it displays "Downloading Image. Please be patient". But it never comes up. See http://thomasperrygordon.com/gallery_puzzle_issue.doc or see the attachment.

I installed the puzzle module by going to Site Admin > Admin Options > Gallery > Plugins > Display > Puzzle Module and clicking install.

Here's my system info.

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.5 cgi
Webserver = Apache
Database = mysqlt 5.0.67-community, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, SquareThumb, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux host100.hrwebservices.net 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:37:38 EST 2008 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Rows in GalleryAccessMap table = 57
Rows in GalleryAccessSubscriberMap table = 1661
Rows in GalleryUser table = 19
Rows in GalleryItem table = 1626
Rows in GalleryAlbumItem table = 31
Rows in GalleryCacheMap table = 0

Anyone have any ideas? Thanks in advance.

--Perry

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-10-20 19:30

Please create a test album with the module activated and a image present. PM me the url to the album with login info.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Mon, 2008-10-20 22:02

Foridave,

I PM'ed you the info you requested.

Thanks,
Perry

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Mon, 2008-10-20 22:58

Interesting additional info. I have no problems anywhere else in the software. I get the following when I try to save changes on the Edit Album page, which has the Puzzle Options - Enable puzzles for this album:

Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : Controller results are missing status, error, (redirect, delegate, return)

* in main.php at line 243 (GalleryCoreApi::error)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.4
PHP version 5.2.5 cgi
Webserver Apache
Database mysqlt 5.0.67-community
Toolkits SquareThumb, Thumbnail, Gd
Operating system Linux host100.hrwebservices.net 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:37:38 EST 2008 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17

--Perry

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Tue, 2008-10-21 02:03

Would you be willing to run Gallery in debug mode and let me see the output?

To enable debug mode, change the line $gallery->setDebug(false); to $gallery->setDebug('buffered'); in your config.php file. I think the debug information is at the bottom of the page. I would like to the output for both a make puzzle attempt and the save album settings.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-10-21 03:15

j.mike.rollins & shmagm1,
I think the issue is because the album/item is not public you need to add the session to the url.
so this:
<PARAM NAME = "PUZ_SRC" VALUE="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$MakePuzzle.puzzleItemId`" arg3="serialNumber=`$MakePuzzle.puzzleSerialNumber`" htmlEntities=false forceFullUrl=true}">
becomes:
<PARAM NAME = "PUZ_SRC" VALUE="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$MakePuzzle.puzzleItemId`" arg3="serialNumber=`$MakePuzzle.puzzleSerialNumber`" htmlEntities=false forceFullUrl=true forceSessionId=true}">

Give that a try and see if that is it.
If not, shmagm1. send j.mike.rollins your login info and url.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Tue, 2008-10-21 13:53

Hi Floridave,

I'm a novice. I tried finding where I would edit this but I couldn't find it. Where do I edit it?

<PARAM NAME = "PUZ_SRC" VALUE="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$MakePuzzle.puzzleItemId`" arg3="serialNumber=`$MakePuzzle.puzzleSerialNumber`" htmlEntities=false forceFullUrl=true forceSessionId=true}">

I'm assuming from your name that you are from Florida. But then again you are replying at odd hours. I lived in Fort Myers, FL for 10 years. Went to high school and college there.

Thanks again for your help.

--Perry

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-10-21 14:16

edit modules/puzzle/templates/MakePuzzle.tpl

Dave ( use to live in Florida )
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Tue, 2008-10-21 14:37

Same results floridave. Thanks for trying.

j.mike.rollins,

Here is the result of the debug you requested.

--Perry

Debug Output
file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter session.lifetime for core plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin (mysqlt): SET NAMES "utf8" file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/_all/0/0/GalleryStorage_describeMap.inc) (mysqlt): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='7cb6f34f9fa9107075e4b4bbcd2124f8' controller , view puzzle.MakePuzzle Loading plugin core Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/module.inc) core plugin successfully instantiated file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/versions.dat) file(/home/perrygo/public_html/2006patriots10u/patriots/g2data/versions.dat, ) [1224599723] can't guarantee 5 -- extending! file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/0/0/6.inc) Loading plugin puzzle Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/puzzle/module.inc) puzzle plugin successfully instantiated Check the version of the puzzle plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the puzzle plugin is ok file_exists(/home/perrygo/public_html/patriots/gallery/modules/puzzle/MakePuzzle.inc) getParameter acceleration for core plugin getParameter id.anonymousUser for core plugin getParameter id.anonymousUser for core plugin getParameter id.adminGroup for core plugin (mysqlt): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=6 AND g_groupId=3 LIMIT 1 file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2488.inc) (mysqlt): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 6 ORDER BY g2_Group.g_groupName LIMIT 9223372036854775807 (mysqlt): SELECT g_module, g_permission, g_description, g_bits, g_flags FROM g2_PermissionSetMap (mysqlt): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (6,4,2,3) AND g2_AccessMap.g_permission & 1 = 1 (mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=2488 AND g_accessListId IN (6623,6621,6631,6630,6626,6624,6622,6638) LIMIT 1 file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2413.inc) getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix plugin is ok file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/theme/matrix/0/0/0.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/theme/matrix/2/4/2413.inc) (mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=2488 AND g_accessListId IN (6623,6621,6631,6630,6626,6624,6622,6638) LIMIT 1
(modules:puzzle) loadTemplate: found album for item, album id=2413 getParameter enabled for puzzle plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/puzzle/2/4/2413.inc)
(modules:puzzle) loadTemplate: isEnabledForAlbum = yes
(modules:puzzle) loadTemplate: puzzles are allowed for this album. (modules:puzzle) findAppletItemId: Beginning (mysqlt): SELECT g2_AccessSubscriberMap.g_itemId, BIT_OR(g2_AccessMap.g_permission) FROM g2_AccessMap, g2_AccessSubscriberMap WHERE g2_AccessSubscriberMap.g_itemId IN (2488) AND g2_AccessSubscriberMap.g_accessListId = g2_AccessMap.g_accessListId AND g2_AccessMap.g_userOrGroupId IN (6,4,2,3) GROUP BY g2_AccessSubscriberMap.g_itemId
(modules:puzzle) findAppletItemId: permissions[core.all] = 1
(modules:puzzle) findAppletItemId: permissions[core.view] = 1
(modules:puzzle) findAppletItemId: permissions[core.viewResizes] = 1
(modules:puzzle) findAppletItemId: permissions[core.viewSource] = 1
(modules:puzzle) findAppletItemId: permissions[core.viewAll] = 1
(modules:puzzle) findAppletItemId: permissions[core.addAlbumItem] = 1
(modules:puzzle) findAppletItemId: permissions[core.addDataItem] = 1
(modules:puzzle) findAppletItemId: permissions[core.edit] = 1
(modules:puzzle) findAppletItemId: permissions[core.changePermissions] = 1
(modules:puzzle) findAppletItemId: permissions[core.delete] = 1
(modules:puzzle) findAppletItemId: permissions[comment.add] = 1
(modules:puzzle) findAppletItemId: permissions[comment.edit] = 1
(modules:puzzle) findAppletItemId: permissions[comment.delete] = 1
(modules:puzzle) findAppletItemId: permissions[comment.view] = 1
(modules:puzzle) findAppletItemId: permissions[comment.all] = 1
(modules:puzzle) findAppletItemId: permissions[cart.add] = 1
(modules:puzzle) findAppletItemId: permissions[photoaccess.print] = 1
(modules:puzzle) findAppletItemId: permissions[shutterfly.print] = 1
(modules:puzzle) findAppletItemId: permissions[ecard.send] = 1
(modules:puzzle) findAppletItemId: permissions[rating.add] = 1
(modules:puzzle) findAppletItemId: permissions[rating.view] = 1
(modules:puzzle) findAppletItemId: permissions[rating.all] = 1 (mysqlt): SELECT g2_Derivative.g_id, g2_ChildEntity.g_parentId FROM g2_Derivative, g2_ChildEntity WHERE g2_Derivative.g_id = g2_ChildEntity.g_id AND g2_ChildEntity.g_parentId IN (2488) AND g2_Derivative.g_derivativeType IN (3) (modules:puzzle) findAppletItemId: indexing item 2488 (1280x960). (mysqlt): SELECT g2_Derivative.g_id, g2_ChildEntity.g_parentId FROM g2_Derivative, g2_ChildEntity WHERE g2_Derivative.g_id = g2_ChildEntity.g_id AND g2_ChildEntity.g_parentId IN (2488) AND g2_Derivative.g_derivativeType IN (2) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2489.inc)
(modules:puzzle) findAppletItemId: indexing item 2489 (640x480).
(modules:puzzle) loadTemplate: findAppletItemId returned item 2489 (640x480).
(modules:puzzle) loadTemplate: item 2489 rescaled from (640x480) to (533x400) Loading plugin puzzle puzzle plugin successfully instantiated Check the version of the puzzle plugin The version of the puzzle plugin is ok file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../themes/local/matrix) getParameter misc.markup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery/modules/comment/Preloads.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/exif/Preloads.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/search/Preloads.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/Preloads.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/Preloads.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/imageblock/Preloads.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/imageblock/0/0/0.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/imageframe/classes/ImageFrameImpl.class) Loading plugin imageframe Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/imageframe/module.inc) imageframe plugin successfully instantiated Check the version of the imageframe plugin The version of the imageframe plugin is ok file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/imageframe/local/frames) is_dir(/home/perrygo/public_html/patriots/gallery/modules/imageframe/classes/../frames/) file_exists(/home/perrygo/public_html/patriots/gallery/modules/imageframe/classes/../frames//frame.inc) file_exists(/home/perrygo/public_html/patriots/gallery/modules/icons/classes/IconsImpl.class) getParameter iconpack for icons plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/icons/0/0/0.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok (mysqlt): SELECT g_parentSequence FROM g2_ItemAttributesMap WHERE g_itemId=2488 (mysqlt): SELECT g2_AccessSubscriberMap.g_itemId, BIT_OR(g2_AccessMap.g_permission) FROM g2_AccessMap, g2_AccessSubscriberMap WHERE g2_AccessSubscriberMap.g_itemId IN (7,3631,2413) AND g2_AccessSubscriberMap.g_accessListId = g2_AccessMap.g_accessListId AND g2_AccessMap.g_userOrGroupId IN (6,4,2,3) GROUP BY g2_AccessSubscriberMap.g_itemId file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/0/0/7.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/3/6/3631.inc) Loading plugin register Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/register/module.inc) register plugin successfully instantiated Check the version of the register plugin The version of the register plugin is ok getParameter id.anonymousUser for core plugin Loading plugin useralbum Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/useralbum/module.inc) useralbum plugin successfully instantiated Check the version of the useralbum plugin The version of the useralbum plugin is ok file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/useralbum/0/0/0.inc) getParameter id.anonymousUser for core plugin getParameter albumId for useralbum plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/module/useralbum/0/0/6.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter id.adminGroup for core plugin getParameter id.anonymousUser for core plugin file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/smarty/templates_c/%%696499269) is_dir(/home/perrygo/public_html/2006patriots10u/patriots/g2data/smarty/templates_c/%%696499269) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/smarty/templates_c/%%696499269) is_writeable(/home/perrygo/public_html/2006patriots10u/patriots/g2data/smarty/templates_c/%%696499269) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/smarty/templates_c/%%696499269/v_12) file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/local/theme.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/theme.tpl) stat(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/theme.tpl) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/core/data/local/gallery.css) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/icons/iconpacks/paularmstrongdesigns/local/icons.css) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/search/local/SearchBlock.js) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageframe/templates/local/ImageFrameHead.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageframe/templates/ImageFrameHead.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/imageframe/templates/ImageFrameHead.tpl) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/../../themes/matrix/local/theme.css) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../themes/matrix/local/theme.css) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../images/local/galleryLogo_sm.gif) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/local/SystemLinks.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/SystemLinks.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/SystemLinks.tpl) getParameter id.rootAlbum for core plugin Loading plugin puzzle puzzle plugin successfully instantiated Check the version of the puzzle plugin The version of the puzzle plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok Loading plugin puzzle puzzle plugin successfully instantiated Check the version of the puzzle plugin The version of the puzzle plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok Loading plugin puzzle puzzle plugin successfully instantiated Check the version of the puzzle plugin The version of the puzzle plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/local/BreadCrumb.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/BreadCrumb.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/BreadCrumb.tpl) getParameter misc.markup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/local/module.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/module.tpl) stat(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/module.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/local/sidebar.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/sidebar.tpl) stat(/home/perrygo/public_html/patriots/gallery//themes/matrix/templates/sidebar.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/search/templates/blocks/local/SearchBlock.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/search/templates/blocks/SearchBlock.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/search/templates/blocks/SearchBlock.tpl) Loading plugin puzzle puzzle plugin successfully instantiated Check the version of the puzzle plugin The version of the puzzle plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/local/ItemLinks.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/ItemLinks.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/ItemLinks.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/local/PeerList.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/PeerList.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/PeerList.tpl) getParameter default.orderBy for core plugin getParameter default.orderDirection for core plugin (mysqlt): SELECT g2_ChildEntity.g_id, g2_Item.g_title FROM g2_ChildEntity INNER JOIN g2_Item ON g2_ChildEntity.g_id = g2_Item.g_id INNER JOIN g2_AccessSubscriberMap ON g2_ChildEntity.g_id = g2_AccessSubscriberMap.g_itemId WHERE g2_ChildEntity.g_parentId = 2413 AND g2_AccessSubscriberMap.g_accessListId IN (6623,6621,6631,6630,6626,6624,6622,6638) ORDER BY g2_Item.g_title, g2_ChildEntity.g_id LIMIT 9223372036854775807 file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/7/2742.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2479.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2482.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2485.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2491.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2494.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/4/2497.inc) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/2/6/2685.inc) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/blocks/local/ImageBlock.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/blocks/ImageBlock.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/blocks/ImageBlock.tpl) getParameter id.rootAlbum for core plugin Loading plugin imageblock Class not defined, trying to include it. file_exists(/home/perrygo/public_html/patriots/gallery/modules/imageblock/module.inc) imageblock plugin successfully instantiated Check the version of the imageblock plugin The version of the imageblock plugin is ok getParameter id.rootAlbum for core plugin (mysqlt): SELECT COUNT(*) FROM g2_ImageBlockCacheMap WHERE g2_ImageBlockCacheMap.g_userId = 6 (mysqlt): SELECT g2_ImageBlockCacheMap.g_itemId, g2_ItemAttributesMap.g_viewCount FROM g2_ImageBlockCacheMap LEFT JOIN g2_ImageBlockDisabledMap ON g2_ImageBlockCacheMap.g_itemId=g2_ImageBlockDisabledMap.g_itemId, g2_ItemAttributesMap WHERE g2_ImageBlockCacheMap.g_userId = 6 AND g2_ImageBlockCacheMap.g_itemType = 1 AND g2_ImageBlockDisabledMap.g_itemId IS NULL AND g2_ImageBlockCacheMap.g_itemId = g2_ItemAttributesMap.g_itemId ORDER BY RAND() LIMIT 1 file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/3/4/3430.inc) (mysqlt): SELECT g2_Derivative.g_id, g2_ChildEntity.g_parentId FROM g2_Derivative, g2_ChildEntity WHERE g2_Derivative.g_id = g2_ChildEntity.g_id AND g2_ChildEntity.g_parentId IN (3430) AND g2_Derivative.g_derivativeType IN (1) file_exists(/home/perrygo/public_html/2006patriots10u/patriots/g2data/cache/entity/3/4/3432.inc) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/local/ImageBlock.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/ImageBlock.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/imageblock/templates/ImageBlock.tpl) strftime(%x, 1153095151) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/local/NavigationLinks.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/NavigationLinks.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/core/templates/blocks/NavigationLinks.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/puzzle/templates/local/MakePuzzle.tpl) file_exists(/home/perrygo/public_html/patriots/gallery//modules/puzzle/templates/MakePuzzle.tpl) stat(/home/perrygo/public_html/patriots/gallery//modules/puzzle/templates/MakePuzzle.tpl) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/puzzle/local/applets) file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/puzzle/local/applets) Loading plugin core core plugin successfully instantiated getParameter id.adminGroup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../images/local/xhtml10.png) Loading plugin core core plugin successfully instantiated getParameter id.adminGroup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../images/local/gallery.gif) Loading plugin core core plugin successfully instantiated getParameter id.adminGroup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/core/data/local/g22-double_double.png) Loading plugin core core plugin successfully instantiated getParameter id.adminGroup for core plugin file_exists(/home/perrygo/public_html/patriots/gallery/modules/core/classes/../../../modules/core/data/local/donate.png)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-10-21 15:22

shmagm1,
I don't think it is a permissions thing as I can add your image:
http://www.langleycom.com/gallery2/main.php?g2_itemId=45 and give permissions for dave / dave to view it and it seems to work. Perhaps j.mike.rollins has a idea.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Tue, 2008-10-21 16:40

Hmmmmm, I just logged in to http://www.langleycom.com/gallery2/main.php?g2_itemId=45 as dave/dave and I get the following error:

Redownload failed. Contact site admin.

See attachment. I get the same results using Firefox and IE.

--Perry

floridave wrote:
shmagm1,
I don't think it is a permissions thing as I can add your image:
http://www.langleycom.com/gallery2/main.php?g2_itemId=45 and give permissions for dave / dave to view it and it seems to work. Perhaps j.mike.rollins has a idea.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Wed, 2008-10-22 04:26

I think the error is due to the permissions. Here is my hypothesis:

After authenticating to the site, we can see the image. When we click the puzzle link, the Java puzzle applet is passed the same URL. With a browser, we are allowed to download the image with that URL because the browser sends the server the appropriate authentication credentials. However, the Java Applet will not send these credentials. So, it cannot download the image.

Does anybody know a way to pass the authentication credentials to the applet so it can use them to access the server?

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Sat, 2008-10-25 18:35

I added some code to pass the session authentication information to the applet. This allows me to use the puzzle on albums that require authentication.

I added this code to the subversion repository. It should be available from the "Get More Plugins" tab within a day. This new code is version 2.1.2

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Wed, 2008-10-29 16:38

I deleted the puzzle in Site Admin > Admin Options > Gallery > Plugins thinking that I needed to delete it prior to trying the new puzzle version 2.1.2. However, [/i]I can not figure out how to reload puzzle so it appears under Admin > Admin Options > Display. How do I get the new version of puzzle?

Thanks for all the help.

Perry

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Thu, 2008-10-30 01:40

See if these instructions help.

http://codex.gallery2.org/Gallery2:Installing_Additional_Components

If you still have questions, I will create some additional documentation over the weekend. (I happen to be in Orlando, FL this week but will be back on my home network this weekend.)

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Thu, 2008-10-30 13:13

Hi j.mike.rollins,

I'm not seeing the puzzle available on the Plugins tab and on the Get More Plugins tab. I've clicked the Update Plugin Test and still no puzzle. Thanks for your help.

--Perry

 
j.mike.rollins

Joined: 2005-11-03
Posts: 27
Posted: Mon, 2008-11-03 04:14

Try the following: "Site Admin", "Plugins" and then "Get More Plugins"

Select the "Show Repository List" button.
Enable the community plugins: "Community plugins (use at your own risk!)"
Then save the options: "Save"

Select the button "Update Plugin List".

The plugin is listed as the following: "Puzzle Module 2.1.2 CamoTruck.Net: Puzzle Module"

 
shmagm1

Joined: 2006-06-14
Posts: 32
Posted: Mon, 2008-11-03 15:18

You rock!!! Thanks j.mike.rollins. I found and loaded Puzzle Module 2.1.2 CamoTruck.Net: Puzzle Module and it appears to be working fine. Thanks again.

--Perry

 
braqets

Joined: 2007-06-06
Posts: 15
Posted: Mon, 2009-08-24 22:24

Thanks to CamoTruck.Net and Gallery2 for this very cool feature. I just would like to know hot to change the default puzzle's type so it can start with de swapping one?
Maybe in the future you can add an option at the admin page to choose the desired one?
Another suggestion would be adding a record scors (time and moves) from other players.
Sorry for my bad English.

A puzzle from my gallery: http://fotos.delalibertad.com/main.php?g2_view=puzzle.MakePuzzle&g2_form%5BpuzzleType%5D=swap&g2_form%5BpuzzleLevel%5D=veryhard&g2_itemId=1077

Braqets