photo = link

chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Mon, 2009-11-09 20:00

--1--
Is it possible to assign to each photo, link to the website?
For example - user click on a photo and is redirected to other website(domain).

if yes,

--2--
how to count number of clicks on the photo - it will be different number that display count.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Tue, 2009-11-10 06:06

1. yes use the link item module.
2. don't know you will have to try 1.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Tue, 2009-11-10 16:23

Where to find "link item module"?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2009-11-10 16:45

Site Admin > Plugins > Get More Plugins (tab)

http://codex.gallery2.org/Gallery2:Modules:linkitem
http://codex.gallery2.org/Gallery2:Quick_Start_Guide#Add_and_Configure_More_Features
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Wed, 2009-11-18 13:59
nivekiam wrote:
Site Admin > Plugins > Get More Plugins (tab)

http://codex.gallery2.org/Gallery2:Modules:linkitem
http://codex.gallery2.org/Gallery2:Quick_Start_Guide#Add_and_Configure_More_Features
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Thanks, but I was thinking about sth else.
I want to have list of thumbnails and when user clicks on thumbnail it is forwarded to another page. And every thumbnail-photo is different.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-11-18 14:34

Did you try the Link Item plugin?

If you want to assign thumbnails to each link, then you can install the Thumbnail Manager plugin and assign a custom thumbnail to those as well.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Wed, 2009-11-18 15:25

nice - thank you.

one more question. how to change target to _blank?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-11-18 16:26

Edit /themes/YourTheme/templates/album.tpl

Probably best to copy that into a local directory and make your changes there as stated here:
http://codex.gallery2.org/Gallery2:Editing_Templates

I don't know what theme you're using but if it's Matrix, change the stuff in 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}">
                        {g->image id="%ID%" item=$child image=$child.thumbnail
                         class="%CLASS% giThumbnail"}
                      </a>
                    {/g->container}
                  {elseif isset($child.thumbnail)}
                    <a href="{$linkUrl}">
                      {g->image item=$child image=$child.thumbnail class="giThumbnail"}
                    </a>
                  {else}
                    <a href="{$linkUrl}" class="giMissingThumbnail">
                      {g->text text="no thumbnail"}
                    </a>
                  {/if}

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Wed, 2009-11-18 20:59

I use ICE

I found out that I should modify
themes/ice/templates/childs...

But when I add as below in bold
it opens me every thumbnail in _blank, and I want just linkitems to be opened in _blank - any ideas?

	{elseif isset($child.thumbnail)}
			{if $theme.params.childsFloatingThumbsSize != 0}
				<a href="{$linkUrl}" alt="{$title}" title="{$title}" target=_blank>
					{g->image item=$child image=$child.thumbnail class="giThumbnail" maxSize=$theme.params.childsFloatingThumbsSize}
				</a>
			{else}				
				<a href="{$linkUrl}" alt="{$title}" title="{$title}">
					{g->image item=$child image=$child.thumbnail class="giThumbnail"}
				</a>
            {/if}
		{else}
			<a href="{$linkUrl}" class="giMissingThumbnail">
				{g->text text="no thumbnail"}
			</a>
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-11-18 21:56
Quote:
it opens me every thumbnail in _blank, and I want just linkitems to be opened in _blank - any ideas?

How about this:

Change:

  <a href="{$linkUrl}" alt="{$title}" title="{$title}" target=_blank>
    {g->image item=$child image=$child.thumbnail class="giThumbnail" maxSize=$theme.params.childsFloatingThumbsSize}
  </a>

to this:

{if $child.entityType == 'GalleryLinkItem'}
  <a href="{$linkUrl}" alt="{$title}" title="{$title}" target=_blank>
    {g->image item=$child image=$child.thumbnail class="giThumbnail" maxSize=$theme.params.childsFloatingThumbsSize}
  </a>
{else}
  <a href="{$linkUrl}" alt="{$title}" title="{$title}">
    {g->image item=$child image=$child.thumbnail class="giThumbnail" maxSize=$theme.params.childsFloatingThumbsSize}
  </a>
{/if}

And this:

  <a href="{$linkUrl}" alt="{$title}" title="{$title}">
    {g->image item=$child image=$child.thumbnail class="giThumbnail"}
  </a>

to this:

{if $child.entityType == 'GalleryLinkItem'}
  <a href="{$linkUrl}" alt="{$title}" title="{$title}" targe="_blank">
    {g->image item=$child image=$child.thumbnail class="giThumbnail"}
  </a>
{else}
  <a href="{$linkUrl}" alt="{$title}" title="{$title}">
    {g->image item=$child image=$child.thumbnail class="giThumbnail"}
  </a>
{/if}

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Wed, 2009-11-18 22:41

NICE nivekiam, thanks

your solution works !!!

 
chick4you.com

Joined: 2009-11-02
Posts: 12
Posted: Thu, 2009-11-19 20:12

I got one more question.
is there any plugin which alows to add couple links at one time.

I see it like this

for each link you fill in <input> fields
it could look like 'edit captions'

1) destination URL,
2) path to thumbnail image or URL to thumnail
3) title
4) keywords
5) description
etc.

it could look like 'edit captions'

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Thu, 2009-11-19 20:35
Quote:
is there any plugin which alows to add couple links at one time.

Nothing I know of. You'd need to create one.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here