Password lock features

wwjd82

Joined: 2009-04-27
Posts: 7
Posted: Mon, 2009-04-27 15:45

I added the password album lock plugin.
But I realised the album doesnt show the album is lock and the thumbnail still remains
Is there a way to change the thumbnail if i enable the lock album features?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-04-27 17:54

Not automatically. You can specify your own custom thumbnail for an album if you want:
http://codex.gallery2.org/Gallery2:Modules:thumbnail
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Wed, 2009-04-29 03:37

in album.tpl add:
{if ($child.onLoadHandlers)}Has password or is hidden{else}No password not hidden{/if}
to lets say before:

              </td>
              {/foreach}

              {* flush the rest of the row with empty cells *}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wwjd82

Joined: 2009-04-27
Posts: 7
Posted: Thu, 2009-04-30 17:15

is there a way to change the thumbnail to the one i want automatically?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Fri, 2009-05-01 02:42

Edit album.tpl and change the template file of the theme you are using to use the image you want.
use the above smarty code I posted to make the change to the image.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Fri, 2009-05-01 02:45

Edit album.tpl of the theme you are using and change the template file to use the image you want.
use the above smarty code I posted to make the change to the image.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wwjd82

Joined: 2009-04-27
Posts: 7
Posted: Fri, 2009-05-01 05:32

I already put the code but how do i change the image? the code you mention is indicating that this album is lock or public. can guide me more? cause i do not know what kind of coding you use.

 
wwjd82

Joined: 2009-04-27
Posts: 7
Posted: Fri, 2009-05-01 06:41

And the code you mention changes include the photo. What i want to change is only the album.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22890
Posted: Sat, 2009-05-02 15:35
Quote:
but how do i change the image?

Edit album.tpl add the bold:

		  {if isset($theme.params.$frameType) && isset($child.thumbnail)}
		    {g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType
				  width=$child.thumbnail.width height=$child.thumbnail.height}
		      <a href="{$linkUrl}">
		      {if ($child.onLoadHandlers)}
		      <img src="http://example.com/images/hidden_image.gif">
			  {else}
			{g->image id="%ID%" item=$child image=$child.thumbnail
			 class="%CLASS% giThumbnail"}{/if}
		      </a>
		    {/g->container}
		  {elseif isset($child.thumbnail)}
		    <a href="{$linkUrl}">
		    {if ($child.onLoadHandlers)}
		      <img src="http://example.com/images/hidden_image.gif">
			  {else}
		      {g->image item=$child image=$child.thumbnail class="giThumbnail"}
		      {/if}
		    </a>
		  {else}

You will have to adjust the location of your image you want for the hidden thumbnail.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
wwjd82

Joined: 2009-04-27
Posts: 7
Posted: Mon, 2009-05-04 18:17

Thanks a lot. This is what I'm looking for. Tried to do but failed because I dun understand the coding.
Thanks again.