A new photo album manager : Gallery

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: A new photo album manager : Gallery

Post by nicmare »

jos, is it possible to use smarty code in the gallery templates? i tried it to wrap with {/literal}{literal} but it doesnt work :D
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new photo album manager : Gallery

Post by Jos »

You can use smarty in the template code (first texarea) but not in the css and the javascript fields
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm
Location: the Netherlands

Re: A new photo album manager : Gallery

Post by M@rtijn »

Jos,

The new release isn´t showing in the Module Manager. According to JeremyBass (http://forum.cmsmadesimple.org/index.ph ... #msg222828), you did not publish the Gallery module correctly.
Something went wrong on the cronjob that will send the new release to the MM.

Thanks for clearing things up!
Last edited by M@rtijn on Fri Aug 20, 2010 3:09 pm, edited 1 time in total.
Make your community a better place!
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new photo album manager : Gallery

Post by Jos »

No I think I can't. This happens almost every time I do a new release, and just once there was something wrong in the xml. I'm glad Jeremy mentioned another possibility you must have overread.
JeremyBASS wrote: Sometimes modules are not published correctly, the cronjob has not run yet (once a day IIRC) or they don't publish anything the MM can use... All these things can play in to it.. HTH Cheers -Jeremy
so what?
Forum Members
Forum Members
Posts: 17
Joined: Thu Nov 27, 2008 3:38 am

Re: A new photo album manager : Gallery

Post by so what? »

Hi Jos

First of all: I thank you very much for this great module. You did a fantastic job.

My question now is:
I updated V1.3.2 to V1.4 using the XML method because module manager doesn't show that V1.4 is available. Since I updated to V1.4 nothing happens when I click on "Add images" (no window opens for choosing local files) except that the screen moves to the top. Can you (or someone else) please help me solve this issue?

Thank you very much.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new photo album manager : Gallery

Post by Jos »

Strange, I don't recall changing anything in that area..

I guess it did work for you in 1.3.2?
so what?
Forum Members
Forum Members
Posts: 17
Joined: Thu Nov 27, 2008 3:38 am

Re: A new photo album manager : Gallery

Post by so what? »

Hi Jos

Yes, in 1.3.2 it did work. I uninstalled and installed V1.4 Gallery and now I get a Window for choosing local files but now I get the following error message while saving a gallery:
Updating the gallery failed. (Troubleshooting)
Even though this error message apears the change in the gallery is saved. I send you the debug messages in a PM.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new photo album manager : Gallery

Post by Jos »

the issue mentioned by So what? and another issue with the drag&drop sorting function are fixed. I released Gallery version 1.4.1 today  8)
User avatar
dizzyfish
Forum Members
Forum Members
Posts: 11
Joined: Fri Aug 13, 2010 5:29 pm

Re: A new photo album manager : Gallery

Post by dizzyfish »

Hi Jos, Thanks for getting back to my question... I think I misunderstood? I did update the gallery mod to 1.4.1, but I am still not able to resort the pics... Any ideas? Do I need to deactivate the images to resort them?

Or is there anything I am not understanding about the way to move the images in the gallery area?

Thanks!

UPDATE: I made a assumption. I had thought that by using the Module manager I could update the software Gallery correctly. I was mistaken. I realized my error and reloaded Gallery manually. It works great now... Thanks!
Last edited by dizzyfish on Mon Aug 30, 2010 10:00 pm, edited 1 time in total.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: A new photo album manager : Gallery

Post by nicmare »

just a simple question if this is possible:
i want to use gallery for my portfolio. for now each client/case/portfolio entry has got one image.
when i have 10 clients, i have 10 albums.
in the overview, where i can see all my 10 albums, i have for each a thumbnail (cover). the one which is in each album.
now i want to click on each thumbnail and want to see the big image. i know this is not possible because the images array just contains the coverthumbnail. but maybe i can make it through fanybox with iframe or something like that?

i know i could put all clients in one album but maybe later i want to set more than one image for each client. therefore i want to make it this way!

maybe i can call {gallery} twice when i put it in another gallery template and hide the album images by default? like this:
{capture assign=gallerycall}{$gallerytitle}/{$image->titlename}{/capture}
{Gallery dir=$gallerycall}
Problem: titlename != dirname but i cant access the dirname through images array :(
Last edited by nicmare on Tue Sep 07, 2010 11:04 am, edited 1 time in total.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: A new photo album manager : Gallery

Post by nicmare »

well, that was not so difficult. just had to make some test but heres the solution:
the gallery template:

Code: Select all

<span class="hiddengallery">
{foreach from=$images item=image}
  {if $image->isdir}
    <a href="{$image->file}" title="{$image->titlename}"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
  {else}
   <a class="lightbox" href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->titlename}" rel="{$gallerytitle}"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
  {/if}
{/foreach}
</span>
important: clear css and js textarea! they have to be empty.
now the interesting part, the overview gallery template:

Code: Select all

<div class="gallery overview">
{if !empty($gallerycomment)}<div class="gallerycomment">{$gallerycomment}</div>{/if}
  {capture assign=maindir}{$gallerytitle}{/capture}
<ul>
{foreach from=$images item=image}
  <li>
  {if $image->isdir}
  {capture assign=gallerycall}{$maindir}/{$image->filename}{/capture}
    {capture assign=gallerytitle}{$image->titlename}{/capture}
    {capture assign=gallerycomment}{$image->comment}{/capture}
    {Gallery dir=$gallerycall template="hiddengallery"}
    {$gallerytitle}<br/>
    {$gallerycomment}
  {else}
   <a href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->titlename}" rel="gallery"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
  {/if}
  </li>
{/foreach}
</ul>
<div class="clear"> </div>
</div>
now you can write your own css in the css textarea. it will affect the embedded gallery too!

and this is my js textarea:

Code: Select all

<__script__ type="text/javascript" src="modules/Gallery/templates/jquery/jquery.js"></__script>
<__script__ type="text/javascript" src="modules/Gallery/templates/fancybox/jquery.fancybox.pack.js"></__script>
<__script__ type="text/javascript" src="modules/Gallery/templates/jquery/jquery.mousewheel.pack.js"></__script>

<__script__ type="text/javascript">
$(document).ready(function() {
  $("a.lightbox").fancybox({
    'speedIn':    300,
    'speedOut':  300,
    'overlayColor':  '#000',
    'overlayOpacity':  0.7
  });
});
</__script>
another benefit is that you do not have to set a album cover.

to call this script use {Gallery dir='yourgallery' template="overview"}
Last edited by nicmare on Tue Sep 07, 2010 11:54 am, edited 1 time in total.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: A new photo album manager : Gallery

Post by nicmare »

can i somehow shuffle the output of the gallery thumbnails?

Code: Select all

{foreach from=$images item=image}
	<li>
	{if $image->isdir}
		<a href="{$image->file}" title="{$image->titlename}">
			{$image->titlename}
		</a>
	{else}
		<a class="group" href="{$image->file}" title="{$image->titlename}" rel="gallery">
			<img src="{$image->thumb}" alt="{$image->titlename}" />
		</a>
	{/if}
	</li>
{/foreach}
i want them to be ordered randomized.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new photo album manager : Gallery

Post by Jos »

To shuffle the $images array is not very difficult with a line of Smarty code.

Just put

Code: Select all

{capture}{$images|@shuffle}{/capture}
right before the {foreach} statement.

I used a capture around the actual shuffle function to hide the function-output '1'. Maybe there is a simpler way to do that, but this was my first thought.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: A new photo album manager : Gallery

Post by nicmare »

very amazing. i was really on the journey to find a solution for this. i am not kidding. smarty docs, forum, cmsms irc and so on. but this so ridiculous simple and perfect! thanks :D
volcanoboy

Re: A new photo album manager : Gallery

Post by volcanoboy »

Hi,

looking forward to trying out Gallery but when I install the module and call it on a page I get a page with no css and this error message: ERROR: Table 'xxx_.cms_module_gallery' doesn't exist. I read that it had something to do with permissions but both my modules and uploads folders are 777.

On this site i'm running CMSMS 1.6.8
Locked

Return to “Modules/Add-Ons”