A new gallery manager : Album

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: A new gallery manager : Album

Post by Dr.CSS »

I believe if you look in Album Help it tell you how to limit # of albums in tag...
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: A new gallery manager : Album

Post by requish »

I Read help several times and I did not find on this subject anything. Yet some hint?

PS. I dont want use 'Table' tpl, but 'greybox' tpl.
Last edited by requish on Mon Feb 16, 2009 3:05 pm, edited 1 time in total.
CMS Made Simple! Best CMS! :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: A new gallery manager : Album

Post by Dr.CSS »

If you look most of the templates have an {if} for pagination at the top you may move this to the bottom then when calling the album tag limit the number of albums with number="5" or however many you want...

The number= is in the help...
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: A new gallery manager : Album

Post by requish »

mark wrote: If you look most of the templates have an {if} for pagination at the top you may move this to the bottom then when calling the album tag limit the number of albums with number="5" or however many you want...

The number= is in the help...
Sorry, but its doesnt work..
This is my code for album:
(Please tell me, where I should change my code?)

Code: Select all

{* Include JS files. You can move this to the head of your page template if you want *}
<!--Greybox-->
<__script__ type="text/javascript">
    var GB_ROOT_DIR = "modules/Album/templates/db/greybox/";
</__script>

<__script__ type="text/javascript" src="modules/Album/templates/db/greybox/AJS.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/greybox/AJS_fx.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/greybox/gb_scripts.js"></__script>


{if $pictureid !=0}

{* Big Picture *}
<div style="text-align:center">
<p class="bigpicturecaption"><strong>{$picture->name}</strong><br />
{$picture->comment}<br />
<span class="bigpicturenav">
{if $link.picture.previous}<a href="{$link.picture.previous}" title="następne zdjęcie">< poprzednie</a>{/if}
 <span class= "albumpicturecount">( Picture {$picturenumber}/{$picturecount} )</span> 
{if $link.picture.next}<a href="{$link.picture.next}" title="poprzednie zdjęcie">następne ></a></span>{/if}
</p>
<img src="{$picture->picture}" alt="{$picture->name|escape:'html'} - {$picture->comment|escape:'html'}"  title="{$picture->name|escape:'html'}  - {$picture->comment|escape:'html'}" />
</div>
{/if}

{* Album List *}
{if !$album}
	{foreach from=$albums item=album}
<div class="oferta_box" id="album{$album->id|escape:'html'}"><div class="oferta_title_box">
<a href="{$album->link}">{$album->name} ({$album->picturecount} foto)</a>
</div><div class="oferta_info_box">
<span>{$album->comment}</span><br />
<a href="{$album->link}">
<img src="{$album->thumbnail}" alt="{$album->name|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}"{$album->autothumbnailsize} /></a>
</div><div class="oferta_end_box"></div></div>
	{/foreach}


{else}

{* Photo List *}
<p><span class="noprint">{if $returnlink}<a href="{$returnlink}#album{$album->id|escape:'html'}">«««</a>{/if}</span></p>
{if $pagecount>1}

	<p class="albumnav">
		<a href="{$link.page.first}" title="pierwsza strona"><< </a>
		{if $link.page.previous}<a href="{$link.page.previous}" title="poprzednia strona">< </a>{/if}
		page {$pagenumber}/{$pagecount}
		{if $link.page.next}<a href="{$link.page.next}" title="następna strona"> ></a>{/if}
		<a href="{$link.page.last}" title="ostatnia strona"> >></a>
	</p>
	{/if}

	{foreach from=$pictures item=picturesrow}
	    {foreach from=$picturesrow item=onepicture}
<div class="oferta_box"><div class="oferta_title_box">
<span class="opis_a">{$onepicture->name}</span>
</div><div class="oferta_info_box"><span>
{$onepicture->comment}<br/><br/></span>

<a href="{$onepicture->picture}" rel="gb_imageset[{$album->name|escape:'html'}]" title="{$onepicture->name|escape:'html'} {if ($onepicture->comment != "")}- {$onepicture->comment|escape:'html'}{/if}"> <img src="{$onepicture->thumbnail}" alt="{$onepicture->name|escape:'html'} {if ($onepicture->comment != "")}- {$onepicture->comment|escape:'html'}{/if}" title="{$onepicture->name|escape:'html'} {if ($onepicture->comment != "")}- {$onepicture->comment|escape:'html'}{/if}"{$onepicture->autothumbnailsize} /></a>


</div><div class="oferta_end_box"></div></div>

      {if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
	    {/foreach}
	{/foreach}
<div style="clear:both"></div>
<p><span class="noprint">{if $returnlink}<a href="{$returnlink}#album{$album->id|escape:'html'}">«««</a>{/if}</span></p>

{if $pagecount>1}
	<p class="albumnav">
		<a href="{$link.page.first}" title="pierwsza strona"><< </a>
		{if $link.page.previous}<a href="{$link.page.previous}" title="poprzednia strona">< </a>{/if}
		page {$pagenumber}/{$pagecount}
		{if $link.page.next}<a href="{$link.page.next}" title="następna strona"> ></a>{/if}
		<a href="{$link.page.last}" title="ostatnia strona"> >></a>
	</p>
	{/if}


{if $picturecount==0}No image{/if}
{/if}

{if $picture->id>0}
{/if}
<div style="clear:both"></div>
CMS Made Simple! Best CMS! :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: A new gallery manager : Album

Post by Dr.CSS »

The number="5" part is used in the Album tag {cms_module module='album' number="5"}...

The pagination part is in the template...

{if $pagecount>1}


<< 
{if $link.page.previous}< {/if}
page {$pagenumber}/{$pagecount}
{if $link.page.next} >{/if}
 >>

{/if}

This part only works if this is the template used as the default albumlist template, set in album in options...
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: A new gallery manager : Album

Post by requish »

;D i love U man, thanks a lot! its working :))
CMS Made Simple! Best CMS! :)
sam_m
Forum Members
Forum Members
Posts: 34
Joined: Thu Jun 11, 2009 11:59 pm

Re: A new gallery manager : Album

Post by sam_m »

Hello, going to try replying on this thread,

has anyone managed to change the order of the images shown in the admin section of Album? at the moment every new photo is shown at the bottom of the album but im trying to get every new photo added to show at the top, is this possible? I know it can be changed on the front end, but it would be great if this could work on the back end

Any help would be much appreciated
Thanks
Sam
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: A new gallery manager : Album

Post by Russ »

sam_m, in the help for the Album module, did you see?
Parameters
......
   * (optional) sortdesc="true" - Sort albums in descending order rather than ascending.
   * (optional) sortpicturesdesc="false" - Sort pictures in descending order rather than ascending. This will make new pictures that are added to an album to be listed first.

     Example to show pictures in reverse order:

     {cms_module module='album' sortpicturesdesc='true'}
......
Sorry, just saw the backend bit... do you mean sort the Album listing (in Admin) so the latest Album is at the top of the list, or do you mean individual pictures in an admin albumview , so the newest pictures are at the top? Either way it is going to mean changing code in the classes for the Album module I think.  Let me know, I may have need for this myself and if I get time will have a look.
Last edited by Russ on Mon Nov 30, 2009 9:22 am, edited 1 time in total.
sam_m
Forum Members
Forum Members
Posts: 34
Joined: Thu Jun 11, 2009 11:59 pm

Re: A new gallery manager : Album

Post by sam_m »

Russ wrote: sam_m, in the help for the Album module, did you see?
Parameters
......
   * (optional) sortdesc="true" - Sort albums in descending order rather than ascending.
   * (optional) sortpicturesdesc="false" - Sort pictures in descending order rather than ascending. This will make new pictures that are added to an album to be listed first.

     Example to show pictures in reverse order:

     {cms_module module='album' sortpicturesdesc='true'}
......
Sorry, just saw the backend bit... do you mean sort the Album listing (in Admin) so the latest Album is at the top of the list, or do you mean individual pictures in an admin albumview , so the newest pictures are at the top? Either way it is going to mean changing code in the classes for the Album module I think.  Let me know, I may have need for this myself and if I get time will have a look.
Hi Russ, thanks for the reply,

Yes its the indiviual pictures in the admin albumview which I was hoping to get the newest at the top, suprises me no ones really wanted this before too be honest,

Regards
Sam
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: A new gallery manager : Album

Post by Russ »

Mmm, I had a quick look Sam, not so easy to do. The display of pictures in Album admin, such as it is, allows for them to be re-ordered ( the blue arrows ). Any setting for sorting prior to that will upset this order - which is the point of it. True, the re-ordering could be a bit better, but it is there for a reason.

So lets approach this from another angle. Why do you need to have the newest image at the top? Most people create an Album and then display it. When they need some more images, they create a new album or less likely, add to the same one. Maybe there is another way around this?

(There is no date created on pictures, so it will have to be the sequence number (picture_id). The sort order for pictures is in picture_number.)
sam_m
Forum Members
Forum Members
Posts: 34
Joined: Thu Jun 11, 2009 11:59 pm

Re: A new gallery manager : Album

Post by sam_m »

Hi Russ,

You are correct really, there probably is no need to have the individual images at the top when thinking about it, as the sortpicturedesc function does what its suposed to do where its needed.

I guess the only real improvement would be on the sorting pictures order, drag and place would be nice like Zen Photo, but cmsms is constantly  growing and improving so who knows whats around the corner in terms of new modules

Kind Regards
Sam
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: A new gallery manager : Album

Post by Jos »

sam_m wrote: I guess the only real improvement would be on the sorting pictures order, drag and place would be nice like Zen Photo, but cmsms is constantly  growing and improving so who knows whats around the corner in terms of new modules
You may want to check the new Gallery module for this  ;)
http://dev.cmsmadesimple.org/projects/gallery
sam_m
Forum Members
Forum Members
Posts: 34
Joined: Thu Jun 11, 2009 11:59 pm

Re: A new gallery manager : Album

Post by sam_m »

Jos wrote:
sam_m wrote: I guess the only real improvement would be on the sorting pictures order, drag and place would be nice like Zen Photo, but cmsms is constantly  growing and improving so who knows whats around the corner in terms of new modules
You may want to check the new Gallery module for this  ;)
http://dev.cmsmadesimple.org/projects/gallery
Jos, How that slipped past me I have no idea, looks... perfect!!! :)
Post Reply

Return to “Modules/Add-Ons”