Announcement

#1 2011-09-13 17:41:32

malo
Member
2011-06-03
11

[resolved] Random picture for homepage

First of all I would like to express my thanks for the excellent piece of work you developed. I scanned and tested a number of gallery scripts and finally selected piwigo as engine to show my private picture collection. For me it's just the right mixture of freedom and guidance and I'm pretty happy with the result.

Of course there are still some elements I would like to change or add.

After some testing I found the solution for a homepage (or landing page) as cover page in front of the gallery main page (thanks to Pierrick and the excellent description on http://piwigo.com/blog/2011/07/07/a-ran … home-page/).

Now, my idea is not to have a static photo on that homepage but a random one based on a given album/category. But none of the guidelines I discovered works. The easy solution in the blog like [random album=xx] just shows as it is, not as image. And I was not able to include one of the php examples as "additional page".

So, any hints to finish this idea are very welcome.

Offline

 

#2 2011-09-13 22:54:47

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Random picture for homepage

Hi malo,

see [Forum, topic 17741] [Extended Description] random photo

Actually, I've commited this code only on Piwigo.com for the moment, but I see more and more tips I have described on the Piwigo.com Blog used on Piwigo hosted outside Piwigo.com (and that's perfectly fine, Piwigo.com is not a Piwigo++, you get the same features with Piwigo outside Piwigo.com).

I've just added a new version 2.2.b of [extension by Piwigo Team] Extended Description where you have the option [random album=xx]

Offline

 

#3 2011-09-14 07:58:30

malo
Member
2011-06-03
11

Re: [resolved] Random picture for homepage

Thanks for the help, I installed the new version of the extended description plugin and I can see that the markup [random album=xx]  is replaced by an image html tag.

Following the the guideline in the blog, I implemented my homepage as an "additional page" and I believe, that the generated link to the image file is not correct (at least in my case).

My web size pictures are placed in the upload folder, so the absolute path from the piwigo root folder is (as example) piwigo/upload/2011/08/17/20110817...jpg. The script is instead generating an url like this: ./upload/2011/08/17/20110817...jpg which leads to a folder somewhere in the plugin folder structure? I'm using the "Developer Tool" for IE8 where you can change links "on the fly". If I change the image link to ../../upload/2011/08/17/20110817...jpg, the picture shows up.

Is there a way to change this or is there a better way to implement a homepage/landing page with the ability to show random pictures.

Offline

 

#4 2011-09-14 12:03:24

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Random picture for homepage

do you confirm you have a specific configuration for your urls?

Offline

 

#5 2011-09-14 15:03:22

malo
Member
2011-06-03
11

Re: [resolved] Random picture for homepage

ha - very good.

Yes I have changed the urls with these two entries:
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;

I checked the behaviour for all combinations, with the first entry=true the result is good, for =false I do get the broken pathes.

Is there a workaround? If not, the question marks in the address are no big issue ...
Thanks.

Offline

 

#6 2011-09-14 15:27:37

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Random picture for homepage

I just forgot to deal with that case! I'll post a fix later and I'll notify you in this topic (make sure you subscribed to this topic)

Offline

 

#7 2011-09-14 23:21:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] Random picture for homepage

Give a try to the new version 2.2.c of [extension by Piwigo Team] Extended Description

Offline

 

#8 2011-09-15 06:26:40

malo
Member
2011-06-03
11

Re: [resolved] Random picture for homepage

I just installed the 2.2.c Version and changed the URL settings back to false/false. The result is perfect.

Thanks a lot for your support!

Offline

 

Board footer

Powered by FluxBB

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