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.
Offline
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
Offline
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!
Offline
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
Offline
Many thanks Flop25, I'll take a look. Google translation is always a friend in these situations! :)
Offline
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
Offline
Thanks. I think it's only against the Description field in the edit Picture admin page.
Offline
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.
Offline
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
Offline
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!
Offline