Forums / Cotonti / Extensions / Gallery of URLkiller

12>>>

pieter
#1 2011-03-18 17:30

Hey URLkiller,

Are you planning to convert your great gallery to Siena?
I use your gallery on Genoa and I can't upgrade without your gallery.

I love it, and don't want to loose it.

Pieter

... can we help you ...
Kort
#2 2011-03-19 06:22

Absolutely useless already in Genoa. Why don't you convert the table and embed it into the page structure? This Seditio-style outdated, unsupported and poorly coded plug is good for nothing now that we got file extrafields and future flexibility for image crop/resize in Siena.

SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#3 2011-03-19 06:25

I want to Kort, but I'm not that good to do this without help.

Do you have a start for me?
How do I start? I have over 1500pictures.

... can we help you ...
Kort
#4 2011-03-19 06:42

I believe, you're familiar with the page-based gallery creation technique. We have discarded all our galleries in favor of this simple way to organize an image showcase. This requires Pageavatar plugin and a jQuery gallery plugin of your choice (we use fancybox). Galleries are basically lists while images are pages. Pageavatar 2.20 covers most requirements for image cropping/resize (except creating solid-color backgrounds) and enables you to create as many various "thumbnails" as you like. This way you can build both "real small" thumbs and resize the original pics to the desired size. As we have started our first Siena project a few days ago, Pageavatar for Siena can be expected real soon.

I'd start with analyzing the structure of the plugin SQL-table and the way Pageavatar works to workout possible ways of transition. Resizing / renaming 1500 or 15000 pics is a simple matter, you know :)

SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#5 2011-03-19 07:41

Hey Kort,

I'm testing it on genoa.

I added the part in page.add.tpl.
If I create a new page, he asked me to Choose a file. I can only use a locale one.
But he does not upload it. How do I do it?

... can we help you ...
Kort
#6 2011-03-19 07:55

In the plugin settings specify a config string for the gallery folder. Do not forget to create the folder in the ./datas

If you've done both check if the images are uploaded there.

Tag for the page.tpl is PAGE_AVATAR / thumb_{PAGE_AVATAR} / thumbsmaller_PAGE_AVATAR etc

SED.by - создание сайтов, разработка плагинов и тем для Котонти
This post was edited by Kort (2011-03-19 08:01, 13 years ago)
esclkm
#7 2011-03-19 08:52

вте forget about

enctype="multipart/form-data"

 

littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
pieter
#8 2011-03-20 07:03

It was not working, because I changed the default entry, without adding the allowed extension and how to make the tumbnail.

Now it is added and it works.

{PAGE_AVATAR} gives me only the filename. Not the path.

 

I added this;

<img src="/datas/fotos/{PAGE_AVATAR}" alt="First foto" />

 

<img src="/datas/fotos/thumb_{PAGE_AVATAR}" alt="First foto" />
 
But the 2nd one does not work.
... can we help you ...
Kort
#9 2011-03-20 07:14

Pieter, the idea is to play with the names and specify paths in the template. So "no path" is absolutely fine. Check if ./datas/fotos/thumb_{PAGE_AVATAR} exists and try ...src="./datas/fotos... if it does.

That is what I use:

<!-- IF {PAGE_AVATAR} --><img src="./datas/agencies/thumb_{PAGE_AVATAR}" alt="{PAGE_SHORTTITLE}" /><!-- ELSE --><img src="./datas/agencies/nologo.png" alt="{PAGE_SHORTTITLE}" /><!-- ENDIF -->

SED.by - создание сайтов, разработка плагинов и тем для Котонти
This post was edited by Kort (2011-03-20 07:22, 13 years ago)
pieter
#10 2011-03-20 07:23

In the /datas/fotos I only have the original files, but no thumb.

Is the thumb generated on the spot, or during download?

... can we help you ...
Kort
#11 2011-03-20 07:39

This is the config string:

agencies|datas/agencies|thumb_-140-100|0||frame

It renames the original file to page_ID.EXT, uploads it into the ./datas/agencies and builds a thumbnail sized 140*100 and saves it in the same folder (and writes page_ID.EXT to the page_avatar extrafield)

The code:

<!-- IF {PAGE_AVATAR} --><img src="./datas/agencies/thumb_{PAGE_AVATAR}" alt="{PAGE_SHORTTITLE}" /><!-- ELSE --><img src="./datas/agencies/nologo.png" alt="{PAGE_SHORTTITLE}" /><!-- ENDIF -->

Checks if page_avatar is filled out and outputs the thumb. If no file is uploaded it outputs the nologo.png

SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#12 2011-03-20 07:54

I used : foto|datas/fotos|thumb_-300-300|1|jpg|height

But with yours agencies|datas/agencies|thumb_-140-100|0||frame it works.

Thanks, now I can try some stuff

 

Can I add:

 

foto|datas/fotos|thumb_-100-100|0||frame
foto|datas/fotos|thumb300_-300-300|0||frame
 
Two different thumbnails for same picture?
... can we help you ...
Kort
#13 2011-03-20 07:58

It is all written there:

agencies|datas/agencies|thumb_-140-100 thumb_280_200|0||frame

SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#14 2011-03-20 08:02

Thx, it is a very nice plugin.
It was not easy for all the options.

The standard options that are in the config by default are not working. They give, "no file selected".

There is where it went wrong for me.

 

But thanks for the support.

Added 4 minutes later:

One small question.

If I want to display in list 3 photos per row.

How to to this?

... can we help you ...
Kort
#15 2011-03-20 08:29

One small correction!

agencies|datas/agencies|thumb_-140-100 thumb2_280_200|0||frame

Use cotemplate from the Siena to have the following capability:

<!-- IF {LIST_ROW_NUM} % 3 == 0 -->SOMEACTION<!-- ENDIF -->

... or use equal right & left margins

SED.by - создание сайтов, разработка плагинов и тем для Котонти
This post was edited by Kort (2011-03-20 08:29, 13 years ago)

12>>>