Pages: 1
i want encourage visitors register my site in this way.
because many people google a word for a picture , they found my site , got a copy and be off , but never return .
so i want make a guest could only view thumbnail , when click a thumbnail they were noticed to login or register.
how to do ? Or extensions can do this?
i know some php , if no easy way , a code hack could be fine .
Offline
http://piwigo.org/forum/viewtopic.php?id=14873
i found this and do as plg told , and remove the hight , but nothing happened
Offline
oh a pic have 3 views type , i know now
but pics in 'pwg_high' folder(the same as the source pics) smaller than the out of one. why ?
Offline
Sinux wrote:
oh a pic have 3 views type , i know now
but pics in 'pwg_high' folder(the same as the source pics) smaller than the out of one. why ?
pwg_high folder must host the hight def pictures or there would be no reason to do it
Offline
A simple way is making a template-extension to replace the default picture_content.tpl
Please, make a search to find how to use template-extensions or ask in another topic if you don't know.
Instead of coding:
<img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
You can replace width:{$WIDTH_IMG}px by something like:
width:{if is_a_guest()}{math equation="floor(x/3)" x=$WIDTH_IMG}{else}{$WIDTH_IMG}{/if}px
(divide the size by 3 or more, and follow this solution for the height too).
I didn't try it but I am sure you could be satisfied with it.
Enjoy!
Note: avoid adding space or newline in the above code (may have a direct impact on the result).
Source: http://smarty.net/manual/en/language.function.math.php
(Please read technical notes)
is_a_guest() is a Piwigo-function always available at this stage.
Offline
(⊙o⊙)
thank you!!
Offline
Pages: 1