Coder Social home page Coder Social logo

gallery's People

Contributors

alexgloom avatar bitwisecreative avatar cherbst avatar enminc avatar gadgetto avatar hansek avatar hypercubed avatar jako avatar jpdevries avatar jsewill avatar mark-h avatar opengeek avatar pixelchutes avatar rayden avatar theboxer avatar thomasd avatar vladimirshugaev avatar yurkobb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gallery's Issues

Upload image using Gallery TV

When we use the Gallery TV we can choose a previously uploaded image but cannot upload a new one ( if we do "update album" we exit the page and are redirected to a new one ). It will be so usefull if we could have an option to upload a new image from this view.

Cache Size

The cache continues to increase in size (phpthumb creates new cache images) every time someone views a gallery). CentOS 5.5, Apache 2.2.3, php 5.2.10, mysql 5.0.77.

[FR] Watermarking

I know you mentioned that this was already being considered as a future feature, but thought I'd raise it here as well as it's something I would find really useful. I know phpThumb has watermarking features included in it so will possibly try going down that road but would love for it all to be included in Gallery =)

[FR] useCss Parameter for gallerific

Something like values between 0 and 5, with default to 2. In this way you can define which css-file you want to use by something like "galleriffic-[paramter].css" or wether you want to use your own (0 = don´t register any css file). So then it´s up to oneself to setup the correct css file and to position it in the correct order of other existing stylesheets in the html header. The last advantage is a problem in the current release.
Thanks Peter

Moving servers - path issues

Couple of issues here. I've noticed that some gallery template variable values include the FQDN in the "gal_src" property, eg "http://mydomain.com/assets/components/gallery/files/xxxx.jpg"). This makes it very hard to move a MODx install using Gallery to a different domain.
The other problem is the paths stored in the system_settings table. These are all absolute file system paths and there's no way to change these other than updating the DB directly.

sort in manager update album

in the manager update album-view:
Options to sort the images (name, creatondate,... ASC and DESC)
this way , when you have a lot of images, it is easier to lookup an image and update it.

Show Multiple Galleries & All

I was wondering if we could have the following features included in the next release/update of the Rev Gallery. The ability to have multiple galleries shown using &album=1,2,3,4 and the all option &album=all. I think this would be a nice feature that many users would appreciate.

Thanks,

Rossco

*original request - http://modxcms.com/forums/index.php/topic,55871.0 *

GalleryAlbums snippet doesn't do anything.

Greetings, I am using Gallery with ModX Revolution RC3 and seem to be unable to get the GalleryAlbums snippet to work. Both when implimenting it manually, and when using your example gallery code.

All other functions/snippets work fine, however GalleryAlbums just doesn't render anything. :(

[FR] do not override images with batch upload

update image folder,

I automaitcally add images in my image folder through other sites.
So I need to update my albums.
I would like to use batch upload and point to the (existing) folder.
but then it overrides the old entries and I loose the tag information.

any way to let it check wether the the images are allready inthere an if they are, not to update so the tags are kept?

Gallery only works fine in 'web' context

If you use the gallery component in a context (subdomain), the images link to assets/... so they don't show in the subdomain.
There should be a possibility to link the images to the head domain or a separate folder in the subdomain.

problem with deleting images and albums

[2010-11-04 19:27:13](ERROR @ /assets/components/gallery/connector.php) [Gallery] An error occurred while trying to remove the attachment file at: /home/medieste/public_html/assets/components/gallery/files/2010/11/untitled.png

Spaces in paths causing an error?

I think there's might be a bug with spaces in paths.

When i'm trying to upload an image to an album
(Components> Gallery> Album: SOMENAME > Upload Item).
i get an Error: 'An error occurred while trying to upload the item'.

the error log output:
(ERROR @ /modx/assets/components/gallery/connector.php)
[Gallery] An error occurred while trying to upload the file:
D:\WebSite Development\server\xampp\tmp\php2852.tmp
to D:/WebSiteDevelopment/server/xampp/htdocs/modx/assets/components/gallery
/files/2010/10/62231_424573019631_566639631_5130233_7671394_n.jpg

i think the space in the path (D:\WebSite Development..) is causing this error.
i might be wrong (:
either way i'd like to know how to resolve this if someone knows.

_
First Posted on:
http://modxcms.com/forums/index.php/topic,53269.msg321315.html#msg321315

Invalid URL formatting

Sean - thanks for fixing the '&' -> '&' problem
Unfortunately the issue I flagged as a comment on that ticket is related, but is a different problem and still needs fixing.

In summary - I'm getting URL's like the following
http://axe/modx-2.0.0-rc-1/index.php?id=19?galAlbum=3
You can see the second '?' which should be a '&' this is an incorrectly formatted URL and results the page parameters being ignored.
The following text is a copy of my comment on the original ticket (#2) - it describes what still needs to be done to get Gallery working in a default MODx installation.

It can be worked around by editing pre-defined chunks galAlbumRowTpl and galItemThumb; and creating two custom chunks galItemAlbum and galItemTag. The purpose of these chunks is to swap '?' for '&'. I've added details into the Gallery 0.1.0 rc2 Support thread.
The '&' is needed if MODx is used in default configuration and '?' is needed is Search Engine Friendly URLs are being generated.
The fix is probably to create the URL's in the snippet; doing it in the chunk will be fairly verbose and prone to user error.

[BUG] Apostrophes in image filenames breaks manager JS

I usually try to use sane filenames but some images with apostrophes (single quotes) managed to slip into my gallery.

When these images are used in a resource (using the gallery TV), the filenames in the JSON fields are not escaped correctly, causing the JavaScript to break. This usually results in the "Template Variables" tab not rendering correctly, with most TV's unusable.

Cheers,
Phil

Database images

I was wondering whether to try and do this myself, however wouldn't have a clue where to start with repackaging and working with the modx api at this time... Maybe with more time I could.

Basically, instead of uploading to the FTP, why not create a table for all images allowing for the following sizes:

micro
thumbnail
standard
large

Then using a file called img.php you call the image from the db using img.php?type=thumb&id=1, also allowing for mod rewrite img_thumb_1.jpg etc.

Configs to allow for the maximum sizes for each image size, I have built this in a non framework / non modx way if you would like to see an example, and I have a function which works with ImageMagick only, but happy to help where I can. :)

If you need any more information, please do let me know.

update album window

In firefox 3.6.8,
If you hover over the images on the right in the album, there is an empty line inserted underneath it.
Not a reall problem but annoying.

Add ability to regenerate thumbnails

A few of the images I've added to albums need the thumbnail updated. One seems to have had an issue with the original generation of the thumbnail image and I'd like to re-do it, and other images I've had to delete and re-add because the original image used was the wrong one.
Even after deleting an image and re-adding it, the old thumbnail is still in use, and I want a way to fix/update/remove/refresh it.
I have tried looking for where these are stored so I can manually remove the old version but am having trouble doing this also.

phpthumb cache not working

Hi,

in the current version (1.0.1 rc1), the phpthumb cache is not working for me. Neither on a windows dev environment, nor on my mac dev environment.

But: gallery is a great plugin! :-)

Best regards,
sewid

[SOLVED] GalleryItemTV returns JSON when used with getResources

In a getResources call with a template containing [[+tv.GalleryItemTV]], the resulting output is the raw Gallery JSON from the output filter:

{"gal_src":"...","gal_id":1,"gal_name":"...","gal_description":"...","gal_image_width":"150","gal_image_height":"150","gal_orig_width":300,"gal_orig_height":360,"gal_album":"1","gal_watermark-text":"","gal_watermark-text-position":"BL","gal_other":"","gal_rotate":"0","gal_sizer":"50","gal_cropCoords":"","gal_cropTop":0,"gal_cropRight":0,"gal_cropBottom":0,"gal_cropLeft":0}

I'm not sure if this is by design (MODx Core) or perhaps a limitation of getResources (ADDON), so I decided to start here since Gallery is the only working example I have seen this happen with to date.

The expected output would have been the HTML tag from the output filter. Are there any options to simply return the phpthumb URL from the output filter if you wanted to customize the way GalleryItemTV is used?

Outputting valid code

The ampersands in the source of my thumbs and in my image-links are being outputted in invalid format (ampersand hasn't been converted to &). Is this a possibility? Thanks!

MODx Revolution 2.0.4pl2 update creates conflict with Gallery

I had a website on Revo 2.0.0 working correctly with the Gallery tool. As I then began to upgrade the 2.0.3, then 2.0.4, the file manager stopped working correctly. After much discussion on the modx forum, it came out that MODx was not the issue, but the Gallery tool. For some reason, the folders that I stored images in that I used for my batch loading into the Gallery could no longer be opened by the file manager. I would get the error ""Please specify a valid directory"" and it would cause the tree structure to close. As this is a problem with a live site, and I have an unhappy client, I would appreciate it if this could be looked at. Thanks.

Feature request: "left-click" should do "Update Album"

Currently (modx 2.0.0 pl and gallery 1.0.0 rc1) you have to "right click" an album and choose "Update Album" to edit. There is currently no action on "left click" except that the background color changes. Could "Update Album" be the default "left-click" action?

Link to thumbnail gets a double replacement

Hi,

I've just installed 0.1.2 rc2 and discovered, that links to the thumbnails gets a double replacement. Instead of http://example.com/something?another&anything=1 it shows http://example.com/something?another&anything=1

I had to modify the galitem.class.php like this to get it correct:
case 'thumbnail':
$value = $this->getPhpThumbUrl();
if (empty($format)) $format = array();
$format['src']= MODX_URL_SCHEME.MODX_HTTP_HOST.$this->xpdo->getOption('gallery.files_url').$this->get('filename');
$url = $value.'?'.http_build_query($format);
//$value = str_replace('&','&',$url); // This has to be removed.
$value = $url;
break;

Best regards,
sewid

Gallery albums Grouping

Hello I'm working on a site in modx and came to the conclusion,
when I want multi-pull galleries for multi-pull pages it's not possible to filter the gallery list.
I was looking for tags for the galleries but didn't find any.

Grtz Stormbyte

[FR] hide name/random thumbnail

I have two requests/suggestions

  • being able to add a parameter to the snippet to not display the image name - this would allow not to display names where they are only the name of the file and where no name for the image is needed/desired but a load of file names look a bit rubbish
  • being able to display an album with an individual (random) thumbnail from the gallery to allow users to visit the full gallery by clicking onto the thumbnail

Otherwise, good work, thank you!!

galItemThumb Chunk generates invalid html

Hi,

the linebreaks in galItemThumb have to be removed, to get valid html.

It has to look like this:


        <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
    </a>
</div>

Best regards,
sewid

File Tree Not Showing IN Gallery Browser

I think the title says it all.

I have installed Gallery v1.0.1 rc1 and created a TV as directed in the documentation

I can see the gallery plugin on the resources that have been assigned the TV

When I go into the TV and click "Choose an Image" I get a window very similar to the modx file browser but the left column is empty. I expect to see the file tree and some controls (like an upload button).

I am therefore unable to upload or choose any images to put in a gallery!

Error on Install

After recently installing the gallery (version 1 RC1) into a fresh installation of ModX Rev 2.0PL

I get this error in the terminal

Workspace environment initiated, now installing package...

Error saving vehicle object: Array ( [license] => GNU GENERAL PUBLIC LICENSE Version 2, June 1991 -------------------------- Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -------- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION --------------------------------------------------------------- 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY ----------- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. --------------------------- END OF TERMS AND CONDITIONS [readme] => -------------------- 3PC: Gallery -------------------- Version: 0.1.0 Since: June 4th, 2010 Author: Shaun McCormick -------------------- New since 0.1.0-rc1: - Added GalleryItem snippet - Better integration between GalleryAlbums, Gallery, and GalleryItem snippet calls - Now can use them all on the same page to browse galleries -------------------- A Gallery system for your photos and videos. This is an alpha prerelease. Therefore, things might break. But have fun. :) Feel free to suggest ideas/improvements/bugs on the forums. Also, please see the JIRA project: http://svn.modxcms.com/jira/browse/GALLERY [action] => install [signature] => 7c061594ee1069290be2746df277c5c0 [register] => mgr [topic] => /workspace/package/install/gallery-1.0.0-rc1/ [HTTP_MODAUTH] => modx4c4995c5788f51.81137470 [package_action] => 0 [vehicle_package] => transport [vehicle_class] => xPDOObjectVehicle [class] => modCategory [guid] => dc5cbae1c670ce8840e98dde1c01d3aa [native_key] => 1 [filename] => modCategory/7c061594ee1069290be2746df277c5c0.vehicle [namespace] => gallery [unique_key] => category [preserve_keys] => [update_object] => 1 [related_objects] => Array ( [Chunks] => Array ( [718733eaa04c9959fbf193c1c717a121] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name [class] => modChunk [object] => {"id":0,"name":"galAlbumRowTpl","description":"","editor_type":0,"category":0,"cache_type":0,"snippet":"[[+name]]</a></li>","locked":0,"properties":""} [guid] => 99b7041ed4013cedd4c466ec2257d5eb [native_key] => 0 [signature] => 278de1ab1773b26654637d73fe6037b3 ) [675eb7ddc2b673ae65e9da4759698bb6] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name [class] => modChunk [object] => {"id":1,"name":"galItemThumb","description":"","editor_type":0,"category":0,"cache_type":0,"snippet":"

\n \n\n "[[+name]]"\n </a>\n</div>","locked":0,"properties":""} [guid] => 2ed0530fea465575b4be9f4c5ae20ac4 [native_key] => 1 [signature] => aa0347d9981f7a3c4ec6310aa3789c54 ) ) [Snippets] => Array ( [991566502d690f5c425d92a099d95ec9] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name [class] => modSnippet [object] => {"id":0,"name":"Gallery","description":"","editor_type":0,"category":0,"cache_type":0,"snippet":"/\n * Gallery\n *\n * Copyright 2010 by Shaun McCormick \n *\n * Gallery is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Gallery is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @Package gallery\n */\n/\n * The main Gallery snippet.\n \n * @Package gallery\n */\n$gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties);\nif (!($gallery instanceof Gallery)) return '';\n\n/ setup default properties /\n$album = $modx->getOption('album',$scriptProperties,false);\n$plugin = $modx->getOption('plugin',$scriptProperties,'');\n$tag = $modx->getOption('tag',$scriptProperties,'');\n$limit = $modx->getOption('limit',$scriptProperties,0);\n$start = $modx->getOption('start',$scriptProperties,0);\n$sort = $modx->getOption('sort',$scriptProperties,'rank');\n$sortAlias = $modx->getOption('sortAlias',$scriptProperties,'galItem');\nif ($sort == 'rank') $sortAlias = 'AlbumItems';\n$dir = $modx->getOption('dir',$scriptProperties,'ASC');\n$showInactive = $modx->getOption('showInactive',$scriptProperties,false);\n$linkToImage = $modx->getOption('linkToImage',$scriptProperties,false);\n$imageGetParam = $modx->getOption('imageGetParam',$scriptProperties,'galItem');\n$albumRequestVar = $modx->getOption('albumRequestVar',$scriptProperties,'galAlbum');\n$tagRequestVar = $modx->getOption('tagRequestVar',$scriptProperties,'galTag');\n$itemCls = $modx->getOption('itemCls',$scriptProperties,'gal-item');\n\n/ check for REQUEST vars if property set _/\nif ($modx->getOption('checkForRequestAlbumVar',$scriptProperties,true)) {\n if (!empty($_REQUEST[$albumRequestVar])) $album = $_REQUEST[$albumRequestVar];\n}\nif ($modx->getOption('checkForRequestTagVar',$scriptProperties,true)) {\n if (!empty($_REQUEST[$tagRequestVar])) $tag = $REQUEST[$tagRequestVar];\n}\nif (empty($album) && empty($tag)) return '';\n\n/ build query /\n$tagc = $modx->newQuery('galTag');\n$tagc->setClassAlias('TagsJoin');\n$tagc->select('GROUP_CONCAT('.$modx->getSelectColumns('galTag','TagsJoin','',array('tag')).')');\n$tagc->where($modx->getSelectColumns('galTag','TagsJoin','',array('item')).' = '.$modx->getSelectColumns('galItem','galItem','',array('id')));\n$tagc->prepare();\n$tagSql = $tagc->toSql();\n\n$c = $modx->newQuery('galItem');\n$c->select(array('galItem.'));\n$c->select('('.$tagSql.') AS tags');\n$c->innerJoin('galAlbumItem','AlbumItems');\n$c->innerJoin('galAlbum','Album',$modx->getSelectColumns('galAlbumItem','AlbumItems','',array('album')).' = '.$modx->getSelectColumns('galAlbum','Album','',array('id')));\n\n/* pull by album /\nif (!empty($album)) {\n $albumField = is_numeric($album) ? 'id' : 'name';\n\n $albumWhere = $albumField == 'name' ? array('name' => $album) : $album;\n $album = $modx->getObject('galAlbum',$albumWhere);\n if (empty($album)) return '';\n $c->where(array(\n 'Album.'.$albumField => $album->get($albumField),\n ));\n $galleryId = $album->get('id');\n $galleryName = $album->get('name');\n $galleryDescription = $album->get('description');\n unset($albumWhere,$albumField);\n}\nif (!empty($tag)) { / pull by tag /\n $c->innerJoin('galTag','Tags');\n $c->where(array(\n 'Tags.tag' => $tag,\n ));\n if (empty($album)) {\n $galleryId = 0;\n $galleryName = $tag;\n $galleryDescription = '';\n }\n}\n$c->where(array(\n 'galItem.mediatype' => $modx->getOption('mediatype',$scriptProperties,'image'),\n));\nif (!$showInactive) {\n $c->where(array(\n 'galItem.active' => true,\n ));\n}\n\n$c->sortby($sortAlias.'.'.$sort,$dir);\nif (!empty($limit)) $c->limit($limit,$start);\n$items = $modx->getCollection('galItem',$c);\n\n/ load plugins /\nif (!empty($plugin)) {\n if (($className = $modx->loadClass('gallery.plugins.'.$plugin,$gallery->config['modelPath'],true,true))) {\n $plugin = new $className($gallery,$scriptProperties);\n $plugin->load();\n $scriptProperties = $plugin->adjustSettings($scriptProperties);\n }\n} else {\n if ($modx->getOption('useCss',$scriptProperties,true)) {\n $modx->regClientCSS($gallery->config['cssUrl'].'web.css');\n }\n}\n\n/ iterate /\n$output = '';\nforeach ($items as $item) {\n $itemArray = $item->toArray();\n $itemArray['cls'] = $itemCls;\n $itemArray['filename'] = basename($item->get('filename'));\n $itemArray['image_absolute'] = $modx->getOption('gallery.files_url').$item->get('filename');\n $itemArray['filesize'] = $item->get('filesize');\n $itemArray['thumbnail'] = $item->get('thumbnail',array(\n 'w' => (int)$modx->getOption('thumbWidth',$scriptProperties,100),\n 'h' => (int)$modx->getOption('thumbHeight',$scriptProperties,100),\n 'zc' => (boolean)$modx->getOption('thumbZoomCrop',$scriptProperties,1),\n 'far' => (boolean)$modx->getOption('thumbFar',$scriptProperties,'C'),\n ));\n $itemArray['image'] = $item->get('thumbnail',array(\n 'w' => (int)$modx->getOption('imageWidth',$scriptProperties,500),\n 'h' => (int)$modx->getOption('imageHeight',$scriptProperties,500),\n 'zc' => (boolean)$modx->getOption('imageZoomCrop',$scriptProperties,false),\n 'far' => (string)$modx->getOption('imageFar',$scriptProperties,''),\n ));\n if (!empty($album)) $itemArray['album'] = $album->get('id');\n if (!empty($tag)) $itemArray['tag'] = $tag;\n $itemArray['linkToImage'] = $linkToImage;\n $itemArray['imageGetParam'] = $imageGetParam;\n $itemArray['albumRequestVar'] = $albumRequestVar;\n $itemArray['tagRequestVar'] = $tagRequestVar;\n $itemArray['tag'] = '';\n\n $output .= $gallery->getChunk($modx->getOption('thumbTpl',$scriptProperties,'galItemThumb'),$itemArray);\n}\n\n$containerTpl = $modx->getOption('containerTpl',$scriptProperties,false);\nif (!empty($containerTpl)) {\n $ct = $gallery->getChunk($containerTpl,array(\n 'thumbnails' => $output,\n 'album_name' => $galleryName,\n 'album_description' => $galleryDescription,\n ));\n if (!empty($ct)) $output = $ct;\n}\n\n$toPlaceholder = $modx->getOption('toPlaceholder',$scriptProperties,false);\nif (!empty($toPlaceholder)) {\n $modx->toPlaceholders(array(\n $toPlaceholder => $output,\n $toPlaceholder.'.id' => $galleryId,\n $toPlaceholder.'.name' => $galleryName,\n $toPlaceholder.'.description' => $galleryDescription,\n ));\n} else {\n $placeholderPrefix = $modx->getOption('placeholderPrefix',$scriptProperties,'gallery.');\n $modx->toPlaceholders(array(\n $placeholderPrefix.'id' => $galleryId,\n $placeholderPrefix.'name' => $galleryName,\n $placeholderPrefix.'description' => $galleryDescription,\n ));\n return $output;\n}\nreturn '';","locked":0,"properties":"a:27:{s:5:"album";a:6:{s:4:"name";s:5:"album";s:4:"desc";s:80:"Will load only items from this album. Can be either the name or ID of the Album.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:3:"tag";a:6:{s:4:"name";s:3:"tag";s:4:"desc";s:35:"Will load only items with this tag.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:6:"plugin";a:6:{s:4:"name";s:6:"plugin";s:4:"desc";s:115:"The name of a plugin to use for front-end displaying. Please see the official docs for a list of available plugins.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:8:"thumbTpl";a:6:{s:4:"name";s:8:"thumbTpl";s:4:"desc";s:45:"The Chunk to use as a tpl for each thumbnail.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:12:"galItemThumb";s:7:"lexicon";N;}s:12:"containerTpl";a:6:{s:4:"name";s:12:"containerTpl";s:4:"desc";s:40:"An optional chunk to wrap the output in.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:7:"itemCls";a:6:{s:4:"name";s:7:"itemCls";s:4:"desc";s:33:"The CSS class for each thumbnail.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:8:"gal-item";s:7:"lexicon";N;}s:13:"toPlaceholder";a:6:{s:4:"name";s:13:"toPlaceholder";s:4:"desc";s:101:"If set, will set the output to a placeholder of this value, and the snippet call will output nothing.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:10:"thumbWidth";a:6:{s:4:"name";s:10:"thumbWidth";s:4:"desc";s:49:"The width of the generated thumbnails, in pixels.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:3:"100";s:7:"lexicon";N;}s:11:"thumbHeight";a:6:{s:4:"name";s:11:"thumbHeight";s:4:"desc";s:50:"The height of the generated thumbnails, in pixels.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:3:"100";s:7:"lexicon";N;}s:13:"thumbZoomCrop";a:6:{s:4:"name";s:13:"thumbZoomCrop";s:4:"desc";s:50:"Whether or not the thumbnail will be zoom-cropped.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}s:8:"thumbFar";a:6:{s:4:"name";s:8:"thumbFar";s:4:"desc";s:73:"The "far" value for phpThumb for the thumbnail, for aspect ratio zooming.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";s:1:"C";s:7:"lexicon";N;}s:11:"linkToImage";a:6:{s:4:"name";s:11:"linkToImage";s:4:"desc";s:64:"If true, will link directly to the image. If false, will append ";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:13:"imageGetParam";a:6:{s:4:"name";s:13:"imageGetParam";s:4:"desc";s:137:"The GET param to use when not linking directly to an image. Make sure this matches the getParam property in the GalleryItem snippet call.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:7:"galItem";s:7:"lexicon";N;}s:10:"imageWidth";a:6:{s:4:"name";s:10:"imageWidth";s:4:"desc";s:71:"If being used by a plugin, the width of the currently on-display image.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";i:500;s:7:"lexicon";N;}s:11:"imageHeight";a:6:{s:4:"name";s:11:"imageHeight";s:4:"desc";s:72:"If being used by a plugin, the height of the currently on-display image.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";i:500;s:7:"lexicon";N;}s:13:"imageZoomCrop";a:6:{s:4:"name";s:13:"imageZoomCrop";s:4:"desc";s:94:"If being used by a plugin, whether or not the currently on-display image will be zoom-cropped.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;}s:8:"imageFar";a:6:{s:4:"name";s:8:"imageFar";s:4:"desc";s:69:"The "far" value for phpThumb for the image, for aspect ratio zooming.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:4:"sort";a:6:{s:4:"name";s:4:"sort";s:4:"desc";s:28:"The field to sort images by.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:4:"rank";s:7:"lexicon";N;}s:3:"dir";a:6:{s:4:"name";s:3:"dir";s:4:"desc";s:32:"The direction to sort images by.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:3:"ASC";s:7:"lexicon";N;}s:5:"limit";a:6:{s:4:"name";s:5:"limit";s:4:"desc";s:53:"If set to non-zero, will only show X number of items.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";i:0;s:7:"lexicon";N;}s:5:"start";a:6:{s:4:"name";s:5:"start";s:4:"desc";s:108:"The index to start grabbing from when limiting the number of items. Similar to an SQL order by start clause.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";i:0;s:7:"lexicon";N;}s:12:"showInactive";a:6:{s:4:"name";s:12:"showInactive";s:4:"desc";s:43:"If true, will also display inactive images.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;}s:23:"checkForRequestAlbumVar";a:6:{s:4:"name";s:23:"checkForRequestAlbumVar";s:4:"desc";s:99:"If true, if a REQUEST var of "album" is found, will use that as the album property for the snippet.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}s:15:"albumRequestVar";a:6:{s:4:"name";s:15:"albumRequestVar";s:4:"desc";s:106:"If checkForRequestAlbumVar is set to true, will look for a REQUEST var with this name to select the album.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:8:"galAlbum";s:7:"lexicon";N;}s:21:"checkForRequestTagVar";a:6:{s:4:"name";s:21:"checkForRequestTagVar";s:4:"desc";s:95:"If true, if a REQUEST var of "tag" is found, will use that as the tag property for the snippet.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}s:13:"tagRequestVar";a:6:{s:4:"name";s:13:"tagRequestVar";s:4:"desc";s:102:"If checkForRequestTagVar is set to true, will look for a REQUEST var with this name to select the tag.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:6:"galTag";s:7:"lexicon";N;}s:6:"useCss";a:6:{s:4:"name";s:6:"useCss";s:4:"desc";s:109:"If true, will use the CSS provided by the Gallery snippet. Set to false to not load any Gallery-provided CSS.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}}","moduleguid":""} [guid] => 1cad30a27c06fdf2f1a791a7a44ff01a [native_key] => 0 [signature] => 213ed368b552ddd2ab68f3aaf968cb4f ) [c896f183dbd1de9d242651267301ada2] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name [class] => modSnippet [object] => {"id":1,"name":"GalleryAlbums","description":"","editor_type":0,"category":0,"cache_type":0,"snippet":"/\n * Gallery\n *\n * Copyright 2010 by Shaun McCormick \n *\n * Gallery is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Gallery is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @Package gallery\n */\n/\n * Loads a list of Albums\n *\n * @Package gallery\n */\n$gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties);\nif (!($gallery instanceof Gallery)) return '';\n\n/ setup default properties /\n$rowTpl = $modx->getOption('rowTpl',$scriptProperties,'galAlbumRowTpl');\n$showInactive = $modx->getOption('showInactive',$scriptProperties,false);\n$prominentOnly = $modx->getOption('prominentOnly',$scriptProperties,true);\n$toPlaceholder = $modx->getOption('toPlaceholder',$scriptProperties,false);\n$sort = $modx->getOption('sort',$scriptProperties,'createdon');\n$dir = $modx->getOption('dir',$scriptProperties,'DESC');\n$limit = $modx->getOption('limit',$scriptProperties,10);\n$start = $modx->getOption('start',$scriptProperties,0);\n$parent = $modx->getOption('parent',$scriptProperties,0);\n$showAll = $modx->getOption('showAll',$scriptProperties,false);\n$albumRequestVar = $modx->getOption('albumRequestVar',$scriptProperties,'galAlbum');\n\n/ build query /\n$c = $modx->newQuery('galAlbum');\nif (!$showInactive) {\n $c->where(array(\n 'active' => true,\n ));\n}\nif ($prominentOnly) {\n $c->where(array(\n 'prominent' => true,\n ));\n}\nif (empty($showAll)) {\n $c->where(array(\n 'parent' => $parent,\n ));\n}\n$c->sortby($sort,$dir);\nif ($limit > 0) { $c->limit($limit,$start); }\n$albums = $modx->getCollection('galAlbum',$c);\n\n/ iterate /\n$output = '';\nforeach ($albums as $album) {\n $albumArray = $album->toArray();\n $albumArray['albumRequestVar'] = $albumRequestVar;\n $output .= $gallery->getChunk($rowTpl,$albumArray);\n}\n\nif ($toPlaceholder) {\n $modx->setPlaceholder($toPlaceholder,$output);\n return '';\n}\nreturn $output;","locked":0,"properties":"a:11:{s:6:"rowTpl";a:6:{s:4:"name";s:6:"rowTpl";s:4:"desc";s:36:"The Chunk to use for each album row.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:14:"galAlbumRowTpl";s:7:"lexicon";N;}s:4:"sort";a:6:{s:4:"name";s:4:"sort";s:4:"desc";s:33:"The field to sort the results by.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:9:"createdon";s:7:"lexicon";N;}s:3:"dir";a:6:{s:4:"name";s:3:"dir";s:4:"desc";s:37:"The direction to sort the results by.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:4:"DESC";s:7:"lexicon";N;}s:5:"limit";a:6:{s:4:"name";s:5:"limit";s:4:"desc";s:62:"If set to non-zero, will limit the number of results returned.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:2:"10";s:7:"lexicon";N;}s:5:"start";a:6:{s:4:"name";s:5:"start";s:4:"desc";s:39:"The index to start from in the results.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:1:"0";s:7:"lexicon";N;}s:13:"toPlaceholder";a:6:{s:4:"name";s:13:"toPlaceholder";s:4:"desc";s:67:"If not empty, will set the output to a placeholder with this value.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;}s:12:"showInactive";a:6:{s:4:"name";s:12:"showInactive";s:4:"desc";s:46:"If true, will show inactive galleries as well.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;}s:13:"prominentOnly";a:6:{s:4:"name";s:13:"prominentOnly";s:4:"desc";s:67:"If true, will only display albums marked with a "prominent" status.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}s:6:"parent";a:6:{s:4:"name";s:6:"parent";s:4:"desc";s:54:"Grab only the albums with a parent album with this ID.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:1:"0";s:7:"lexicon";N;}s:7:"showAll";a:6:{s:4:"name";s:7:"showAll";s:4:"desc";s:57:"If true, will show all albums regardless of their parent.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;}s:15:"albumRequestVar";a:6:{s:4:"name";s:15:"albumRequestVar";s:4:"desc";s:106:"If checkForRequestAlbumVar is set to true, will look for a REQUEST var with this name to select the album.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:8:"galAlbum";s:7:"lexicon";N;}}","moduleguid":""} [guid] => a7f8748bf544ce0bf94be33010583b29 [native_key] => 1 [signature] => 326f18f076490ffe31bc49468cf25688 ) [f7c3ca6960cd677544c101f34e0022d2] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name [class] => modSnippet [object] => {"id":2,"name":"GalleryItem","description":"","editor_type":0,"category":0,"cache_type":0,"snippet":"/\n * Gallery\n *\n * Copyright 2010 by Shaun McCormick \n *\n * Gallery is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Gallery is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @Package gallery\n */\n/\n * Display a single Gallery Item\n *\n * @Package gallery\n */\n$gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties);\nif (!($gallery instanceof Gallery)) return '';\n\n/ get ID of item _/\n$id = (int)$modx->getOption('id',$scriptProperties,false);\nif ($modx->getOption('checkForRequestVar',$scriptProperties,true)) {\n $getParam = $modx->getOption('getParam',$scriptProperties,'galItem');\n if (!empty($_REQUEST[$getParam])) { $id = (int)$REQUEST[$getParam]; }\n}\nif (empty($id)) return '';\n\n/ setup default properties /\n$tpl = $modx->getOption('tpl',$scriptProperties,'galItem');\n$toPlaceholders = $modx->getOption('toPlaceholders',$scriptProperties,true);\n$toPlaceholdersPrefix = $modx->getOption('toPlaceholdersPrefix',$scriptProperties,'galitem');\n$albumTpl = $modx->getOption('albumTpl',$scriptProperties,'galItemAlbum');\n$albumSeparator = $modx->getOption('albumSeparator',$scriptProperties,', ');\n$albumRequestVar = $modx->getOption('albumRequestVar',$scriptProperties,'galAlbum');\n$tagTpl = $modx->getOption('tagTpl',$scriptProperties,'galItemTag');\n$tagSeparator = $modx->getOption('tagSeparator',$scriptProperties,', ');\n$tagSortDir = $modx->getOption('tagSortDir',$scriptProperties,'DESC');\n$tagRequestVar = $modx->getOption('tagRequestVar',$scriptProperties,'galTag');\n\n/ get item /\n$c = $modx->newQuery('galItem');\n$c->select($modx->getSelectColumns('galItem','galItem'));\n$c->where(array(\n 'id' => $id,\n));\n$item = $modx->getObject('galItem',$c);\nif (empty($item)) return '';\n\n/ setup placeholders /\n$itemArray = $item->toArray();\n$itemArray['filename'] = basename($item->get('filename'));\n$itemArray['filesize'] = $item->get('filesize');\n$itemArray['thumbnail'] = $item->get('thumbnail',array(\n 'w' => $modx->getOption('thumbWidth',$scriptProperties,100),\n 'h' => $modx->getOption('thumbHeight',$scriptProperties,100),\n 'zc' => $modx->getOption('thumbZoomCrop',$scriptProperties,0),\n 'far' => $modx->getOption('thumbFar',$scriptProperties,'C'),\n));\n$itemArray['image'] = $item->get('thumbnail',array(\n 'w' => $modx->getOption('imageWidth',$scriptProperties,500),\n 'h' => $modx->getOption('imageHeight',$scriptProperties,500),\n 'zc' => $modx->getOption('imageZoomCrop',$scriptProperties,0),\n 'far' => $modx->getOption('imageFar',$scriptProperties,false),\n));\n\n/ get albums /\n$c = $modx->newQuery('galAlbum');\n$c->innerJoin('galAlbumItem','AlbumItems',$modx->getSelectColumns('galAlbumItem','AlbumItems','',array('album')).' = '.$modx->getSelectColumns('galAlbum','galAlbum','',array('id'))\n .' AND '.$modx->getSelectColumns('galAlbumItem','AlbumItems','',array('item')).' = '.$item->get('id'));\n$c->sortby('AlbumItems.rank','ASC');\n$albums = $modx->getCollection('galAlbum',$c);\n$itemArray['albums'] = '';\n$i = 0; $count = count($albums);\nforeach ($albums as $album) {\n $albumArray = $album->toArray();\n $albumArray['albumRequestVar'] = $albumRequestVar;\n $itemArray['albums'] .= $gallery->getChunk($albumTpl,$albumArray);\n if ($i+1 < $count) $itemArray['albums'] .= $albumSeparator;\n $i++;\n}\n\n/ get tags /\n$c = $modx->newQuery('galTag');\n$c->where(array(\n 'item' => $item->get('id'),\n));\n$c->sortby('tag',$tagSortDir);\n$tags = $modx->getCollection('galTag',$c);\n$itemArray['tags'] = '';\n$i = 0; $count = count($tags);\nforeach ($tags as $tag) {\n $tagArray = $tag->toArray();\n $tagArray['tagRequestVar'] = $tagRequestVar;\n $itemArray['tags'] .= $gallery->getChunk($tagTpl,$tagArray);\n if ($i+1 < $count) $itemArray['tags'] .= $tagSeparator;\n $i++;\n}\n\n/ if outputting to placeholders, use this, otherwise, use tpl */\nif ($toPlaceholders) {\n $modx->toPlaceholders($itemArray,$toPlaceholdersPrefix);\n return '';\n}\n\nif (empty($tpl)) return '';\n$output .= $gallery->getChunk($tpl,$itemArray);\nreturn $output;","locked":0,"properties":null,"moduleguid":""} [guid] => 7ea926b9eea8172bb341e2757ca1d6a0 [native_key] => 2 [signature] => 759ab03e7001596504187dfa8f660c68 ) ) ) [related_object_attributes] => Array ( [Children] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => category [related_objects] => 1 [related_object_attributes] => Array ( [Snippets] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name ) [Chunks] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name ) ) ) [Snippets] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name ) [Chunks] => Array ( [preserve_keys] => [update_object] => 1 [unique_key] => name ) ) [resolve] => Array ( [0] => Array ( [type] => file [body] => {"source":"gallery-1.0.0-rc1/modCategory/7c061594ee1069290be2746df277c5c0/0/","target":"return MODX_ASSETS_PATH . 'components/';","name":"gallery"} ) [1] => Array ( [type] => file [body] => {"source":"gallery-1.0.0-rc1/modCategory/7c061594ee1069290be2746df277c5c0/1/","target":"return MODX_CORE_PATH . 'components/';","name":"gallery"} ) [2] => Array ( [type] => file [body] => {"source":"gallery-1.0.0-rc1/modCategory/7c061594ee1069290be2746df277c5c0/2/","target":"return MODX_ASSETS_PATH . 'components/';","name":"phpthumb"} ) ) [validate] => [package] => modx [object] => {"id":1,"parent":0,"category":"Gallery"} )
Package found...now preparing to install.
Successfully installed package gallery-1.0.0-rc1
Error 23000 executing statement: INSERT INTO modx_categories (parent, category) VALUES ('0', 'Gallery') Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry 'Gallery' for key 2 )
Language string not found: "gallery.menu_desc"
Attempting to install package with signature: gallery-1.0.0-rc1

After that, the chunks and snippets are not installed, but the component registered as having been installed. Missing " or ; perhaps??

Also I have tried this as both an upgrade from the earlier version and a fresh install of 1.0 RC1

[IMPR] TV Output generate only PNG files

When we use the TV Output it only generate PNGs instead of showing the output in the same format than the original or letting us to choose what format to output using properties. For example, we have some JPG files wich size is 13Kb but are shown in PNG with a size of 73Kb!!!

The "problem" is in line 66: 'f' => 'png',

of

elements/tv/output/galleryitem.php

Feature-request: Mass-upload (.zip/.rar/.tar.gz??)

Some of my clients have alot of images to upload into galleries. In the long run being able to upload a ZIP-file or something like that would probably be the best option I think (as it doesn't require any explanation). Is this a possibility that could be researched for future use?

recreating /assets/components/gallery/packages/galleriffic20/example-3.html

Hi I am trying to recreate one of the examples(nr3)
But I can't seem to find the calls [[ ... ]] made to produce that example.
I think it might be a good Idea to include them in the examples.
That way I could get a good understanding of how it works as wel as recreate it and adjust to my needs:
(only the names instead of the thumbs and more of them on the left...)

Batch import fails because of datetime issue

When trying to do a batch import from a directory already on the webserver it fails because it is trying to create a folder "2010/07/" in the gallery.files_path. I guess it fails because you can't have a / in the middle of a directoryname. Date is formatted this way because webserver has dutch date/time formatting.

[Revo] Gallery doesn't work (maybe..)

Hi! When I go to the TV page of my resource the gallery TV is there, but I can't see any field to fill up. Is it normal? Or maybe there's something broken? I've also just posted another discussion about an error I get by Firebug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.