Dec 04, 2008, 01:04 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1] 2 3 ... 22   Go Down
  Print  
Author Topic: [Snippet] MaxiGallery - an advanced gallery snippet  (Read 96936 times)
0 Members and 1 Guest are viewing this topic.
doze
Moderator
*
Posts: 3,237


....Boom!


« on: Apr 06, 2006, 05:25 PM »

Looking to download this? Get the resources from MODx resource repository!

Hi,

So I've been doing this more advanced gallery snippet for a while and thought, that it's ready for the public viewing now. It is still pretty much work in progress, but very usable in the current state too. I started to work on this snipped based on EtoGal and many thanks goes to it's authors Frank Siegert (hugelmopf) + Mike Finley (mikef) for their hard work. MaxiGallery is evolved from it's origin alot and have tons of great new features. Main features being:

  • Included language files: English, Finnish, Deutch, Spanish, France, Italian, Dutch. Easy to make more, every output string extenalized to a language file.
  • Possible to allow webusers/usergroups to manage their own or shared galleries
  • Slidebox and Lightbox v2.0 enabled browsing and of embedded galleries (also option for popup and new window)
  • Automatic watermarking of images (text or transparent PNG)
  • Automatic imagemasking, you can use your own made grayscale masks
  • Automatic dropshadow generation to images
  • Possible to manage pictures on a separate document or call management of one gallery on another doc
  • Possible to set a max pictures limit in a gallery
  • Possible to keep original (or just bigger) images and link to them from browsing mode
  • Possible to set quality percentage of each picture size
  • Possible to paginate gallery overviews to multiple pages
  • Support jpg/jpeg, png and gif images (gif's are converted to png). Also in zip-archives if ZZIPlib is installed.
  • And lots of other smaller additions and enhancements to the code what's left from etogal

Also by using the MaxiGallerySolo snippet (attatched below) you can achieve the following:

  • Get latest or random pictures from selected galleries
  • Possible to limit how many pictures are retrieved
  • Possible actions to do when user clicks the images:
    • Open in lightbox (which has all pictures from selected galleries on the pictureset)
    • Open the image in the normal gallery image browser
    • Open the gallery overview which that image belongs to

There is some demos here (if the site is not offline). You can see the snippet calls at the bottom of the pages, what were used to create these galleries. I'm using this as a test site for myself, so if there is something weird going on when you visit there, I'm probably just testing something.  Grin

ScottyDelicious has also put up a great demosite for MaxiGallery.
There is 4 sections at the site, you can see the snippet calls at the gallery pages:
  • Default - basically nothing more than [!MaxiGallery!]
  • DropShadow -  uses drop shadow on the images and thumbs.
  • LightBox2 - uses the LightBox2 embedding feature.
  • Popup/Watermark - js popup window reveals full size image with sD watermark

To get this snippet fully working, you have to use the latest MODx release.

Installation is pretty straight forward:
  • 1. Extract the contents of the zip file to your computer
  • 2. FTP to your server an go to the modx installation folder
  • 3. Copy all exept maxigallery.txt to assets/snippets/maxigallery/ -folder
  • 4. Create a new folder assets/galleries/ and make it writable (CHMOD 0666 or 0777)
  • 5. Close your FTP program and go to the MODx manager
  • 6. Create a new snippet called "MaxiGallery" and paste the contents of maxigallery.txt to it
  • 7. Call the snippet on some document, check the available parameters at the start of the snippet
    • There are some example snippet calls at the demo site
    • You have to call the snippet on an uncached page using "cached" snippet call i.e [[MaxiGallery]], because the automated javascript/css registration in MODx requires this for now. If you don't call it this way, sometimes when you view the lightbox enabled galleries, the pictures may just open in a new window instead of the lightbox.
  • 8. Go to the page that has the snippet call and you should see "Manage pictures" -button in there (if you did not set it off in the snippet call ofcourse  Wink)
    • note that you must be logged into the manager and have rights to edit the document (unless you have defined webusers/groups who can manage the callery and you are logged in at front-end)
  • 9. Upload some pics to the gallery and see the results.

Extra info:
  • You can create new language files for the gallery too. Create lang_en.php in the maxigallery folder and slidebox_lang_en.js in the slidebox folder, where "en" is the key for your lang file. After this, use it in the $language setting at the snippet.
  • You can change the look of the lightbox by editing the maxigallery/slidebox/style.css -file. You can also change the overlay color of it and the loading images by creating new ones and defining them in your slidebox_lang_xx.js -file

IMPORTANT NOTE: It depends on your server settings that how many pictures you can upload at a time and how big. The image masking process for example is very slow and you might get a "Maximum execution time of NN seconds exceeded" -error message, if you are trying to upload many images at the same time with imagemasking on.. or if the pictures are large. Also when using big images, you may get "Memory Size Exhausted" -error as the image processing takes alot of memory too. These errors are not errors in the snippet code, they are caused by server settings. MaxiGallery script tries to use ini_set to increase the execution time and memory limit if needed, but it cannot do it if php is running in safe mode. (I have my setup on a safe_mode enabled server with 15seconds of execution time and 30sec max_input_time and 32Mb memory limit. It can handle 10 images at a time taken with 4MP camera, but with image masking on I can kill it pretty easily)

Wanna use picture commenting in MaxiGallery?

It's very easy to implement with the awesome Replix snippet (look for demo here). Here's the steps to get it done:

  • 1. Create/Modify Replix form template and remove the action from the form tag
  • 2. Create a snippet called "GetPictureID" and use this at the snippet code:
    • return $_GET['pic'];
  • 3. Create new chunk called "GalleryReplix" and add this to the chunk:
    • [!Replix? &tagid=[[GetPictureID]] &tplForm=`name_of_replix_form_chunk`!]
  • 4. Create a document what is used to show gallery pictures.
  • 5. Add the MaxiGallery and chunk calls to the target document:
    • [[MaxiGallery? &is_target=`1`]] {{GalleryReplix}}
  • 6. Create a Gallery what uses the document above for target to display the pics:
    • [[MaxiGallery? &picture_target=`insert_target_document_id_here`]]
  • 7. View results (add some pics to the gallery first Smiley)

PS. This will be a bit easier and even more flexible when the templating of MaxiGallery is done.. (and that should be soon).

Looking to download this? Get the resources from MODx resource repository!
« Last Edit: Jun 29, 2006, 02:32 PM by doze » Logged

MODxWiki || Please, list wiki worthy material here!
rthrash
Foundation
*
Posts: 9,575



WWW
« Reply #1 on: Apr 06, 2006, 09:38 PM »

Dang ... that is just plain awesome. You trying to give G2 a run for its money? Smiley

 
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Mark
Coding Team
*
Posts: 3,247


Ditto Developer


WWW
« Reply #2 on: Apr 06, 2006, 09:45 PM »

That is AWESOME!!!!!!! GREAT WORK!!!!!!!!

Only 1 suggestion, you might want to look into lightbox 2 as it has photoset support (multiple photos w prev next buttons w/o loading a new box...)
Logged

nissai
Full Member
***
Posts: 159


WWW
« Reply #3 on: Apr 07, 2006, 01:24 AM »

Only 1 suggestion, you might want to look into lightbox 2 as it has photoset support (multiple photos w prev next buttons w/o loading a new box...)

Look the demo. He got it with ajax and lightbox.

That is AWESOME!!!!!!! GREAT WORK!!!!!!!!
Logged
zi
MODx Special Forces /
Administrator
*
Posts: 3,014


May Peace Be On You


WWW
« Reply #4 on: Apr 07, 2006, 02:23 AM »

I dont have another words... LOL Cheesy

Its AWESOME!!!! GREAT WORK!!!!

Grin

Thanks for sharing

regards,

zi
Logged

“Internet Explorer’s CSS rendering: WYSIWTF”. — someone genius
--------------------------------------------------
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #5 on: Apr 07, 2006, 02:52 AM »

Woaw it's plain awesome, I just love the lightbox effects and overall feel of the gallery !

Now I am off to read the code see what kind of parameters there are for this snippet Smiley
Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
doze
Moderator
*
Posts: 3,237


....Boom!


« Reply #6 on: Apr 07, 2006, 04:20 AM »

Only 1 suggestion, you might want to look into lightbox 2 as it has photoset support (multiple photos w prev next buttons w/o loading a new box...)
Hi, the lightbox/slidebox combination I have does support multiple photosets. If you use embedded display type and set embedtype to lightbox, you will get that. Upload your pics and click the "Save changes" and you should see it when viewing the gallery. I didn't quite like the lightbox v2 my self, but I'll add it as an option too. Also just remembered that I didn't finish the FURL changes what I allredy started, gotta do that too.. expect an update soon!

Thanks for the comments all!  Grin

I have done some bug testing at the same time I built this, but there maybe some hidden ones still there.. so I'd appreciate that you inform me about them if you find any!  Wink

EDIT: And feature suggestions are welcome also!
« Last Edit: Apr 07, 2006, 04:24 AM by doze » Logged

MODxWiki || Please, list wiki worthy material here!
ricardosanX
Documentation Team
*
Posts: 109


WWW
« Reply #7 on: Apr 07, 2006, 07:02 AM »

Magnificent!  Smiley

Must install and play with it now!

Richard
Logged

kylej
Coding Team
*
Posts: 738



WWW
« Reply #8 on: Apr 07, 2006, 08:24 AM »

This is very impressive,  I will definatly have to give this a go on my site.
Logged

Djamoer
Testers
*
Posts: 1,492

No one can limit a man other than the man himself.


WWW
« Reply #9 on: Apr 07, 2006, 10:30 AM »

It's a very cool addon to MODx.

The installation seems to be quite intuitive for me. The snippet parameter can be a real tragedy for newbie, but you know what? Having a great flexibility and configuration at hands is a lot better, rather than missing those features. The best way will be to provide sample snippet calling to get this snippet up and running. Wink

Another thing, check out my chunktpl library.
http://svn.djamoer.net/?do=browse&project=MODx&path=/trunk/libs/chunktpl/

It's a simple library to do templating with chunk or plain text tpl file that you can shipped it together with your snippet distribution as a theme.
Hope it will help your development process a lot faster to bring this snippet into a stable state.

Keep up the good work. I wouldn't mind seeing this as one of our official resources, when it's stable. Wink
Logged

Djamoer
Testers
*
Posts: 1,492

No one can limit a man other than the man himself.


WWW
« Reply #10 on: Apr 07, 2006, 10:37 AM »

I do really think that this snippet will be very useful and have the potential to serve as our default photo album solution.
So I'm noticing that you're not generating the correct address when browsing through the snippet.

Use this API
$modx->makeUrl(doc_id, '', query_string);
It will generate the index.php?id=blabla or alias.htm and etc by itself, depending on how you setup your MODx installation. It's a good way to make the address conistent accross the pages/albums.

Take care
Logged

banzai
Testers
*
Posts: 857


MODx Italia


WWW
« Reply #11 on: Apr 07, 2006, 12:52 PM »

wooooow!!! great work!

Dropshadow and imagemask are very nice features Wink
Logged

MODx Websites Showcase 
Add your site to www.modx.it!
-----------------------------------------------------
FREE MODx Templates
www.tattoocms.it
-----------------------------------------------------
VIDEO: whats new in MODx 0.9.5   | VIDEO: MODx PHP Application Framework  |  bubuna.com - Web & Multimedia Design
PeterH
Jr. Member
*
Posts: 24



WWW
« Reply #12 on: Apr 07, 2006, 12:56 PM »

Hello,

i attached a german Language-File

regards,
Peter

* maxigallery_lang_de.txt (2.39 KB - downloaded 547 times.)
« Last Edit: Apr 07, 2006, 01:28 PM by PeterH » Logged

Grafik & Grossformatdruck: www.druck-schmie.de
Bildergalerie: www.bilder-schmie.de
doze
Moderator
*
Posts: 3,237


....Boom!


« Reply #13 on: Apr 07, 2006, 04:47 PM »

So I'm noticing that you're not generating the correct address when browsing through the snippet.

Use this API
$modx->makeUrl(doc_id, '', query_string);
It will generate the index.php?id=blabla or alias.htm and etc by itself, depending on how you setup your MODx installation. It's a good way to make the address conistent accross the pages/albums.

I'm glad you liked the snippet! Yes, makeUrl will be used in the next release..

MODx encountered the following error while attempting to parse the requested resource: modx.modx_maxigallery' doesn't exist
You have to create the database table your self with phpmyadmin or something, if the database user you have in modx is not allowed to create tables.
I had this same error after installing MaxiGallery. My database user has ALL PRIVILEGES, so that cannot be the reason for the error. I created the table manually, and it works fine now, but I thought you should be aware that database user priviliges is not the cause of the error (at least not the only cause).

Good work! I'm looking forward to playing with the config options to see what it can do.
I'm sorry, just tried it my self and I get the error too, I have made some bug in there after I tested it, it was working before, I swear! Smiley

So sorry for all the troubles, you have to create the table your self now.. It will be fixed in the next release. Thanks for the patience/input!

EDIT: I have attached a quick new version to my first post what should fix the database creation and I have also put the snippet calls visible on the demosite, so you can get some examples of the parameters there.

EDIT2: And btw, I included the deutch lang files also, thanks Peter!
« Last Edit: Apr 07, 2006, 06:03 PM by doze » Logged

MODxWiki || Please, list wiki worthy material here!
ddecjc
Member
**
Posts: 61



« Reply #14 on: Apr 07, 2006, 07:49 PM »

I'm sorry, just tried it my self and I get the error too, I have made some bug in there after I tested it, it was working before, I swear! Smiley

So sorry for all the troubles, you have to create the table your self now.. It will be fixed in the next release. Thanks for the patience/input!

No need to apologize... Keep up the good work!

I haven't had a chance to explore all the options yet, but I can already think of one feature that would be awesome either as an option with this snippet or as a separate snippet--a "latest additions" feature where you could define the galleries you wanted it to pull from and how many images to show. Same thing could be done with "random images." That would be truly awesome!
Logged

Dave
Pages: [1] 2 3 ... 22   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!