• Maxigallery overview?#

  • gfroyle Reply #1, 5 years, 6 months ago

    Reply
    Is there an overview anywhere of how Maxigallery is to be used? Not so much a blow-by-blow description of each parameter, but more of a global view...

    I have successfully installed and am experimenting with it, but it is a slow process because I am unclear as to the overall structure, and an overview would help me heaps.

    These are the sorts of fundamental questions that I have - mainly to do with the relationship between the MANAGING of galleries and the DISPLAYING of galleries..

    Firstly, is there a one-to-one relationship between galleries and MODx documents? That is, is each gallery its own MODx document containing a snippet call? Is it recommended/desirable that each gallery be its own manager or should there be ONE "manager" document for all the galleries on the site?

    Secondly, is it possible to allow the USER to decide whether they want to use "popup" or "lightbox" etc without replicating the PHOTOS multiple times .. in other words have one document for each "type" of gallery, but then have them all refer to the same collection of photos.

    Thirdly, how do I convince the gallery to "re-compute" dropshadows for existing photos that were imported when dropshadow was not used.. this came up because I was trying the options one-by-one and when I got to



    nothing changed... it took me a long time to realize that the dropshadows were only being generated on NEW photos that were inserted while using this snippet call.. (is this meant to be the case?)


    Finally, the docs for MaxiGallery say (in bright red) - you must use cached call on uncached page, but the demosite (Scotty Delicious) gives calls with [! .. !] - it seems to make no difference to my experience whether I use [! .. !] or , though setting the page itself to uncached was crucially important!

    Cheers

    gordon


  • doze Reply #2, 5 years, 6 months ago

    Reply
    Yes, there is not very much detailed information available on how it works, or how it should be used.. you can do many of the things you asked below differently and I guess there is no "right way" to do things.. as long as it works for you, your customers and your end-users, it's the right way. Here are some comments, feel free to ask more if needed:

    Quote from: gfroyle at Nov 15, 2006, 10:29 PM
    Firstly, is there a one-to-one relationship between galleries and MODx documents? That is, is each gallery its own MODx document containing a snippet call? Is it recommended/desirable that each gallery be its own manager or should there be ONE "manager" document for all the galleries on the site?
    Each picture in maxigallery is ultimately binded in to one document that has snippet call.. but with &view_gallery and &manage_gallery parameters you can have pictures from one document displayed in another document. And using ditto for example you can build centralized views to manage all your galleries.

    Quote from: gfroyle at Nov 15, 2006, 10:29 PM
    Secondly, is it possible to allow the USER to decide whether they want to use "popup" or "lightbox" etc without replicating the PHOTOS multiple times .. in other words have one document for each "type" of gallery, but then have them all refer to the same collection of photos.
    Users cannot affect to the snippet parameters. But you can do a gallery with lightbox embed type in some document, then do another document with &view_gallery parameter to view that gallery and use popup as embedtype. In your website, link to these documents respectively.

    Quote from: gfroyle at Nov 15, 2006, 10:29 PM
    Thirdly, how do I convince the gallery to "re-compute" dropshadows for existing photos that were imported when dropshadow was not used.. this came up because I was trying the options one-by-one ...[/Quote]
    You can't currently, sorry. The image handling is not that good currently as all image processing are done upon image upload. At some point, I am going to start using phpThumb for the image handling and then you will be able to change the filters at any time.

    Quote from: gfroyle at Nov 15, 2006, 10:29 PM
    Finally, the docs for MaxiGallery say (in bright red) - you must use cached call on uncached page, but the demosite (Scotty Delicious) gives calls with [! .. !] - it seems to make no difference to my experience whether I use [! .. !] or , though setting the page itself to uncached was crucially important!
    There is/was a bug in MODx that did not register the javascripts on first visit to the page if snippet was called uncached on a uncached page. That results that if using slidebox or lightbox to display images, first visitor gets the images opened just in a blank window. I'm not sure if this is fixed in 0.9.5 yet, but that's why you should use cached snippet call in a uncached page.



  • gfroyle Reply #3, 5 years, 6 months ago

    Reply
    Quote from: doze at Nov 16, 2006, 08:43 AM
    Quote from: gfroyle at Nov 15, 2006, 10:29 PM
    Secondly, is it possible to allow the USER to decide whether they want to use "popup" or "lightbox" etc without replicating the PHOTOS multiple times .. in other words have one document for each "type" of gallery, but then have them all refer to the same collection of photos.
    Users cannot affect to the snippet parameters. But you can do a gallery with lightbox embed type in some document, then do another document with &view_gallery parameter to view that gallery and use popup as embedtype. In your website, link to these documents respectively.

    Can you walk me through this option...

    Suppose I create a document with id 1 that contains



    and a second document with id 2 that contains




    Then where do I do the managing of the gallery and the UPLOAD of the pictures?

    Do I need to do this twice and insert the pictures into both galleries?


    Looking at the file structure, I can see that the pictures for document "1" appear to be stored in assets/galleries/1 and the pictures for document "2" appear to be in assets/galleries/2

    Is it possible to store the pictures in a SINGLE gallery, say document id 3, and then have document 1 say

    - display the pics from gallery 3 using "lightbox"

    and document 2 say

    - display the pics from gallery 3 using "popup"


    Thanks

    Gordon

    PS Can you explain the choice of the word "embedded" for the display type - to me "embedded" means "included inside" and so I expected embedded displays to just appear inside the existing pages. But both lightbox and popup create new areas/windows to do their photo display, which seems to me the opposite of embedded! (This is not important, but it keeps striking me as odd and suggests that the word embedded is being applied to something other than the display...)




  • sottwell Reply #4, 5 years, 6 months ago

    Reply
    That is what the &view_gallery=`xxx` option does, it uses the gallery attached to the page you specify.


  • gfroyle Reply #5, 5 years, 6 months ago

    Reply
    Quote from: sottwell at Nov 16, 2006, 11:46 PM
    That is what the &view_gallery=`xxx` option does, it uses the gallery attached to the page you specify.

    Hmm... but I don't *HAVE* a view_gallery option...

    Are you referring to 0.4.1 or 0.5 beta? (I am using 0.4.1)



  • doze Reply #6, 5 years, 6 months ago

    Reply
    I think &view_gallery is added in 0.5 beta yes.. And it would go like:

    document with id 1 contains



    document with id 2 contains



    And then when you upload pictures to the gallery that is in document id 1, they will appear in the gallery in document id 2 too.

    Quote from: gfroyle at Nov 16, 2006, 05:54 PM
    PS Can you explain the choice of the word "embedded" for the display type - to me "embedded" means "included inside" and so I expected embedded displays to just appear inside the existing pages. But both lightbox and popup create new areas/windows to do their photo display, which seems to me the opposite of embedded! (This is not important, but it keeps striking me as odd and suggests that the word embedded is being applied to something other than the display...)
    Embedded display type in this situation means that the gallery is embedded to just on that "overview" and all images are popuped when viewed, either using normal window popup, slidebox or lightbox. If not using embedded display type, when you click on a image in the gallery, it moves on another "view" that displays the image. Maybe better wording could have been used, you can suggest something if you want. Currently I'm thinking to do a shildeshow display mode too and I'm wondering how to parametrize it.. I'm thinking &display=`embedded` &embedtype=`slideshow` and then there will be extra parameter that is it a timed slideshow or not.. that view mode will then be "truly" embedded I think..


  • hardmarque Reply #7, 8 months, 3 weeks ago

    Reply
    I want to do something similar.
    I am a noob client of a web designer.
    I want to write {{popup}} more than once throughout my page and have it popup individually chosen images only.
    A the moment it inserts all the images chosen for every {{popup}} written in CSS.
    Can it be done MODx Evo?
    My web designer says no, and I think that really sucks.

    Here is some information that might be useful:

    assets/snippets/maxigallery/templates/picturetpl.html
    [+maxigallery.config.display:is=`pictureview`:then=`
    	[+maxigallery.managebutton:isnot=``:then=`
    
    		<center>[+maxigallery.managebutton+]</center>
    		<br />
    	
    	`+]
    `+]
    
    <div class="picturecontainer">
    
    	<p class="navigation">
    		[+maxigallery.counter:is=`1`:or:is=`0`:then=`
    
    			[+maxigallery.strings.previous+] |
    
    		`:else=`
    
    			<a href="[+maxigallery.previous_pic_url+]" alt="[+maxigallery.index_url+]">[+maxigallery.strings.previous+]</a> | 
    
    		`+]
    
    			<a href="[+maxigallery.index_url+]" alt="[+maxigallery.index_url+]">[+maxigallery.strings.index+]</a> | 		
    
    		[+maxigallery.counter:is=`[+maxigallery.total_pics_count+]`:then=`
    
    			[+maxigallery.strings.next+]
    
    		`:else=`
    
    			<a href="[+maxigallery.next_pic_url+]">[+maxigallery.strings.next+]</a>
    
    		`+]
    	</p>
    
    	<p class="picturecount">[+maxigallery.strings.picture+] [+maxigallery.counter+] / [+maxigallery.total_pics_count+]</p>
    
    	[+maxigallery.total_pics_count:isnot=`0`:then=`
    	
    	<div class="picture">
    	
    	[+maxigallery.big_img_linkstyle:is=`slidebox`:then=` 
    
    		<a href="[(base_url)][+maxigallery.path_to_gal+]big_[+maxigallery.picture.filename+]" rel="lightbox" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
    
    	`+]
    
    	[+maxigallery.big_img_linkstyle:is=`lightboxv2`:then=` 
    
    		<a href="[(base_url)][+maxigallery.path_to_gal+]big_[+maxigallery.picture.filename+]" rel="lightbox" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
    
    	`+]
    
    	[+maxigallery.big_img_linkstyle:is=`slimbox`:then=` 
    
    		<a href="[(base_url)][+maxigallery.path_to_gal+]big_[+maxigallery.picture.filename+]" rel="lightbox" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">
    
    	`+]
    
    	[+maxigallery.big_img_linkstyle:is=`popup`:then=` 
    
    		<a href="javascript:void(0);" onClick="javascript:openWindow('[(base_url)][+maxigallery.path_to_gal+]big_[+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]',[+maxigallery.picture_height_big+],[+maxigallery.picture_width_big+],'gallery');" title="[+maxigallery.strings.click_to_open_original+]">
    
    	`+]
    
    	[+maxigallery.big_img_linkstyle:is=`external`:then=` 
    
    		<a href="[(base_url)][+maxigallery.path_to_gal+]big_[+maxigallery.picture.filename+]" rel="external" title="[+maxigallery.strings.click_to_open_original+]">
    
    	`+]
    
    	[+maxigallery.keep_bigimg:is=`0`:then=`
    
    		<a href="[+maxigallery.index_url+]" title="[+maxigallery.strings.click_to_go_back+]">
    
    	`+]
    
    		<img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="imageview" alt="[+maxigallery.strings.date+] : [+maxigallery.picture.date+]" />
    
    		</a>
    		
    	</div>
    	
    	`+]
    	
    	[+maxigallery.picture.title:isnot=``:then=`
    		<p class="title">[+maxigallery.picture.title:htmlent+]</p>
    	`+]
    	[+maxigallery.picture.descr:isnot=``:then=`
    		<p class="description">[+maxigallery.picture.descr:htmlent+]</p>
    	`+]
    	
    </div>


    assets/snippets/maxigallery/templates/managepicturetpl.html
    <div class="managepicturecontainer">
    	<input type="hidden" name="[+maxigallery.fieldnames.pictureid+]" value="[+maxigallery.picture.id+]"/>
    	<input type="hidden" name="[+maxigallery.fieldnames.modified+]" id="[+maxigallery.fieldnames.modified+]" value="no"/>
    	<div class="managepicture">
    		<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" target=_new>
    			<img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" alt="[+maxigallery.strings.click_to_zoom+]"/>
    		</a>
    	</div>
    	<div class="shortfields">
    		ID: [+maxigallery.picture.id+]
    		<br />
    		[+maxigallery.strings.delete+]:
    		<input type="checkbox" name="[+maxigallery.fieldnames.delete+]" value="yes" title="[+maxigallery.strings.check_to_delete_this_picture+]"/>
    		<br />
    		[+maxigallery.strings.hide+]:
    		<input type="checkbox" name="[+maxigallery.fieldnames.hide+]" value="yes" title="[+maxigallery.strings.check_to_hide_this_picture+]" onClick="document.editform.[+maxigallery.fieldnames.modified+].value='yes'" [+maxigallery.picture.hide:is=`1`:then=`checked="checked"`+]/>
    		<br />
    		[+maxigallery.strings.position+]:
    		<input type="text" size="3" name="[+maxigallery.fieldnames.position+]" id="[+maxigallery.fieldnames.position+]" onKeyDown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'" value="[+maxigallery.picture.pos+]"/>
    	</div>
    	<br class="clearboth"/>
    	[+maxigallery.strings.title+]:
    	<br/>
    	<textarea name="[+maxigallery.fieldnames.title+]" rows="2" cols="40" onKeyDown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'">[+maxigallery.picture.title:htmlent+]</textarea>
    	<br />
    	[+maxigallery.strings.description+]:
    	<br/>
    	<textarea name="[+maxigallery.fieldnames.description+]" rows="4" cols="40" onKeyDown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'">[+maxigallery.picture.descr:htmlent+]</textarea>
    	<br />
    	<hr />
    </div>


    please let me know if you need to see some of the other files in there
    childgallerytpl.html
    clearertpl.html
    draggabletpl.html
    galleryoutertpl.html
    gallerypicturetpl.html
    managebuttontpl.html
    manageoutertpl.html
    managepicturetpl.html see above
    manageuploadtpl.html
    picturetpl.html see above


    thanks in advance