Announcement

  •  » Engine
  •  » How get the address of current image thumbnail?

#16 2012-06-07 12:04:45

EvilKant
Member
Russia
1970-01-01
98

Re: How get the address of current image thumbnail?

I did it! I will write instructions on russian forum.

Offline

 

#17 2013-02-13 14:04:11

EvilKant
Member
Russia
1970-01-01
98

Re: How get the address of current image thumbnail?

Now I try create plugin for automatically create a button. But I can't get thumbnail link again. {$current.THUMB_SRC} not available from plugin. Can you advise something how to get current trumbnail link not from template? I think I need something from SMARTY, but I don't know where I must search it.

Offline

 

#18 2013-02-13 14:08:19

flop25
Piwigo Team
2006-07-06
7037

Re: How get the address of current image thumbnail?

Hi
you should read the How To http://piwigo.org/doc/doku.php?id=dev:changes_in_2.4
and also take a look at core/plugin files
as I don't know more that's only what I can say


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#19 2013-02-13 15:42:53

EvilKant
Member
Russia
1970-01-01
98

Re: How get the address of current image thumbnail?

flop25 wrote:

Hi
you should read the How To http://piwigo.org/doc/doku.php?id=dev:changes_in_2.4
and also take a look at core/plugin files
as I don't know more that's only what I can say

That don't help. I know what thumbnail included in {$current.THUMB_SRC}, I can use it in my theme. But in template of plugin {$current.THUMB_SRC} is empty.

Offline

 

#20 2013-02-13 15:45:30

flop25
Piwigo Team
2006-07-06
7037

Re: How get the address of current image thumbnail?

?

EvilKant wrote:

But in template of plugin {$current.THUMB_SRC} is empty.

so you need to assign youself...
I really don't understand because you don't understand the system, so let's start by explaining us what's your code etc


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#21 2013-02-13 16:09:41

EvilKant
Member
Russia
1970-01-01
98

Re: How get the address of current image thumbnail?

Code:

{combine_script id="vk_share" load='footer' path="http://vk.com/js/api/share.js" charset="windows-1251"}
{footer_script} 
  $('<div class="vkpBut"></div>').appendTo($('.imageInfoTable'));
  $('.vkpBut').html(VK.Share.button({ldelim}
    url: document.location.href,
    title: '{$vk_title}',
    description: '{$vk_desc}',
    image: '{$current.THUMB_SRC}',
    noparse: true
    }));
{/footer_script}

If I write it somewhere in piwigo\themes\Temp1\template\picture.tpl all is working and {$current.THUMB_SRC} contain link to thumbnail of current picture. But if I write it in template of plugin, {$current.THUMB_SRC} is empty.

Offline

 

#22 2013-02-13 16:15:59

flop25
Piwigo Team
2006-07-06
7037

Re: How get the address of current image thumbnail?

You don't get the way of working of Smarty : you write tpl code then you need to assign (declare how your tpl code will be replaced) and finally parse the tpl file (Smarty reads the tpl and replaces the var)
Here the {$current.THUMB_SRC} is defined ONLY for picture.tpl
So again what are you trying to do!?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#23 2013-02-13 16:24:23

EvilKant
Member
Russia
1970-01-01
98

Re: How get the address of current image thumbnail?

flop25 wrote:

So again what are you trying to do!?

Do you mean what my plugin will do? It will create vk.com "like" button with title, description and thumbnail of current picture. Like facebook "like" button.

flop25 wrote:

Here the {$current.THUMB_SRC} is defined ONLY for picture.tpl

Understand. I was hoped this time I will do without request from the database :(

Offline

 

#24 2013-02-13 19:00:24

flop25
Piwigo Team
2006-07-06
7037

Re: How get the address of current image thumbnail?

wait
you want to add code which would use the already predfined tpl var on picture.tpl? Well jsut make a prefilter and add your code See what's going on http://piwigo.org/dev/browser/extension … nc.php#L48


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Engine
  •  » How get the address of current image thumbnail?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact