Announcement

#1 2013-09-10 00:09:54

jessepunter
Member
England
2013-04-23
44

Add back image on picture.tpl page

Good evening!

I'm a little stcuk and don't know the best way to accomplish what I want to do with the picture.tpl page.

What I want to do is add an additional image below the current image (i.e. the one that was originally selected from the category page) which shows another image that is the back of the current one.

I am using the Stripped theme and cannot use the Back2Front plugin as it's not compatible. Tried to use it and get it to work but no joy.

I was wondering if I could use the Extended Description but not sure how I can get that to work as I've got my image on the left side of the page and all picture info on the right (effectively two columns) and the tags are placed within the Description fields.

I've read somewhere that you can possibly use CURL to get hold of another image and create derivitives (?) from a picture object.

So, I'm confused and now sure what and how to do this.

Anybody out there that could shed some light on this issue and guide me down the correct route?

Many thanks in advance!
Simon.


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#2 2013-09-10 10:16:18

flop25
Piwigo Team
2006-07-06
7037

Re: Add back image on picture.tpl page

Hi
The Extended Description allows you to add a picture inside the description ; then you can embed it in a <div id="double_picture">...</div> and style it with CSS


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

 

#3 2013-09-10 10:58:40

jessepunter
Member
England
2013-04-23
44

Re: Add back image on picture.tpl page

Thanks Flop25.

I don't think my initial tries were correct in that sense then as each time I've put any tags in the Image description the page just displays the tag test or something like <!More>. Do you have an example so I can check my syntax and set-up?

Thanks again, really appreciate your help!


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#4 2013-09-10 11:07:00

flop25
Piwigo Team
2006-07-06
7037

Re: Add back image on picture.tpl page

unfortunalty the Doc is in French but you can click on the (?) near the text field to have the guide of this plugin

http://fr.piwigo.org/doc/doku.php?id=plugins:ext_desc
[photo id=xx album=yy size=M html=yes link=yes]

- id : the number id of the pic
- album ( not mandatory ) the id of parent album (for navigation)
- size (not mandatory ) =  SQ, TH, XXS, XS, S, M, L, XL, XXL
- html (not mandatory) if =no, only the url will be returned
- link (not mandatory) if=yes, the image is a link its picture.php page


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

 

#5 2013-09-10 11:20:04

jessepunter
Member
England
2013-04-23
44

Re: Add back image on picture.tpl page

Many thanks Flop25, I'll take a look. Google translation is always a friend in these situations! :)


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#6 2013-09-10 11:23:02

flop25
Piwigo Team
2006-07-06
7037

Re: Add back image on picture.tpl page

flop25 wrote:

but you can click on the (?) near the text field to have the guide of this plugin

that's in your Piwigo, admin part, up right of any text field like Picture description


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

 

#7 2013-09-10 12:47:58

jessepunter
Member
England
2013-04-23
44

Re: Add back image on picture.tpl page

Thanks. I think it's only against the Description field in the edit Picture admin page.


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#8 2013-09-11 01:36:18

jessepunter
Member
England
2013-04-23
44

Re: Add back image on picture.tpl page

Okay, I'm kind of getting there now but have hit another problem!

I've managed to display a random photo on my custom homepage (Additional Page) and also displayed a static photo using:

[photo id=134 size=S html=yes link=yes]

Works perfectly on the homepage. BUT when I use exactly the same syntax in a modified picture_content.tpl file the relevant tags do not get parsed and I just get the text instead of the image:


{if ($INFO6 != 0)}
<div id="theImgInside" {if ($stripped.imageFrame)}class="img_frame"{/if}>
[photo id={$INFO6} size=S html=yes link=yes]
</div>
{/if}

This basically gives me the string "[photo id=134 size=S html=yes link=yes]" on the page so it hasn't parsed the Extended Description tags.

Will this kind of functionality not work within a tpl file or am I missing something?

Thanks in advance.


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#9 2013-09-11 10:37:12

flop25
Piwigo Team
2006-07-06
7037

Re: Add back image on picture.tpl page

indeed that does not work because.. let's try to explain the system:
Smarty receive the variables filled by Piwigo from Piwigo, then read the tpl files, then replace and render the full page
The plugin changes, in that case, only the content of variables before being transmitted by Smarty

If you want an image elsewhere on the page you need to adapt/be inspired by the plugin (the final rendering part) in order to display the picture you want according to the current main picture
Or you might try to add the Extended Descr in a new field of Add Info ... don't know if they are both compatible


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

 

#10 2013-09-11 10:46:38

jessepunter
Member
England
2013-04-23
44

Re: Add back image on picture.tpl page

Okay Flop25, thanks, that explains things nicely and why it doesn't work that way.

I like the thought that I can do it in an Add Info field but I'm sure I read somewhere that they are not compatible, but maybe that's resolved now? Anyway, I will give that approach a try and see if it works.

If not I'll look to see if I can modify the plugin to render a further image on the page.

Either way, thanks for your help, appreciate it!


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

Board footer

Powered by FluxBB

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